亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? testdatanode.java

?? 分布式全文搜索工具包 可以支持集群 主要使用java開發(fā) 比較方便使用
?? JAVA
字號:
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements.  See the NOTICE file * distributed with this work for additional information * regarding copyright ownership.  The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License.  You may obtain a copy of the License at * *     http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.apache.hadoop.contrib.dlucene;import java.io.IOException;import java.net.InetSocketAddress;import org.apache.hadoop.conf.Configuration;import org.apache.hadoop.contrib.dlucene.writable.SearchResults;import org.apache.hadoop.contrib.dlucene.writable.WDocument;import org.apache.hadoop.contrib.dlucene.writable.WQuery;import org.apache.hadoop.contrib.dlucene.writable.WSort;import org.apache.hadoop.contrib.dlucene.writable.WTerm;import org.apache.lucene.document.Document;import org.apache.lucene.document.Field;import org.apache.lucene.index.Term;import org.apache.lucene.search.Sort;public class TestDataNode extends UtilsForTest {  private static MiniDLuceneCluster cluster = null;  private static DataNode dn = null;  private static int dataNodePort;  private static String DNT_INDEX_ONE = null;  private static String DNT_INDEX_TWO = null;  private static String DNT_INDEX_THREE = null;  protected void setUp() throws Exception {    super.setUp();    if (cluster == null) {      cluster = new MiniDLuceneCluster(conf, 2);    }    if (DNT_INDEX_ONE == null) {      DNT_INDEX_ONE = getNextIndex();      DNT_INDEX_TWO = getNextIndex();      DNT_INDEX_THREE = getNextIndex();      // delete the old indexes before starting up      // deleteDirectory(new File(ROOT_DIR_STR));      dataNodePort = getNextPort();      dn = DataNode.createNode(conf, new InetSocketAddress(Constants.HOST,          dataNodePort), new InetSocketAddress(Constants.HOST, cluster          .getNameNodePort()), USE_RAM_INDEX_FOR_TESTS);      dn.createIndex(DNT_INDEX_ONE);    }  }  public void testNullArguments() throws Exception {    try {      dn.addDocument(null, null);      fail("addDocument() should have thrown an exception!");    } catch (IllegalArgumentException expected) {      // expected    }    try {      dn.getFileContent(null, null);      fail("getFileContent() should have thrown an exception!");    } catch (IllegalArgumentException expected) {      // expected    }    try {      dn.getFileSet(null);      fail("getFileSet() should have thrown an exception!");    } catch (IllegalArgumentException expected) {      // expected    }    try {      dn.createIndex(null);      fail("addIndex() should have thrown an exception!");    } catch (IllegalArgumentException expected) {      // expected    }    try {      dn.commitVersion(null);      fail("commitVersion() should have thrown an exception!");    } catch (IllegalArgumentException expected) {      // expected    }    try {      dn.search(null, null, null, 0);      fail("search() should have thrown an exception!");    } catch (IllegalArgumentException expected) {      // expected    }    try {      dn.removeDocuments(null, null);      fail("removeDocuments() should have thrown an exception!");    } catch (IllegalArgumentException expected) {      // expected    }  }  public void testAddDocument() throws Exception {    dn.addDocument(DNT_INDEX_ONE, new WDocument(makeDocument("name",        "john smith")));    // commit the index    IndexVersion committedIndex = dn.commitVersion(DNT_INDEX_ONE);    // query the index    SearchResults hits = dn.search(committedIndex, new WQuery(UtilsForTest        .getQuery("name", "smith")), new WSort(new Sort()), 10);    // check the query returns the original document    assertEquals(1, hits.size());    assertEquals("john smith", hits.get(0).get("name"));  }  public void testDoHeartbeat() throws Exception {    dn.doHeartbeat();  }  public void testGetFileContent() throws Exception {    IndexVersion iv = new IndexVersion(DNT_INDEX_ONE);    String[] files = dn.getFileSet(iv);    assert (files.length > 0);    byte[] file = dn.getFileContent(iv, files[0]);    assert (file != null);    assert (file.length > 0);  }  public void testGetFileSet() throws Exception {    assertTrue(dn.getFileSet(new IndexVersion(DNT_INDEX_ONE)) != null);    try {      dn.getFileSet(new IndexVersion(DNT_INDEX_THREE, 1));      fail("Should throw an exception");    } catch (IOException expected) {      //    }  }  public void testGetProtocolVersion() throws Exception {    assertEquals(ClientToDataNodeProtocol.VERSION_ID, dn.getProtocolVersion(        ClientToDataNodeProtocol.class.getName(), 0));    assertEquals(DataNodeToDataNodeProtocol.VERSION_ID, dn.getProtocolVersion(        DataNodeToDataNodeProtocol.class.getName(), 0));    try {      dn.getProtocolVersion(DataNodeToNameNodeProtocol.class.getName(), 0);      fail("Should throw an exception");    } catch (IOException io) {      //    }  }  public void testAddIndex() throws Exception {    dn.createIndex(DNT_INDEX_TWO);    assertTrue(dn.getFileSet(new IndexVersion(DNT_INDEX_TWO)) != null);    try {      dn.createIndex(DNT_INDEX_TWO);      fail("addIndex() should have thrown an exception");    } catch (IOException expected) {      // expected    }  }  public void testCommitVersion() throws Exception {    // try committing a version with no changes, see what happens    try {      dn.commitVersion(DNT_INDEX_ONE);      fail("commitVersion should have thrown an exception");    } catch (IOException expected) {      // expected    }  }  public void testRemoveDocuments() throws Exception {    dn.addDocument(DNT_INDEX_ONE, new WDocument(makeDocument("name",        "john smith")));    // commit the index    IndexVersion committedIndex = dn.commitVersion(DNT_INDEX_ONE);    // query the index    SearchResults hits = dn.search(committedIndex, new WQuery(UtilsForTest        .getQuery("name", "smith")), new WSort(new Sort()), 10);    // check the query returns the original document    int k = hits.size();    assertEquals("john smith", hits.get(0).get("name"));    int j = dn.removeDocuments(DNT_INDEX_ONE, new WTerm(new Term("name", "smith")));    assertEquals(k, j);     committedIndex = dn.commitVersion(DNT_INDEX_ONE);    hits = dn.search(committedIndex, new WQuery(getQuery("name", "smith")),        new WSort(new Sort()), 10);    // check the query returns the original document    assertEquals(0, hits.size());  }  public void testSearch() throws Exception {    dn.addDocument(DNT_INDEX_ONE, new WDocument(makeDocument("name",        "john smith")));    Document doc = new Document();    Field field = new Field("name", NAME[0], Field.Store.YES,        Field.Index.TOKENIZED);    doc.add(field);    dn.addDocument(DNT_INDEX_ONE, new WDocument(doc));    IndexVersion committedIndex = dn.commitVersion(DNT_INDEX_ONE);    SearchResults hits = dn.search(committedIndex, new WQuery(UtilsForTest        .getQuery("name", "fred")), new WSort(new Sort()), 10);    // check the query returns the original document    assertEquals(1, hits.size());    assertEquals(NAME[0], hits.get(0).get("name"));  }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91在线云播放| 精品国产一区二区三区忘忧草 | 国产欧美日韩激情| 亚洲精品国产视频| 久热成人在线视频| 在线亚洲免费视频| 国产网站一区二区| 午夜精品福利一区二区三区蜜桃| 国产白丝精品91爽爽久久| 在线电影欧美成精品| 中文字幕一区二| 国产一区二区三区美女| 欧美日韩亚洲丝袜制服| 亚洲天堂精品在线观看| 国产一区欧美二区| 欧美电影在线免费观看| 亚洲精品乱码久久久久| 粉嫩蜜臀av国产精品网站| 精品久久人人做人人爽| 天堂影院一区二区| 色噜噜狠狠色综合中国| 国产精品不卡在线观看| 国产成人无遮挡在线视频| 欧美大片在线观看| 青青草原综合久久大伊人精品| 欧美日韩一区二区欧美激情| 亚洲男女毛片无遮挡| 成人黄页毛片网站| 亚洲国产精品黑人久久久| 国产一区二区三区综合| 欧美成人三级在线| 麻豆精品视频在线| 正在播放亚洲一区| 日本中文字幕不卡| 777亚洲妇女| 免费精品视频在线| 精品电影一区二区| 首页综合国产亚洲丝袜| 欧美二区乱c少妇| 人禽交欧美网站| 日韩欧美国产系列| 国产一区二三区好的| 国产日韩高清在线| 成人免费看的视频| 国产精品福利一区| 一本大道av一区二区在线播放| 亚洲色图欧美激情| 在线观看欧美精品| 午夜精品久久久久久久蜜桃app| 欧美喷水一区二区| 免费成人小视频| 国产亚洲一二三区| 成人精品亚洲人成在线| 亚洲欧美综合色| 欧美吞精做爰啪啪高潮| 日韩高清欧美激情| 欧美精品一区二区三区视频| 成人福利在线看| 亚洲综合区在线| 日韩欧美一区二区在线视频| 国产精品影音先锋| 亚洲欧美国产毛片在线| 欧美高清www午色夜在线视频| 久久国产精品99精品国产| 国产日韩欧美制服另类| 一本色道综合亚洲| 三级欧美在线一区| 国产日产精品1区| 91丨porny丨国产| 奇米综合一区二区三区精品视频| 日韩三级在线观看| 99在线精品观看| 午夜精品一区二区三区电影天堂| 久久久久久久综合色一本| 91麻豆精品一区二区三区| 另类中文字幕网| 18成人在线观看| 日韩欧美成人激情| 日本高清成人免费播放| 日本成人在线不卡视频| 中文字幕第一区二区| 69精品人人人人| 99久久亚洲一区二区三区青草| 欧美aaaaaa午夜精品| 欧美国产精品中文字幕| 6080午夜不卡| 国产激情视频一区二区在线观看| 亚洲国产精品一区二区久久恐怖片| 欧美成人乱码一区二区三区| 一本久久a久久精品亚洲| 激情图区综合网| 亚洲va中文字幕| 欧美激情在线一区二区三区| 欧美电影在线免费观看| 91麻豆6部合集magnet| 国产一区二区三区久久久 | 精品久久久久99| 99精品国产视频| 国产毛片一区二区| 免费成人av在线| 一区二区三区精品久久久| 国产精品麻豆网站| 久久久久国产免费免费| 日韩免费看网站| 91麻豆精品国产自产在线 | 麻豆专区一区二区三区四区五区| 亚洲女与黑人做爰| 国产精品天美传媒| 国产亚洲成aⅴ人片在线观看| 日韩免费高清视频| 欧美日韩成人一区| 欧美色精品天天在线观看视频| 成人免费av资源| 国产精品一区久久久久| 狠狠狠色丁香婷婷综合激情| 久久国产精品99精品国产| 蜜桃精品视频在线观看| 日韩黄色一级片| 国产69精品一区二区亚洲孕妇 | 91极品美女在线| 成人一级片网址| 国产成人免费视频网站| 国产成人在线观看免费网站| 国产成人av电影在线观看| 高清shemale亚洲人妖| 国产成人精品免费网站| 成人一区二区三区视频| aaa亚洲精品| 欧美伊人久久久久久午夜久久久久| 色网站国产精品| 欧美日韩精品一区二区三区四区| 欧美日韩一区国产| 制服.丝袜.亚洲.另类.中文| 日韩欧美在线影院| 久久青草欧美一区二区三区| 中文字幕第一区综合| 亚洲免费色视频| 日日摸夜夜添夜夜添国产精品 | 欧美精品一区二区三区蜜桃视频| 26uuu国产在线精品一区二区| 久久嫩草精品久久久精品| 日本一区二区三区四区在线视频| 中文字幕色av一区二区三区| 一区二区高清在线| 日韩av在线免费观看不卡| 国产一区999| 91麻豆蜜桃一区二区三区| 欧美高清www午色夜在线视频| 久久亚洲私人国产精品va媚药| 国产精品久久久久久久久快鸭| 亚洲午夜国产一区99re久久| 久久精品噜噜噜成人av农村| 成人av片在线观看| 欧美日韩dvd在线观看| 久久青草欧美一区二区三区| 伊人开心综合网| 国产在线一区二区综合免费视频| 97se亚洲国产综合在线| 日韩欧美成人一区| 最新国产精品久久精品| 毛片av一区二区| 91一区二区三区在线观看| 91精品国产91综合久久蜜臀| 国产精品美女一区二区三区| 亚欧色一区w666天堂| 色国产精品一区在线观看| 亚洲精品在线电影| 一区二区三区.www| 国产福利一区在线| 欧美日韩国产综合一区二区| 国产偷国产偷精品高清尤物| 香蕉久久一区二区不卡无毒影院| 国产激情一区二区三区四区 | 99久久精品国产麻豆演员表| 日韩欧美视频在线| 亚洲精品成人a在线观看| 国产一区二区在线免费观看| 欧美日韩国产123区| 国产精品久久久久影院色老大 | 国产成人精品三级麻豆| 欧美美女激情18p| 亚洲欧美日韩成人高清在线一区| 国产乱码精品一区二区三区五月婷| 欧美影院午夜播放| 综合激情成人伊人| 国产激情一区二区三区桃花岛亚洲| 欧美一级夜夜爽| 亚洲成人精品影院| 91免费国产视频网站| 中文字幕精品一区二区三区精品 | 国产99一区视频免费| 欧美一区二区福利在线| 亚洲国产人成综合网站| 一本色道a无线码一区v| 国产精品动漫网站| 不卡的av电影| 国产精品美女一区二区| 波多野结衣中文字幕一区二区三区| 久久美女艺术照精彩视频福利播放| 久久精品国产久精国产|