@Ignore("need huge key set") @Test public void testHugeKeySet() throws IOException { AppendTrieDictionaryBuilder builder = createBuilder(); AppendTrieDictionary<String> dict = null; InputStream is = new FileInputStream("src/test/resources/dict/huge_key"); BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8")); try { String word; while ((word = reader.readLine()) != null) { word = word.trim(); if (!word.isEmpty()) builder.addValue(word); } } finally { reader.close(); is.close(); } dict = builder.build(0); dict.dump(System.out); }
@Override public void dump(PrintStream out) { out.println(String.format(Locale.ROOT, "Total %d values and %d slices", metadata.nValues, metadata.sliceFileMap.size())); }
AppendTrieDictionary extends CacheDictionary<T> { @Override public void dump(PrintStream out) { out.println(String.format(Locale.ROOT, "Total %d values and %d slices", metadata.nValues, metadata.sliceFileMap.size())); } }
AppendTrieDictionary extends CacheDictionary<T> { @Override public void dump(PrintStream out) { out.println(String.format(Locale.ROOT, "Total %d values and %d slices", metadata.nValues, metadata.sliceFileMap.size())); }  }
AppendTrieDictionary extends CacheDictionary<T> { @Override public void dump(PrintStream out) { out.println(String.format(Locale.ROOT, "Total %d values and %d slices", metadata.nValues, metadata.sliceFileMap.size())); }  void init(String baseDir); @Override int getIdFromValueBytesWithoutCache(byte[] value, int offset, int len, int roundingFlag); CacheStats getCacheStats(); GlobalDictMetadata getDictMetadata(); @Override int getMinId(); @Override int getMaxId(); @Override int getSizeOfId(); @Override int getSizeOfValue(); @Override AppendTrieDictionary copyToAnotherMeta(KylinConfig srcConfig, KylinConfig dstConfig); @Override void write(DataOutput out); @Override void readFields(DataInput in); @Override void dump(PrintStream out); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); @Override boolean contains(Dictionary other); }
AppendTrieDictionary extends CacheDictionary<T> { @Override public void dump(PrintStream out) { out.println(String.format(Locale.ROOT, "Total %d values and %d slices", metadata.nValues, metadata.sliceFileMap.size())); }  void init(String baseDir); @Override int getIdFromValueBytesWithoutCache(byte[] value, int offset, int len, int roundingFlag); CacheStats getCacheStats(); GlobalDictMetadata getDictMetadata(); @Override int getMinId(); @Override int getMaxId(); @Override int getSizeOfId(); @Override int getSizeOfValue(); @Override AppendTrieDictionary copyToAnotherMeta(KylinConfig srcConfig, KylinConfig dstConfig); @Override void write(DataOutput out); @Override void readFields(DataInput in); @Override void dump(PrintStream out); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); @Override boolean contains(Dictionary other); static final byte[] HEAD_MAGIC; static final int HEAD_SIZE_I; }