public static void main(String[] args) throws Exception { LogUtil.loadLogConfig(); TwitterCrawler tm = new TwitterCrawler(); tm.start(); } }
LogUtil.loadLogConfig();
LogUtil.loadLogConfig(); LumongoPoolConfig lumongoPoolConfig = new LumongoPoolConfig(); lumongoPoolConfig.setDefaultRetries(servers.length - 1); //?
public void startSuite(int instanceCount) throws Exception { luceneNodes = new ArrayList<>(); Thread.currentThread().setName(this.getClass().getSimpleName()); LogUtil.loadLogConfig(); removeTestDBs(); startServer(instanceCount); startClient(); }
LogUtil.loadLogConfig();
LogUtil.loadLogConfig();
public static void main(String[] args) throws Exception { LogUtil.loadLogConfig(); lumongoWorkPool = new LumongoWorkPool(new LumongoPoolConfig().addMember("localhost")); mapper = new Mapper<Article>(Article.class); int maxSize = 2000; ClientDocumentCache clientDocumentCache = new ClientDocumentCache(lumongoWorkPool, maxSize); Query query = new Query("wikipedia", "title:a*", 10); QueryResult queryResult = lumongoWorkPool.query(query); BatchFetchResult batchFetchResult = clientDocumentCache.fetch(queryResult); List<Article> articles = mapper.fromBatchFetchResult(batchFetchResult); System.out.println(articles); lumongoWorkPool.shutdown(); } }
LogUtil.loadLogConfig();
public static void main(String[] args) throws Exception { LogUtil.loadLogConfig();
public static void main(String[] args) throws Exception { LogUtil.loadLogConfig();
public static void main(String[] args) throws Exception { LogUtil.loadLogConfig();
public static void main(String[] args) throws Exception { LogUtil.loadLogConfig();
public static void main(String[] args) throws Exception { LogUtil.loadLogConfig(); LumongoPoolConfig lumongoPoolConfig = new LumongoPoolConfig(); lumongoPoolConfig.addMember("localhost"); LumongoWorkPool lumongoWorkPool = new LumongoWorkPool(lumongoPoolConfig); try { Mapper<Tweet> mapper = new Mapper<Tweet>(Tweet.class); lumongoWorkPool.createOrUpdateIndex(mapper.createOrUpdateIndex()); //sample tweet, lovely isnt it? Tweet tweet = new Tweet(); tweet.setId("426145287804293120"); tweet.setCreatedDate(new Date()); tweet.setFavoriteCount(1); tweet.setRetweetCount(2); tweet.setUsername("maddawgggg34"); tweet.setText("just wasted like $100 on 5sos merch ugh"); tweet.setLatitude(40.68757493); tweet.setLatitude(-76.21184093); Store store = mapper.createStore(tweet); lumongoWorkPool.store(store); } finally { lumongoWorkPool.shutdown(); } } }
public static void main(String[] args) throws Exception { LogUtil.loadLogConfig();
public static void main(String[] args) throws Exception { LogUtil.loadLogConfig();
public static void main(String[] args) throws Exception { LogUtil.loadLogConfig();
LogUtil.loadLogConfig(); serverTest.startSuite(1); Thread.sleep(1000);
public static void main(String[] args) throws Exception { LogUtil.loadLogConfig();