buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void testBasic() throws IOException { URI uri = dfsCluster.getURI(); Path lockPath = new Path(uri.toString(), "/lock"); HdfsLockFactory lockFactory = new HdfsLockFactory(lockPath, new Configuration()); Lock lock = lockFactory.makeLock("testlock"); boolean success = lock.obtain(); assert...
public void testBasic() throws IOException { URI uri = dfsCluster.getURI(); Path lockPath = new Path(uri.toString(), "/basedir/lock"); HdfsLockFactory lockFactory = new HdfsLockFactory(lockPath, new Configuration()); Lock lock = lockFactory.makeLock("testlock"); boolean success = lock.obtain(); ...
private static final String WRITE_CONSISTENCY_LEVEL = "cassandra.consistencylevel.write"; private static final Logger logger = LoggerFactory.getLogger(ColumnFamilyInputFormat.class);
private static final String WRITE_CONSISTENCY_LEVEL = "cassandra.consistencylevel.write"; private static final Logger logger = LoggerFactory.getLogger(ConfigHelper.class);
public static org.apache.cassandra.db.migration.avro.CfDef convertToAvro(org.apache.cassandra.thrift.CfDef def) { org.apache.cassandra.db.migration.avro.CfDef newDef = new org.apache.cassandra.db.migration.avro.CfDef(); newDef.keyspace = def.getKeyspace(); newDef.name = def.getName(); ...
public static org.apache.cassandra.db.migration.avro.CfDef convertToAvro(org.apache.cassandra.thrift.CfDef def) { org.apache.cassandra.db.migration.avro.CfDef newDef = new org.apache.cassandra.db.migration.avro.CfDef(); newDef.keyspace = def.getKeyspace(); newDef.name = def.getName(); ...
public void reloadConfiguration() throws ConfigurationException { hostProperties = resourceToProperties(RACK_PROPERTY_FILENAME); invalidateCachedSnitchValues(); }
public void reloadConfiguration() throws ConfigurationException { hostProperties = resourceToProperties(RACK_PROPERTY_FILENAME); clearEndpointCache(); }
public ExecRow getNextRowCore() throws StandardException { if ( isOpen ) { if ( ! next ) { next = true; if (SanityManager.DEBUG) SanityManager.ASSERT(! cursor.isClosed(), "cursor closed"); ExecRow cursorRow = cursor.getCurrentRow(); // requalify the current row if (curso...
public ExecRow getNextRowCore() throws StandardException { if ( isOpen ) { if ( ! next ) { next = true; if (SanityManager.DEBUG) SanityManager.ASSERT(! cursor.isClosed(), "cursor closed"); ExecRow cursorRow = cursor.getCurrentRow(); // requalify the current row if (curso...
private void testAntiCompaction(String columnFamilyName, int insertsPerTable) throws IOException, ExecutionException, InterruptedException { Table table = Table.open("Keyspace1"); ColumnFamilyStore store = table.getColumnFamilyStore(columnFamilyName); for (int j = 0; j < insertsP...
private void testAntiCompaction(String columnFamilyName, int insertsPerTable) throws IOException, ExecutionException, InterruptedException { Table table = Table.open("Keyspace1"); ColumnFamilyStore store = table.getColumnFamilyStore(columnFamilyName); for (int j = 0; j < insertsP...
protected void testCompaction(int sstableCount, int rowsPerSSTable, int colsPerRow) throws Exception { CompactionManager.instance.disableAutoCompaction(); Table table = Table.open(TABLE1); ColumnFamilyStore store = table.getColumnFamilyStore("Standard1"); ArrayList<SSTableReade...
protected void testCompaction(int sstableCount, int rowsPerSSTable, int colsPerRow) throws Exception { CompactionManager.instance.disableAutoCompaction(); Table table = Table.open(TABLE1); ColumnFamilyStore store = table.getColumnFamilyStore("Standard1"); ArrayList<SSTableReade...
public void testRecoverAndOpen() throws IOException, ExecutionException, InterruptedException { RowMutation rm; rm = new RowMutation("Keyspace1", ByteBufferUtil.bytes("k1")); rm.add(new QueryPath("Indexed1", null, ByteBufferUtil.bytes("birthdate")), FBUtilities.toByteBuffer(1L), 0); ...
public void testRecoverAndOpen() throws IOException, ExecutionException, InterruptedException { RowMutation rm; rm = new RowMutation("Keyspace1", ByteBufferUtil.bytes("k1")); rm.add(new QueryPath("Indexed1", null, ByteBufferUtil.bytes("birthdate")), FBUtilities.toByteBuffer(1L), 0); ...
private Collection<ScoreTerm> suggestSimilar(Term term, int numSug, IndexReader ir, int docfreq, int editDistance, float accuracy, final CharsRef spare) throws IOException { AttributeSource atts = new AttributeSource(); MaxNonCompetitiveBoostAttribute maxBoostAtt = atts.addAttribute(MaxNonCo...
private Collection<ScoreTerm> suggestSimilar(Term term, int numSug, IndexReader ir, int docfreq, int editDistance, float accuracy, final CharsRef spare) throws IOException { AttributeSource atts = new AttributeSource(); MaxNonCompetitiveBoostAttribute maxBoostAtt = atts.addAttribute(MaxNonCo...
protected void add(int base, IndexReader r) throws IOException { Terms terms = r.terms(F_WORD); if (terms != null) termsEnums.add(terms.iterator(null)); } }.run(); } boolean isEmpty = termsEnums.isEmpty(); try { Iterato...
protected void add(int base, IndexReader r) throws IOException { Terms terms = r.terms(F_WORD); if (terms != null) termsEnums.add(terms.iterator(null)); } }.run(); } boolean isEmpty = termsEnums.isEmpty(); try { Iterato...
public Filter getFilter(Element e) throws ParserException { TermsFilter tf = new TermsFilter(); String text = DOMUtils.getNonBlankTextOrFail(e); String fieldName = DOMUtils.getAttributeWithInheritanceOrFail(e, "fieldName"); try { TokenStream ts = analyzer.tokenStream(fieldName, new StringReader...
public Filter getFilter(Element e) throws ParserException { TermsFilter tf = new TermsFilter(); String text = DOMUtils.getNonBlankTextOrFail(e); String fieldName = DOMUtils.getAttributeWithInheritanceOrFail(e, "fieldName"); try { TokenStream ts = analyzer.tokenStream(fieldName, new StringReader...
public SpanQuery getSpanQuery(Element e) throws ParserException { String fieldName = DOMUtils.getAttributeWithInheritanceOrFail(e, "fieldName"); String value = DOMUtils.getNonBlankTextOrFail(e); try { List<SpanQuery> clausesList = new ArrayList<SpanQuery>(); TokenStream ts = analyzer.tokenStr...
public SpanQuery getSpanQuery(Element e) throws ParserException { String fieldName = DOMUtils.getAttributeWithInheritanceOrFail(e, "fieldName"); String value = DOMUtils.getNonBlankTextOrFail(e); try { List<SpanQuery> clausesList = new ArrayList<SpanQuery>(); TokenStream ts = analyzer.tokenStr...
public Query getQuery(Element e) throws ParserException { String fieldName = DOMUtils.getAttributeWithInheritanceOrFail(e, "fieldName"); String text = DOMUtils.getNonBlankTextOrFail(e); BooleanQuery bq = new BooleanQuery(DOMUtils.getAttribute(e, "disableCoord", false)); bq.setMinimumNumberShouldMatch...
public Query getQuery(Element e) throws ParserException { String fieldName = DOMUtils.getAttributeWithInheritanceOrFail(e, "fieldName"); String text = DOMUtils.getNonBlankTextOrFail(e); BooleanQuery bq = new BooleanQuery(DOMUtils.getAttribute(e, "disableCoord", false)); bq.setMinimumNumberShouldMatch...
public DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs) throws IOException { IndexReader reader = context.reader; FixedBitSet result = new FixedBitSet(reader.maxDoc()); Fields fields = reader.fields(); if (fields == null) { return result; } BytesRef br = new BytesRef(...
public DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs) throws IOException { IndexReader reader = context.reader; FixedBitSet result = new FixedBitSet(reader.maxDoc()); Fields fields = reader.fields(); if (fields == null) { return result; } BytesRef br = new BytesRef(...
public boolean bytesVal(int doc, BytesRef target) { String s = strVal(doc); if (s==null) { target.length = 0; return false; } target.copy(s); return true; };
public boolean bytesVal(int doc, BytesRef target) { String s = strVal(doc); if (s==null) { target.length = 0; return false; } target.copyChars(s); return true; };
protected List<BytesRef> analyze(String text, String field, Analyzer analyzer) throws IOException { List<BytesRef> bytesRefs = new ArrayList<BytesRef>(); TokenStream tokenStream = analyzer.tokenStream(field, new StringReader(text)); TermToBytesRefAttribute termAttribute = tokenStream.getAttribute(TermToB...
protected List<BytesRef> analyze(String text, String field, Analyzer analyzer) throws IOException { List<BytesRef> bytesRefs = new ArrayList<BytesRef>(); TokenStream tokenStream = analyzer.tokenStream(field, new StringReader(text)); TermToBytesRefAttribute termAttribute = tokenStream.getAttribute(TermToB...
private void addTerms(IndexReader reader,FieldVals f) throws IOException { if(f.queryString==null) return; TokenStream ts=analyzer.tokenStream(f.fieldName, new StringReader(f.queryString)); CharTermAttribute termAtt = ts.addAttribute(CharTermAttribute.class); int corpusN...
private void addTerms(IndexReader reader,FieldVals f) throws IOException { if(f.queryString==null) return; TokenStream ts=analyzer.tokenStream(f.fieldName, new StringReader(f.queryString)); CharTermAttribute termAtt = ts.addAttribute(CharTermAttribute.class); int corpusN...
public void testCopy() { int numIters = atLeast(10); for (int i = 0; i < numIters; i++) { CharsRef ref = new CharsRef(); char[] charArray = _TestUtil.randomRealisticUnicodeString(random, 1, 100).toCharArray(); int offset = random.nextInt(charArray.length); int length = charArray.length...
public void testCopy() { int numIters = atLeast(10); for (int i = 0; i < numIters; i++) { CharsRef ref = new CharsRef(); char[] charArray = _TestUtil.randomRealisticUnicodeString(random, 1, 100).toCharArray(); int offset = random.nextInt(charArray.length); int length = charArray.length...
private int countTerms(MultiTermQuery q) throws Exception { final Terms terms = MultiFields.getTerms(reader, q.getField()); if (terms == null) return 0; final TermsEnum termEnum = q.getTermsEnum(terms); assertNotNull(termEnum); int count = 0; BytesRef cur, last = null; while ((cur = ...
private int countTerms(MultiTermQuery q) throws Exception { final Terms terms = MultiFields.getTerms(reader, q.getField()); if (terms == null) return 0; final TermsEnum termEnum = q.getTermsEnum(terms); assertNotNull(termEnum); int count = 0; BytesRef cur, last = null; while ((cur = ...
public void testIntersect() throws Exception { for (int i = 0; i < numIterations; i++) { String reg = AutomatonTestUtil.randomRegexp(random); Automaton automaton = new RegExp(reg, RegExp.NONE).toAutomaton(); CompiledAutomaton ca = new CompiledAutomaton(automaton, SpecialOperations.isFinite(autom...
public void testIntersect() throws Exception { for (int i = 0; i < numIterations; i++) { String reg = AutomatonTestUtil.randomRegexp(random); Automaton automaton = new RegExp(reg, RegExp.NONE).toAutomaton(); CompiledAutomaton ca = new CompiledAutomaton(automaton, SpecialOperations.isFinite(autom...
private void checkTermsOrder(IndexReader r, Set<String> allTerms, boolean isTop) throws IOException { TermsEnum terms = MultiFields.getFields(r).terms("f").iterator(null); BytesRef last = new BytesRef(); Set<String> seenTerms = new HashSet<String>(); while(true) { final BytesRef term = terms....
private void checkTermsOrder(IndexReader r, Set<String> allTerms, boolean isTop) throws IOException { TermsEnum terms = MultiFields.getFields(r).terms("f").iterator(null); BytesRef last = new BytesRef(); Set<String> seenTerms = new HashSet<String>(); while(true) { final BytesRef term = terms....
public BytesRef next() throws IOException { if (queuedBottom != null) { bottomChanged(queuedBottom, false); queuedBottom = null; } BytesRef term = actualEnum.next(); boostAtt.setBoost(actualBoostAtt.getBoost()); final float bottom = maxBoostAtt.getMaxNonCompetitiveBoost(); ...
public BytesRef next() throws IOException { if (queuedBottom != null) { bottomChanged(queuedBottom, false); queuedBottom = null; } BytesRef term = actualEnum.next(); boostAtt.setBoost(actualBoostAtt.getBoost()); final float bottom = maxBoostAtt.getMaxNonCompetitiveBoost(); ...
protected void uninvert(final IndexReader reader, final BytesRef termPrefix) throws IOException { //System.out.println("DTO uninvert field=" + field + " prefix=" + termPrefix); final long startTime = System.currentTimeMillis(); prefix = termPrefix == null ? null : new BytesRef(termPrefix); final int ...
protected void uninvert(final IndexReader reader, final BytesRef termPrefix) throws IOException { //System.out.println("DTO uninvert field=" + field + " prefix=" + termPrefix); final long startTime = System.currentTimeMillis(); prefix = termPrefix == null ? null : BytesRef.deepCopyOf(termPrefix); fin...
public SeekStatus seekCeil(BytesRef term, boolean useCache) throws IOException { queue.clear(); numTop = 0; lastSeekExact = false; boolean seekOpt = false; if (lastSeek != null && termComp.compare(lastSeek, term) <= 0) { seekOpt = true; } lastSeekScratch.copy(term); lastSeek = ...
public SeekStatus seekCeil(BytesRef term, boolean useCache) throws IOException { queue.clear(); numTop = 0; lastSeekExact = false; boolean seekOpt = false; if (lastSeek != null && termComp.compare(lastSeek, term) <= 0) { seekOpt = true; } lastSeekScratch.copyBytes(term); lastSe...
protected BytesRef nextSeekTerm(final BytesRef term) throws IOException { //System.out.println("ATE.nextSeekTerm term=" + term); if (term == null) { assert seekBytesRef.length == 0; // return the empty term, as its valid if (runAutomaton.isAccept(runAutomaton.getInitialState())) { ...
protected BytesRef nextSeekTerm(final BytesRef term) throws IOException { //System.out.println("ATE.nextSeekTerm term=" + term); if (term == null) { assert seekBytesRef.length == 0; // return the empty term, as its valid if (runAutomaton.isAccept(runAutomaton.getInitialState())) { ...
private boolean checkDeleteTerm(Term term) { if (term != null) { assert lastDeleteTerm == null || term.compareTo(lastDeleteTerm) > 0: "lastTerm=" + lastDeleteTerm + " vs term=" + term; } // TODO: we re-use term now in our merged iterable, but we shouldn't clone, instead copy for this assert last...
private boolean checkDeleteTerm(Term term) { if (term != null) { assert lastDeleteTerm == null || term.compareTo(lastDeleteTerm) > 0: "lastTerm=" + lastDeleteTerm + " vs term=" + term; } // TODO: we re-use term now in our merged iterable, but we shouldn't clone, instead copy for this assert last...
public void startTerm(BytesRef term, int freq) throws IOException { final int prefix = StringHelper.bytesDifference(lastTerm.bytes, lastTerm.offset, lastTerm.length, term.bytes, term.offset, term.length); final int suffix = term.length - prefix; tvf.wri...
public void startTerm(BytesRef term, int freq) throws IOException { final int prefix = StringHelper.bytesDifference(lastTerm.bytes, lastTerm.offset, lastTerm.length, term.bytes, term.offset, term.length); final int suffix = term.length - prefix; tvf.wri...
// this new arc is private to this new input; set its // arc output to the leftover output: frontier[prefixLenPlus1-1].setLastOutput(input.ints[input.offset + prefixLenPlus1-1], output); } // save last input lastInput.copy(input); //System.out.println(" count[0]=" + frontier[0].inpu...
// this new arc is private to this new input; set its // arc output to the leftover output: frontier[prefixLenPlus1-1].setLastOutput(input.ints[input.offset + prefixLenPlus1-1], output); } // save last input lastInput.copyInts(input); //System.out.println(" count[0]=" + frontier[0]....
private boolean setPrevious(CharsRef current) { // don't need to copy, once we fix https://issues.apache.org/jira/browse/LUCENE-3277 // still, called only from assert previous = new CharsRef(current); return true;
private boolean setPrevious(CharsRef current) { // don't need to copy, once we fix https://issues.apache.org/jira/browse/LUCENE-3277 // still, called only from assert previous = CharsRef.deepCopyOf(current); return true;
public CharsRef indexedToReadable(BytesRef input, CharsRef charsRef) { // TODO: this could be more efficient, but the sortable types should be deprecated instead final char[] indexedToReadable = indexedToReadable(input.utf8ToChars(charsRef).toString()).toCharArray(); charsRef.copy(indexedToReadable, 0, in...
public CharsRef indexedToReadable(BytesRef input, CharsRef charsRef) { // TODO: this could be more efficient, but the sortable types should be deprecated instead final char[] indexedToReadable = indexedToReadable(input.utf8ToChars(charsRef).toString()).toCharArray(); charsRef.copyChars(indexedToReadable, ...
public CharsRef indexedToReadable(BytesRef input, CharsRef charsRef) { // TODO: this could be more efficient, but the sortable types should be deprecated instead input.utf8ToChars(charsRef); final char[] indexedToReadable = indexedToReadable(charsRef.toString()).toCharArray(); charsRef.copy(indexedToR...
public CharsRef indexedToReadable(BytesRef input, CharsRef charsRef) { // TODO: this could be more efficient, but the sortable types should be deprecated instead input.utf8ToChars(charsRef); final char[] indexedToReadable = indexedToReadable(charsRef.toString()).toCharArray(); charsRef.copyChars(index...
private BytesRef analyzeRangePart(String field, String part) { TokenStream source; try { source = analyzer.tokenStream(field, new StringReader(part)); source.reset(); } catch (IOException e) { throw new RuntimeException("Unable to initialize TokenStream to analyze range part: " + ...
private BytesRef analyzeRangePart(String field, String part) { TokenStream source; try { source = analyzer.tokenStream(field, new StringReader(part)); source.reset(); } catch (IOException e) { throw new RuntimeException("Unable to initialize TokenStream to analyze range part: " + ...
public Query parse() throws ParseException { String fname = localParams.get(QueryParsing.F); FieldType ft = req.getSchema().getFieldTypeNoEx(fname); String val = localParams.get(QueryParsing.V); BytesRef term = new BytesRef(); if (ft != null) { ft.readableToIndexe...
public Query parse() throws ParseException { String fname = localParams.get(QueryParsing.F); FieldType ft = req.getSchema().getFieldTypeNoEx(fname); String val = localParams.get(QueryParsing.V); BytesRef term = new BytesRef(); if (ft != null) { ft.readableToIndexe...
public DocSet getDocSet(DocsEnumState deState) throws IOException { int largestPossible = deState.termsEnum.docFreq(); boolean useCache = filterCache != null && largestPossible >= deState.minSetSizeCached; TermQuery key = null; if (useCache) { key = new TermQuery(new Term(deState.fieldName, new...
public DocSet getDocSet(DocsEnumState deState) throws IOException { int largestPossible = deState.termsEnum.docFreq(); boolean useCache = filterCache != null && largestPossible >= deState.minSetSizeCached; TermQuery key = null; if (useCache) { key = new TermQuery(new Term(deState.fieldName, Byt...
public NamedList<Integer> getFacetTermEnumCounts(SolrIndexSearcher searcher, DocSet docs, String field, int offset, int limit, int mincount, boolean missing, String sort, String prefix) throws IOException { /* :TODO: potential optimization... * cache the Terms with the highest docFreq and try them first ...
public NamedList<Integer> getFacetTermEnumCounts(SolrIndexSearcher searcher, DocSet docs, String field, int offset, int limit, int mincount, boolean missing, String sort, String prefix) throws IOException { /* :TODO: potential optimization... * cache the Terms with the highest docFreq and try them first ...
protected void visitTerm(TermsEnum te, int termNum) throws IOException { if (termNum >= maxTermCounts.length) { // resize by doubling - for very large number of unique terms, expanding // by 4K and resultant GC will dominate uninvert times. Resize at end if material int[] newMaxTermCounts = ne...
protected void visitTerm(TermsEnum te, int termNum) throws IOException { if (termNum >= maxTermCounts.length) { // resize by doubling - for very large number of unique terms, expanding // by 4K and resultant GC will dominate uninvert times. Resize at end if material int[] newMaxTermCounts = ne...
public void process(ResponseBuilder rb) throws IOException { SolrParams params = rb.req.getParams(); if (!params.getBool(TermsParams.TERMS, false)) return; String[] fields = params.getParams(TermsParams.TERMS_FIELD); NamedList<Object> termsResult = new SimpleOrderedMap<Object>(); rb.rsp.add("ter...
public void process(ResponseBuilder rb) throws IOException { SolrParams params = rb.req.getParams(); if (!params.getBool(TermsParams.TERMS, false)) return; String[] fields = params.getParams(TermsParams.TERMS_FIELD); NamedList<Object> termsResult = new SimpleOrderedMap<Object>(); rb.rsp.add("ter...
protected Set<BytesRef> getQueryTokenSet(String query, Analyzer analyzer) { try { final Set<BytesRef> tokens = new HashSet<BytesRef>(); final TokenStream tokenStream = analyzer.tokenStream("", new StringReader(query)); final TermToBytesRefAttribute bytesAtt = tokenStream.getAttribute(TermToBytes...
protected Set<BytesRef> getQueryTokenSet(String query, Analyzer analyzer) { try { final Set<BytesRef> tokens = new HashSet<BytesRef>(); final TokenStream tokenStream = analyzer.tokenStream("", new StringReader(query)); final TermToBytesRefAttribute bytesAtt = tokenStream.getAttribute(TermToBytes...
public Weight createWeight(IndexSearcher searcher) throws IOException { throw new UnsupportedOperationException(); }
public Weight createWeight(IndexSearcher searcher) throws IOException { throw new UnsupportedOperationException("Query " + this + " does not implement createWeight"); }
public void testDerby4095OldTriggerRows() throws SQLException { Statement s = createStatement(); s.executeUpdate("CREATE TABLE APP.TAB (I INT)"); s.executeUpdate("CREATE TABLE APP.LOG (I INT, NAME VARCHAR(30), DELTIME TIMESTAMP)"); s.executeUpdate("CREATE TABLE APP.NAMES(ID ...
public void testDerby4095OldTriggerRows() throws SQLException { Statement s = createStatement(); s.executeUpdate("CREATE TABLE APP.TAB (I INT)"); s.executeUpdate("CREATE TABLE APP.LOG (I INT, NAME VARCHAR(30), DELTIME TIMESTAMP)"); s.executeUpdate("CREATE TABLE APP.NAMES(ID ...
public class RowTriggerExecutor extends GenericTriggerExecutor /* Derby - Class org.apache.derby.impl.sql.execute.RowTriggerExecutor Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional informatio...
public class RowTriggerExecutor extends GenericTriggerExecutor /* Derby - Class org.apache.derby.impl.sql.execute.RowTriggerExecutor Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional informatio...
public class StatementTriggerExecutor extends GenericTriggerExecutor /* Derby - Class org.apache.derby.impl.sql.execute.StatementTriggerExecutor Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additiona...
public class StatementTriggerExecutor extends GenericTriggerExecutor /* Derby - Class org.apache.derby.impl.sql.execute.StatementTriggerExecutor Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additiona...
public void stop() { boolean OK = false; if (rawStoreFactory != null) { DaemonService rawStoreDaemon = rawStoreFactory.getDaemon(); if (rawStoreDaemon != null) rawStoreDaemon.stop(); } boolean logBootTrace = PropertyUtil.getSystemBoolean(Property.LOG_BOOT_TRACE); istream.println(LINE); l...
public void stop() { boolean OK = false; if (rawStoreFactory != null) { DaemonService rawStoreDaemon = rawStoreFactory.getDaemon(); if (rawStoreDaemon != null) rawStoreDaemon.stop(); } boolean logBootTrace = PropertyUtil.getSystemBoolean(Property.LOG_BOOT_TRACE); logMsg(LINE); logMsg("\n...
public int run(String[] args) throws Exception { addInputOption(); addOutputOption(); addOption("numRecommendations", "n", "Number of recommendations per user", String.valueOf(AggregateAndRecommendReducer.DEFAULT_NUM_RECOMMENDATIONS)); addOption("usersFile", null, "File of users to recommend ...
public int run(String[] args) throws Exception { addInputOption(); addOutputOption(); addOption("numRecommendations", "n", "Number of recommendations per user", String.valueOf(AggregateAndRecommendReducer.DEFAULT_NUM_RECOMMENDATIONS)); addOption("usersFile", null, "File of users to recommend ...
public void testEmptyDirRollback() throws Exception { // Tests that if IW is created over an empty Directory, some documents are // indexed, flushed (but not committed) and then IW rolls back, then no // files are left in the Directory. Directory dir = newDirectory(); IndexWriter writer = new Inde...
public void testEmptyDirRollback() throws Exception { // Tests that if IW is created over an empty Directory, some documents are // indexed, flushed (but not committed) and then IW rolls back, then no // files are left in the Directory. Directory dir = newDirectory(); IndexWriter writer = new Inde...
public int run(String[] args) throws Exception { addInputOption(); addOutputOption(); addOption("numRecommendations", "n", "Number of recommendations per user", String.valueOf(AggregateAndRecommendReducer.DEFAULT_NUM_RECOMMENDATIONS)); addOption("usersFile", null, "File of users to recomm...
public int run(String[] args) throws Exception { addInputOption(); addOutputOption(); addOption("numRecommendations", "n", "Number of recommendations per user", String.valueOf(AggregateAndRecommendReducer.DEFAULT_NUM_RECOMMENDATIONS)); addOption("usersFile", null, "File of users to recomm...
private static float[] getFloats(FileFloatSource ffs, IndexReader reader) { float[] vals = new float[reader.maxDoc()]; if (ffs.defVal != 0) { Arrays.fill(vals, ffs.defVal); } InputStream is; String fname = "external_" + ffs.field.getName(); try { is = VersionedFile.getLatestFile(ff...
private static float[] getFloats(FileFloatSource ffs, IndexReader reader) { float[] vals = new float[reader.maxDoc()]; if (ffs.defVal != 0) { Arrays.fill(vals, ffs.defVal); } InputStream is; String fname = "external_" + ffs.field.getName(); try { is = VersionedFile.getLatestFile(ff...
public AriesApplicationContext install(AriesApplication app) throws BundleException, ManagementException, ResolverException { if (!app.isResolved()) { app = resolve(app); } // Register an Application Repository for this application Dictionary dict = new Hashtable(); dict.put(Applicati...
public AriesApplicationContext install(AriesApplication app) throws BundleException, ManagementException, ResolverException { if (!app.isResolved()) { app = resolve(app); } // Register an Application Repository for this application Dictionary dict = new Hashtable(); dict.put(Applicati...
public UUID getVersion() { return newVersion; } /** * Definitions are serialized as a row with a UUID key, with a magical column named DEFINITION_SCHEMA_COLUMN_NAME * (containing the Avro Schema) and a column per keyspace. Each keyspace column contains a avro.KsDef object * encod...
public UUID getVersion() { return newVersion; } /** * Definitions are serialized as a row with a UUID key, with a magical column named DEFINITION_SCHEMA_COLUMN_NAME * (containing the Avro Schema) and a column per keyspace. Each keyspace column contains a avro.KsDef object * encod...
public SchemaField getField(String fieldName) { SchemaField f = fields.get(fieldName); if (f != null) return f; for (DynamicField df : dynamicFields) { if (df.matches(fieldName)) return df.makeSchemaField(fieldName); } // Hmmm, default field could also be implemented with a dynamic field ...
public SchemaField getField(String fieldName) { SchemaField f = fields.get(fieldName); if (f != null) return f; for (DynamicField df : dynamicFields) { if (df.matches(fieldName)) return df.makeSchemaField(fieldName); } // Hmmm, default field could also be implemented with a dynamic field ...
public void close() throws SQLException { // JDK 1.4 javadoc indicates close on a closed connection is a no-op if (!isClosed() && (rootConnection == this) && (!autoCommit && !transactionIsIdle())) { throw newSQLException( SQLState.LANG_INVALID_TRANSACTION_STATE); } close(exceptionClose); ...
public void close() throws SQLException { // JDK 1.4 javadoc indicates close on a closed connection is a no-op if (!isClosed() && (rootConnection == this) && (!autoCommit && !transactionIsIdle())) { throw newSQLException( SQLState.CANNOT_CLOSE_ACTIVE_CONNECTION); } close(exceptionClose); ...
public URL toURL() throws MalformedURLException { String entryURL = "jar:" + url + "!/" + getParent().getName() + getName(); URL result = new URL(entryURL); return result; }
public URL toURL() throws MalformedURLException { String entryURL = "jar:" + url + "!/" + getName(); URL result = new URL(entryURL); return result; }
public void lockRecordForRead( Latch latch, RecordHandle record, boolean forUpdate) throws StandardException; /** Request a write lock which will be released immediately upon grant. @param t Transaction to associate lock with. @param record ...
public void lockRecordForRead( Latch latch, RecordHandle record, boolean forUpdate) throws StandardException; /** Request a write lock which will be released immediately upon grant. @param t Transaction to associate lock with. @param record ...
public Term term() { return /*term == null ? null :*/ term.getTerm(); }
public Term term() { return term == null ? null : term.getTerm(); }
public static void testAfter() throws IOException { // create an index RAMDirectory indexStore = new RAMDirectory(); IndexWriter writer = new IndexWriter(indexStore, new SimpleAnalyzer(), true); long now = System.currentTimeMillis(); Document doc = new Document(); // add time that is i...
public static void testAfter() throws IOException { // create an index RAMDirectory indexStore = new RAMDirectory(); IndexWriter writer = new IndexWriter(indexStore, new SimpleAnalyzer(), true); long now = System.currentTimeMillis(); Document doc = new Document(); // add time that is i...
private int getConnFromDatabaseName() throws DRDAProtocolException { Properties p = new Properties(); databaseAccessException = null; //if we haven't got the correlation token yet, use session number for drdaID if (session.drdaID == null) session.drdaID = leftBrace + session.connNum + rightBrace; p.put(A...
private int getConnFromDatabaseName() throws DRDAProtocolException { Properties p = new Properties(); databaseAccessException = null; //if we haven't got the correlation token yet, use session number for drdaID if (session.drdaID == null) session.drdaID = leftBrace + session.connNum + rightBrace; p.put(A...
public boolean authenticateUser(String userName, String userPassword, String databaseName, Properties info ) { // Client security mechanism if any specified // Note: Right now it is only used to handle clients authenticating // via DRDA SECMEC_USRSSBPWD mech...
public boolean authenticateUser(String userName, String userPassword, String databaseName, Properties info ) { // Client security mechanism if any specified // Note: Right now it is only used to handle clients authenticating // via DRDA SECMEC_USRSSBPWD mech...
public void onAlive(InetAddress endpoint, EndpointState state) { if (!isClientMode && state.hasToken()) deliverHints(endpoint); }
public void onAlive(InetAddress endpoint, EndpointState state) { if (!isClientMode && StorageService.instance.getTokenMetadata().isMember(endpoint)) deliverHints(endpoint); }
protected Row getReduced() { Comparator<IColumn> colComparator = QueryFilter.getColumnComparator(comparator); Iterator<IColumn> colCollated = IteratorUtils.collatedIterator(colComparator, colIters); ColumnFamily returnCF = null; ...
protected Row getReduced() { Comparator<IColumn> colComparator = filter.filter.getColumnComparator(comparator); Iterator<IColumn> colCollated = IteratorUtils.collatedIterator(colComparator, colIters); ColumnFamily returnCF = null; ...
public void testQuestionmark() throws IOException { RAMDirectory indexStore = new RAMDirectory(); IndexWriter writer = new IndexWriter(indexStore, new SimpleAnalyzer(), true); Document doc1 = new Document(); Document doc2 = new Document(); Document doc3 = new Document();...
public void testQuestionmark() throws IOException { RAMDirectory indexStore = new RAMDirectory(); IndexWriter writer = new IndexWriter(indexStore, new SimpleAnalyzer(), true); Document doc1 = new Document(); Document doc2 = new Document(); Document doc3 = new Document();...
public static void beforeClass() throws Exception { initCore("solrConfig.xml", "schema.xml"); numberOfDocs = 0; for (String[] doc : DOCUMENTS) { assertNull(h.validateUpdate(adoc("id", Integer.toString(numberOfDocs), "url", doc[0], "title", doc[1], "snippet", doc[2]))); numberOfDocs++; } ...
public static void beforeClass() throws Exception { initCore("solrconfig.xml", "schema.xml"); numberOfDocs = 0; for (String[] doc : DOCUMENTS) { assertNull(h.validateUpdate(adoc("id", Integer.toString(numberOfDocs), "url", doc[0], "title", doc[1], "snippet", doc[2]))); numberOfDocs++; } ...
public static AbstractType getComparator(String tableName, String cfName) { assert tableName != null; CFMetaData cfmd = getCFMetaData(tableName, cfName); if (cfmd == null) throw new NullPointerException("Unknown ColumnFamily " + cfName + " in keyspace " + tableName); ...
public static AbstractType getComparator(String tableName, String cfName) { assert tableName != null; CFMetaData cfmd = getCFMetaData(tableName, cfName); if (cfmd == null) throw new IllegalArgumentException("Unknown ColumnFamily " + cfName + " in keyspace " + tableName); ...
public ChunkedWriter(Configuration conf, int chunkSizeInMB, Path output) throws IOException { this.output = output; this.conf = conf; if (chunkSizeInMB > 1984) { chunkSizeInMB = 1984; } maxChunkSizeInBytes = chunkSizeInMB * 1024 * 1024; fs = FileSystem.get(conf); currentChunkID = 0; ...
public ChunkedWriter(Configuration conf, int chunkSizeInMB, Path output) throws IOException { this.output = output; this.conf = conf; if (chunkSizeInMB > 1984) { chunkSizeInMB = 1984; } maxChunkSizeInBytes = chunkSizeInMB * 1024 * 1024; fs = FileSystem.get(output.toUri(), conf); curr...
public static final CharacterRunAutomaton SIMPLE = new CharacterRunAutomaton(new RegExp("[A-Za-zªµºÀ-ÖØ-öø-Z]+").toAutomaton());
public static final CharacterRunAutomaton SIMPLE = new CharacterRunAutomaton(new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ˁ]+").toAutomaton());
public void testImportDataExportQueryLobsInExtFile() throws SQLException, IOException { doExportQueryLobsToExtFile("select * from BOOKS", fileName, null, null, "8859_1", lobsFileName); doImportDataLobsFromExtFile(null, "BOOKS_IMP", null, null, fileName, ...
public void testImportDataExportQueryLobsInExtFile() throws SQLException, IOException { doExportQueryLobsToExtFile("select * from BOOKS", fileName, null, null, "8859_1", lobsFileName); doImportDataLobsFromExtFile(null, "BOOKS_IMP", null, null, fileName, ...
public ValueNode putAndsOnTop() throws StandardException { NodeFactory nodeFactory = getNodeFactory(); QueryTreeNode trueNode = nodeFactory.getNode( C_NodeTypes.BOOLEAN_CONSTANT_NODE, Boolean.TRUE, getContextManager()); AndNode andNode = (AndNode) nodeFactory.getNode(...
public ValueNode putAndsOnTop() throws StandardException { NodeFactory nodeFactory = getNodeFactory(); QueryTreeNode trueNode = (QueryTreeNode) nodeFactory.getNode( C_NodeTypes.BOOLEAN_CONSTANT_NODE, Boolean.TRUE, getContextManager()); AndNode andNode = (AndNode) node...
public ValueNode preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException { ValueNode leftClone1; ValueNode rightOperand; /* We must 1st preprocess the component parts */ super.preprocess(numTabl...
public ValueNode preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException { ValueNode leftClone1; ValueNode rightOperand; /* We must 1st preprocess the component parts */ super.preprocess(numTabl...
private int assertFiringOrder(String iud, int modifiedRowCount, boolean noAfter) { List fires = (List) TRIGGER_INFO.get(); int lastOrder = -1; String lastBefore = null; for (Iterator i = fires.iterator(); i.hasNext(); ) { String info = i.n...
private int assertFiringOrder(String iud, int modifiedRowCount, boolean noAfter) { List fires = (List) TRIGGER_INFO.get(); int lastOrder = -1; String lastBefore = null; for (Iterator i = fires.iterator(); i.hasNext(); ) { String info = i.n...
private void processOtherUser(Object id, Collection<Item> relevantItems,
private static void processOtherUser(Object id, Collection<Item> relevantItems,
private String limitMsg;
public void newFieldWithAccessors(String getter, String setter, int methodModifers, boolean staticField, String type) { String vmType = factory.type(type).vmName(); methodModifers |= Modifier.FINAL; // add a field, field has same name as get method int fieldModifiers = Modifier.PRIVATE; if (staticFiel...
public Collection<ColumnFamily> getColumnFamilies() { return modifications_.values(); } void addHints(RowMutation rm) throws IOException { for (ColumnFamily cf : rm.getColumnFamilies()) { byte[] combined = HintedHandOffManager.makeCombinedName(rm.getTable(), cf.m...
public Collection<ColumnFamily> getColumnFamilies() { return modifications_.values(); } void addHints(RowMutation rm) throws IOException { for (ColumnFamily cf : rm.getColumnFamilies()) { byte[] combined = HintedHandOffManager.makeCombinedName(rm.getTable(), cf.m...
protected static int mapJdbcTypeToDrdaType(int jdbcType, boolean nullable, AppRequester appRequester, int[] outlen) throws SQLException { int drdaType = 0; switch (jdbcType) { case Types.BOOLEAN: case java.sql.Types.BIT: case java.sql.Types.TINYINT: case java.sql.Types.SMALLINT: dr...
protected static int mapJdbcTypeToDrdaType(int jdbcType, boolean nullable, AppRequester appRequester, int[] outlen) throws SQLException { int drdaType = 0; switch (jdbcType) { case Types.BOOLEAN: case java.sql.Types.BIT: case java.sql.Types.TINYINT: case java.sql.Types.SMALLINT: dr...
private void describeKeySpace(String keySpaceName, KsDef metadata) throws TException { NodeProbe probe = sessionState.getNodeProbe(); // getting compaction manager MBean to displaying index building information CompactionManagerMBean compactionManagerMBean = (probe == null) ? null : pro...
private void describeKeySpace(String keySpaceName, KsDef metadata) throws TException { NodeProbe probe = sessionState.getNodeProbe(); // getting compaction manager MBean to displaying index building information CompactionManagerMBean compactionManagerMBean = (probe == null) ? null : pro...
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if( abortErrorMessage != null ) { ((HttpServletResponse)response).sendError( 500, abortErrorMessage ); return; } if (this.cores == null) { ((HttpServletRe...
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if( abortErrorMessage != null ) { ((HttpServletResponse)response).sendError( 500, abortErrorMessage ); return; } if (this.cores == null) { ((HttpServletRe...
private String getHostAddress(String host) throws IOException { if (host == null) { String hostaddress; try { hostaddress = InetAddress.getLocalHost().getHostAddress(); } catch (UnknownHostException e) { hostaddress = "127.0.0.1"; // cannot resolve system hostname, fall through ...
private String getHostAddress(String host) throws IOException { if (host == null || host.length() == 0) { String hostaddress; try { hostaddress = InetAddress.getLocalHost().getHostAddress(); } catch (UnknownHostException e) { hostaddress = "127.0.0.1"; // cannot resolve system h...
private Fields fields; /** @lucene.internal */ void storeFields(Fields fields) { this.fields = fields; } /** @lucene.internal */ Fields retrieveFields() { return fields; } }
private volatile Fields fields; /** @lucene.internal */ void storeFields(Fields fields) { this.fields = fields; } /** @lucene.internal */ Fields retrieveFields() { return fields; } }
public void testBuiltInFunctions() throws SQLException{ st = createStatement(); conn=getConnection(); conn.setAutoCommit(false); // built-in functions in a check constraint st.executeUpdate( "create table charTab (c1 char(4) check...
public void testBuiltInFunctions() throws SQLException{ st = createStatement(); conn=getConnection(); conn.setAutoCommit(false); // built-in functions in a check constraint st.executeUpdate( "create table charTab (c1 char(4) check...
public Object run() throws StandardException { switch( actionCode) { case GET_FILE_NAME_ACTION: return privGetFileName( actionIdentity, actionStub, actionErrorOK, actionTryAlternatePath); case CREATE_CONTAINER_ACTION: { StorageFile file = ...
public Object run() throws StandardException { switch( actionCode) { case GET_FILE_NAME_ACTION: return privGetFileName( actionIdentity, actionStub, actionErrorOK, actionTryAlternatePath); case CREATE_CONTAINER_ACTION: { StorageFile file = ...
public void removeOldVersionOfContainers() throws StandardException { // Find the old version of the container files and delete them. String[] files = dataFactory.getContainerNames(); if (files != null) { // Loop through all the files in seg0 and // delete...
public void removeOldVersionOfContainers() throws StandardException { // Find the old version of the container files and delete them. String[] files = dataFactory.getContainerNames(); if (files != null) { // Loop through all the files in seg0 and // delete...
public void testSize() { assertEquals("size", 3, getTestVector().getNumNondefaultElements()); }
public void testSize() { assertEquals("size", 3, getTestVector().getNumNonZeroElements()); }
public LocalizedOutput(OutputStream o, String enc) throws UnsupportedEncodingException { super(new OutputStreamWriter(o, enc), true); out = o; }
public LocalizedOutput(OutputStream o){ super(new OutputStreamWriter(o), true); out = o; } LocalizedOutput(OutputStream o, String enc) throws UnsupportedEncodingException { super(new OutputStreamWriter(o, enc), true); out = o; }
public void useExistingCollation(TableDescriptor td) throws StandardException { ColumnDescriptor cd; // First verify that the column exists cd = td.getColumnDescriptor(name); if (cd == null) { throw StandardException.newException(SQLState.LANG_COLUMN_NOT_FOUND_IN_TABLE, name, td.getName()); } ...
public void useExistingCollation(TableDescriptor td) throws StandardException { ColumnDescriptor cd; // First verify that the column exists cd = td.getColumnDescriptor(name); if (cd == null) { throw StandardException.newException(SQLState.LANG_COLUMN_NOT_FOUND_IN_TABLE, name, td.getName()); } ...
public static void main(String[] args) throws Throwable { int minRow; int maxRow; String rowPrefix, keyspace = "Keyspace1"; if (args.length > 0) { keyspace = args[0]; rowPrefix = args[1]; minRow = Integer.parseInt(args[2]); ...
public static void main(String[] args) throws Throwable { int minRow; int maxRow; String rowPrefix, keyspace = "Keyspace1"; if (args.length > 0) { keyspace = args[0]; rowPrefix = args[1]; minRow = Integer.parseInt(args[2]); ...
public void testRowIteration() throws IOException, ExecutionException, InterruptedException { Table table = Table.open(TABLE1); ColumnFamilyStore store = table.getColumnFamilyStore("Super3"); final int ROWS_PER_SSTABLE = 10; Set<DecoratedKey> inserted = new HashSet<DecoratedKey>...
public void testRowIteration() throws IOException, ExecutionException, InterruptedException { Table table = Table.open(TABLE1); ColumnFamilyStore store = table.getColumnFamilyStore("Super3"); final int ROWS_PER_SSTABLE = 10; Set<DecoratedKey> inserted = new HashSet<DecoratedKey>...
public void testTimeSort() throws IOException, ExecutionException, InterruptedException { Table table = Table.open("Keyspace1"); ColumnFamilyStore cfStore = table.getColumnFamilyStore("StandardLong1"); for (int i = 900; i < 1000; ++i) { RowMutation rm = new RowMutati...
public void testTimeSort() throws IOException, ExecutionException, InterruptedException { Table table = Table.open("Keyspace1"); ColumnFamilyStore cfStore = table.getColumnFamilyStore("StandardLong1"); for (int i = 900; i < 1000; ++i) { RowMutation rm = new RowMutati...
public void testCompactions() throws IOException, ExecutionException, InterruptedException { CompactionManager.instance.disableAutoCompaction(); // this test does enough rows to force multiple block indexes to be used Table table = Table.open(TABLE1); ColumnFamilyStore store = t...
public void testCompactions() throws IOException, ExecutionException, InterruptedException { CompactionManager.instance.disableAutoCompaction(); // this test does enough rows to force multiple block indexes to be used Table table = Table.open(TABLE1); ColumnFamilyStore store = t...
public void testManyColumns() throws IOException { ColumnFamily cf; TreeMap<String, String> map = new TreeMap<String, String>(); for (int i = 100; i < 1000; ++i) { map.put(Integer.toString(i), "Avinash Lakshman is a good man: " + i); } // write ...
public void testManyColumns() throws IOException { ColumnFamily cf; TreeMap<String, String> map = new TreeMap<String, String>(); for (int i = 100; i < 1000; ++i) { map.put(Integer.toString(i), "Avinash Lakshman is a good man: " + i); } // write ...
public void testDecode() throws IOException { ByteBuffer bytes = ByteBuffer.wrap(new byte[]{(byte)0xff, (byte)0xfe}); ByteBufferUtil.string(bytes, Charsets.UTF_8); }
public void testDecode() throws IOException { ByteBuffer bytes = ByteBuffer.wrap(new byte[]{(byte)0xff, (byte)0xfe}); ByteBufferUtil.string(bytes); }
public String asHex(String str) { return bytesToHex(ByteBuffer.wrap(str.getBytes())); }
public String asHex(String str) { return bytesToHex(ByteBufferUtil.bytes(str)); }
public ByteBuffer fromString(String source) { return ByteBuffer.wrap(source.getBytes(Charsets.US_ASCII)); }
public ByteBuffer fromString(String source) { return ByteBufferUtil.bytes(source, Charsets.US_ASCII); }
public void run(Cassandra.Client client) throws IOException { List<ByteBuffer> values = generateValues(); List<Column> columns = new ArrayList<Column>(); List<SuperColumn> superColumns = new ArrayList<SuperColumn>(); // format used for keys String format = "%0" + session...
public void run(Cassandra.Client client) throws IOException { List<ByteBuffer> values = generateValues(); List<Column> columns = new ArrayList<Column>(); List<SuperColumn> superColumns = new ArrayList<SuperColumn>(); // format used for keys String format = "%0" + session...
protected final Similarity similarity; PhraseScorer(Weight weight, PhraseQuery.PostingsAndFreq[] postings, Similarity similarity, byte[] norms) { super(weight); this.similarity = similarity; this.norms = norms; this.value = weight.getValue(); // convert tps to a list of phrase positions....
protected final Similarity similarity; PhraseScorer(Weight weight, PhraseQuery.PostingsAndFreq[] postings, Similarity similarity, byte[] norms) { super(weight); this.similarity = similarity; this.norms = norms; this.value = weight.getValue(); // convert tps to a list of phrase positions....
public void testRemoveColumnFamily() throws IOException, ExecutionException, InterruptedException { Table table = Table.open("Keyspace1"); ColumnFamilyStore store = table.getColumnFamilyStore("Standard1"); RowMutation rm; DecoratedKey dk = Util.dk("key1"); // add data ...
public void testRemoveColumnFamily() throws IOException, ExecutionException, InterruptedException { Table table = Table.open("Keyspace1"); ColumnFamilyStore store = table.getColumnFamilyStore("Standard1"); RowMutation rm; DecoratedKey dk = Util.dk("key1"); // add data ...
public void testRemoveSubColumn() throws IOException, ExecutionException, InterruptedException { Table table = Table.open("Keyspace1"); ColumnFamilyStore store = table.getColumnFamilyStore("Super1"); RowMutation rm; DecoratedKey dk = Util.dk("key1"); // add data ...
public void testRemoveSubColumn() throws IOException, ExecutionException, InterruptedException { Table table = Table.open("Keyspace1"); ColumnFamilyStore store = table.getColumnFamilyStore("Super1"); RowMutation rm; DecoratedKey dk = Util.dk("key1"); // add data ...
public void testRemoveColumnFamilyWithFlush1() throws IOException, ExecutionException, InterruptedException { Table table = Table.open("Keyspace1"); ColumnFamilyStore store = table.getColumnFamilyStore("Standard1"); RowMutation rm; DecoratedKey dk = Util.dk("key1"); // a...
public void testRemoveColumnFamilyWithFlush1() throws IOException, ExecutionException, InterruptedException { Table table = Table.open("Keyspace1"); ColumnFamilyStore store = table.getColumnFamilyStore("Standard1"); RowMutation rm; DecoratedKey dk = Util.dk("key1"); // a...
public void testRemoveColumnFamilyWithFlush2() throws IOException, ExecutionException, InterruptedException { Table table = Table.open("Keyspace1"); ColumnFamilyStore store = table.getColumnFamilyStore("Standard1"); RowMutation rm; DecoratedKey dk = Util.dk("key1"); // a...
public void testRemoveColumnFamilyWithFlush2() throws IOException, ExecutionException, InterruptedException { Table table = Table.open("Keyspace1"); ColumnFamilyStore store = table.getColumnFamilyStore("Standard1"); RowMutation rm; DecoratedKey dk = Util.dk("key1"); // a...
public boolean isEmpty() { boolean cfIrrelevant = ColumnFamilyStore.removeDeleted(emptyColumnFamily, gcBefore) == null; return cfIrrelevant && columnCount == 0; }
public boolean isEmpty() { boolean cfIrrelevant = ColumnFamilyStore.removeDeletedCF(emptyColumnFamily, gcBefore) == null; return cfIrrelevant && columnCount == 0; }
public EliasFanoEncoder(long numValues, long upperBound, long indexInterval) { if (numValues < 0L) { throw new IllegalArgumentException("numValues should not be negative: " + numValues); } this.numValues = numValues; if ((numValues > 0L) && (upperBound < 0L)) { throw new IllegalArgumentExc...
public EliasFanoEncoder(long numValues, long upperBound, long indexInterval) { if (numValues < 0L) { throw new IllegalArgumentException("numValues should not be negative: " + numValues); } this.numValues = numValues; if ((numValues > 0L) && (upperBound < 0L)) { throw new IllegalArgumentExc...
private boolean nodesEqual(Builder.UnCompiledNode<T> node, int address) throws IOException { fst.readFirstRealArc(address, scratchArc); if (scratchArc.bytesPerArc != 0 && node.numArcs != scratchArc.numArcs) { return false; } for(int arcUpto=0;arcUpto<node.numArcs;arcUpto++) { final Builder...
private boolean nodesEqual(Builder.UnCompiledNode<T> node, int address) throws IOException { fst.readFirstRealArc(address, scratchArc); if (scratchArc.bytesPerArc != 0 && node.numArcs != scratchArc.numArcs) { return false; } for(int arcUpto=0;arcUpto<node.numArcs;arcUpto++) { final Builder...
public static final String getJavaExecutableName() { String vmname = getSystemProperty("com.ibm.oti.vm.exe"); if (vmname == null) { vmname = getSystemProperty("java.vm.name"); // Sun phoneME if ("CVM".equals(vmname)) { vmname = getSystemProperty(...
public static final String getJavaExecutableName() { String vmname = getSystemProperty("com.ibm.oti.vm.exe"); if (vmname == null) { vmname = getSystemProperty("java.vm.name"); // Sun phoneME if ("CVM".equals(vmname)) { vmname = getSystemProperty(...