buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void bindStatement() throws StandardException { // We just need select privilege on the expressions getCompilerContext().pushCurrentPrivType( Authorizer.SELECT_PRIV); FromList fromList = (FromList) getNodeFactory().getNode( C_NodeTypes.FROM_LIST, getNodeFactory().doJoinOrderOptimizatio...
public void bindStatement() throws StandardException { // We just need select privilege on the expressions getCompilerContext().pushCurrentPrivType( Authorizer.SELECT_PRIV); FromList fromList = (FromList) getNodeFactory().getNode( C_NodeTypes.FROM_LIST, getNodeFactory().doJoinOrderOptimizatio...
private ResultSetNode addNewNodes() throws StandardException { ResultSetNode treeTop = this; /* Only call addNewNodes() once */ if (addNewNodesCalled) { return this; } addNewNodesCalled = true; /* RESOLVE - We'd like to generate any necessary NormalizeResultSets * above our children here, in ...
private ResultSetNode addNewNodes() throws StandardException { ResultSetNode treeTop = this; /* Only call addNewNodes() once */ if (addNewNodesCalled) { return this; } addNewNodesCalled = true; /* RESOLVE - We'd like to generate any necessary NormalizeResultSets * above our children here, in ...
public void testSurrogatesOrder() throws Exception { Directory dir = newDirectory(); RandomIndexWriter w = new RandomIndexWriter(random(), dir, newIndexWriterConfig( TEST_VERSION_CURRENT, ...
public void testSurrogatesOrder() throws Exception { Directory dir = newDirectory(); RandomIndexWriter w = new RandomIndexWriter(random(), dir, newIndexWriterConfig( TEST_VERSION_CURRENT, ...
public void freeSection(Section section, int resultSetHoldability) { if (resultSetHoldability == org.apache.derby.jdbc.ClientDataSource.HOLD_CURSORS_OVER_COMMIT) { this.freeSectionsHold_.push(section); } else if (resultSetHoldability == org.apache.derby.jdbc.ClientDataSource.CLOSE_CURSOR...
public void freeSection(Section section, int resultSetHoldability) { if (resultSetHoldability == org.apache.derby.jdbc.ClientDataSource.HOLD_CURSORS_OVER_COMMIT) { this.freeSectionsHold_.push(section); } else if (resultSetHoldability == org.apache.derby.jdbc.ClientDataSource.CLOSE_CURSOR...
public final Object run() throws Exception { switch( actionCode) { case BOOT_ACTION: readOnly = storageFactory.isReadOnlyDatabase(); supportsRandomAccess = storageFactory.supportsRandomAccess(); return null; case GET_TEMP_DIRECTORY...
public final Object run() throws Exception { switch( actionCode) { case BOOT_ACTION: readOnly = storageFactory.isReadOnlyDatabase(); supportsRandomAccess = storageFactory.supportsRandomAccess(); return null; case GET_TEMP_DIRECTORY...
private static Test attributesDatabase( final Properties attributes, Test test) { test = new ChangeConfigurationSetup(test) { TestConfiguration getNewConfiguration(TestConfiguration old) { return old.addConnectionAttributes(attributes); } }; ...
public static Test attributesDatabase( final Properties attributes, Test test) { test = new ChangeConfigurationSetup(test) { TestConfiguration getNewConfiguration(TestConfiguration old) { return old.addConnectionAttributes(attributes); } }; ...
public void testBoostsSimple() throws Exception { Map<CharSequence,Float> boosts = new HashMap<CharSequence,Float>(); boosts.put("b", Float.valueOf(5)); boosts.put("t", Float.valueOf(10)); String[] fields = { "b", "t" }; MultiFieldQueryParserWrapper mfqp = new MultiFieldQueryParserWrapper( ...
public void testBoostsSimple() throws Exception { Map<String,Float> boosts = new HashMap<String,Float>(); boosts.put("b", Float.valueOf(5)); boosts.put("t", Float.valueOf(10)); String[] fields = { "b", "t" }; MultiFieldQueryParserWrapper mfqp = new MultiFieldQueryParserWrapper( fields, new...
public void testBoostsSimple() throws Exception { Map<CharSequence,Float> boosts = new HashMap<CharSequence,Float>(); boosts.put("b", Float.valueOf(5)); boosts.put("t", Float.valueOf(10)); String[] fields = { "b", "t" }; StandardQueryParser mfqp = new StandardQueryParser(); mfqp.setMultiFields...
public void testBoostsSimple() throws Exception { Map<String,Float> boosts = new HashMap<String,Float>(); boosts.put("b", Float.valueOf(5)); boosts.put("t", Float.valueOf(10)); String[] fields = { "b", "t" }; StandardQueryParser mfqp = new StandardQueryParser(); mfqp.setMultiFields(fields); ...
public void testTransferOfMultipleColumnFamilies() throws Exception { String keyspace = "Keyspace1"; IPartitioner p = StorageService.getPartitioner(); String[] columnFamilies = new String[] { "Standard1", "Standard2", "Standard3" }; List<SSTableReader> ssTableReaders = new ArrayL...
public void testTransferOfMultipleColumnFamilies() throws Exception { String keyspace = "Keyspace1"; IPartitioner p = StorageService.getPartitioner(); String[] columnFamilies = new String[] { "Standard1", "Standard2", "Standard3" }; List<SSTableReader> ssTableReaders = new ArrayL...
public static int getTypeAsInt( Agent agent, SQLType sqlType ) throws SQLException { // must correspond to something in java.sql.Types if ( sqlType instanceof JDBCType ) { return ((JDBCType) sqlType).getVendorTypeNumber(); } throw new SqlException ...
public static int getTypeAsInt( Agent agent, SQLType sqlType ) throws SQLException { // must correspond to something in java.sql.Types if ( sqlType instanceof JDBCType ) { return ((JDBCType) sqlType).getVendorTypeNumber(); } throw new SqlException ...
public static int getTypeAsInt( ConnectionChild connChild, SQLType sqlType ) throws SQLException { // must correspond to something in java.sql.Types if ( sqlType instanceof JDBCType ) { int jdbcType = ((JDBCType) sqlType).getVendorTypeNumber(); ...
public static int getTypeAsInt( ConnectionChild connChild, SQLType sqlType ) throws SQLException { // must correspond to something in java.sql.Types if ( sqlType instanceof JDBCType ) { int jdbcType = ((JDBCType) sqlType).getVendorTypeNumber(); ...
public UserAdminMBeanHandler(JMXAgentContext agentContext) { super(agentContext, org.osgi.service.useradmin.UserAdmin.class.getCanonicalName()); }
public UserAdminMBeanHandler(JMXAgentContext agentContext) { super(agentContext, "org.osgi.service.useradmin.UserAdmin"); }
public void start() { logger.log(LogService.LOG_INFO, "Starting JMX OSGi agent"); BundleContext bc = agentContext.getBundleContext(); MBeanHandler frameworkHandler = new FrameworkMBeanHandler(bc, logger); frameworkHandler.open(); mbeansHandlers.add(frameworkHandler); ...
public void start() { logger.log(LogService.LOG_INFO, "Starting JMX OSGi agent"); BundleContext bc = agentContext.getBundleContext(); MBeanHandler frameworkHandler = new FrameworkMBeanHandler(bc, logger); frameworkHandler.open(); mbeansHandlers.add(frameworkHandler); ...
public static void configureWithClusterInfo(Configuration conf, Path clusterPath, Collection<Cluster> clusters) { for (Writable value : new SequenceFileDirValueIterable<Writable>(clusterPath, PathType.LIST, PathFilters.partFilter(), conf)) { Class<? extends Writable> valueClass = value.getClass(); ...
public static void configureWithClusterInfo(Configuration conf, Path clusterPath, Collection<Cluster> clusters) { for (Writable value : new SequenceFileDirValueIterable<Writable>(clusterPath, PathType.LIST, PathFilters.partFilter(), conf)) { Class<? extends Writable> valueClass = value.getClass(); ...
public int hashCode() { int h = include.hashCode(); h = (h<<1) | (h >>> 31); // rotate left h ^= include.hashCode(); h = (h<<1) | (h >>> 31); // rotate left h ^= Float.floatToRawIntBits(getBoost()); return h; }
public int hashCode() { int h = include.hashCode(); h = (h<<1) | (h >>> 31); // rotate left h ^= exclude.hashCode(); h = (h<<1) | (h >>> 31); // rotate left h ^= Float.floatToRawIntBits(getBoost()); return h; }
public static void scrubDataDirectories(String table, String columnFamily) { logger.info("Removing compacted SSTable files (see http://wiki.apache.org/cassandra/MemtableSSTable)"); for (Map.Entry<Descriptor,Set<Component>> sstableFiles : files(table, columnFamily, true, true).entrySet()) ...
public static void scrubDataDirectories(String table, String columnFamily) { logger.info("Removing compacted SSTable files from " + columnFamily + " (see http://wiki.apache.org/cassandra/MemtableSSTable)"); for (Map.Entry<Descriptor,Set<Component>> sstableFiles : files(table, columnFamily, true,...
public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { // If the DML is on the temporary table, generate the code to // mark temporary table as modified in the current UOW. After // DERBY-827 this must be done in execute() since // fillResultSet() will onl...
public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { // If the DML is on the temporary table, generate the code to // mark temporary table as modified in the current UOW. After // DERBY-827 this must be done in execute() since // fillResultSet() will onl...
public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { // If the DML is on the temporary table, generate the code to // mark temporary table as modified in the current UOW. After // DERBY-827 this must be done in execute() since // fillResultSet() will onl...
public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { // If the DML is on the temporary table, generate the code to // mark temporary table as modified in the current UOW. After // DERBY-827 this must be done in execute() since // fillResultSet() will onl...
public void testDistributedLanczosSolverCLI() throws Exception { Path testData = getTestTempDirPath("testdata"); DistributedRowMatrix corpus = new TestDistributedRowMatrix().randomDistributedMatrix(500, 450, 500, 10, 10.0, true, testData.toString()); corpus.setConf(new Configuration()); Path o...
public void testDistributedLanczosSolverCLI() throws Exception { Path testData = getTestTempDirPath("testdata"); DistributedRowMatrix corpus = new TestDistributedRowMatrix().randomDistributedMatrix(500, 450, 500, 10, 10.0, true, testData.toString()); corpus.setConf(new Configuration()); Path o...
public synchronized void waitForConnected(long waitForConnection) throws TimeoutException { log.info("Waiting for client to connect to ZooKeeper"); long expire = System.currentTimeMillis() + waitForConnection; long left = 1; while (!connected && left > 0) { if (isClosed) { break; ...
public synchronized void waitForConnected(long waitForConnection) throws TimeoutException { log.info("Waiting for client to connect to ZooKeeper"); long expire = System.currentTimeMillis() + waitForConnection; long left = 1; while (!connected && left > 0) { if (isClosed) { break; ...
public SolrConfig(String instanceDir, String name, InputStream is) throws ParserConfigurationException, IOException, SAXException { this(new SolrResourceLoader(instanceDir), name, is); } /** Creates a configuration instance from a resource loader, a configuration name and a stream. * If the stream is...
public SolrConfig(String instanceDir, String name, InputStream is) throws ParserConfigurationException, IOException, SAXException { this(new SolrResourceLoader(instanceDir), name, is); } /** Creates a configuration instance from a resource loader, a configuration name and a stream. * If the stream is...
public void init() throws Exception { properties = new Properties(); if (locations != null) { for (URL url : locations) { InputStream is = null; try { is = url.openStream(); } catch (IOException e) { ...
public void init() throws Exception { properties = new Properties(); if (locations != null) { for (URL url : locations) { InputStream is = null; try { is = url.openStream(); } catch (IOException e) { ...
private final void switchCurrentBuffer() throws IOException { if (currentBufferIndex == file.buffers.size()) { currentBuffer = file.addBuffer(BUFFER_SIZE); } else { currentBuffer = (byte[]) file.buffers.get(currentBufferIndex); } bufferPosition = 0; bufferStart = BUFFER_SIZE * currentB...
private final void switchCurrentBuffer() throws IOException { if (currentBufferIndex == file.buffers.size()) { currentBuffer = file.addBuffer(BUFFER_SIZE); } else { currentBuffer = (byte[]) file.buffers.get(currentBufferIndex); } bufferPosition = 0; bufferStart = (long) BUFFER_SIZE * (...
private static String toString(Reader input) throws IOException { try { int len = 256; char[] buffer = new char[len]; char[] output = new char[len]; len = 0; int n; while ((n = input.read(buffer)) >= 0) { if (len + n > output.length) { // grow capacity ...
private static String toString(Reader input) throws IOException { try { int len = 256; char[] buffer = new char[len]; char[] output = new char[len]; len = 0; int n; while ((n = input.read(buffer)) >= 0) { if (len + n > output.length) { // grow capacity ...
public static Test suite () { return TestConfiguration.embeddedSuite ( BlobUpdateableStreamTest.class); }
public static Test suite () { return TestConfiguration.defaultSuite ( BlobUpdateableStreamTest.class); }
public static Test suite() { TestSuite ts = new TestSuite ("ClobUpdateableReaderTest"); ts.addTest(TestConfiguration.embeddedSuite( ClobUpdateableReaderTest.class)); TestSuite encSuite = new TestSuite ("ClobUpdateableReaderTest:encrypted"); encSuite.addTestSuite (...
public static Test suite() { TestSuite ts = new TestSuite ("ClobUpdateableReaderTest"); ts.addTest(TestConfiguration.defaultSuite( ClobUpdateableReaderTest.class)); TestSuite encSuite = new TestSuite ("ClobUpdateableReaderTest:encrypted"); encSuite.addTestSuite (C...
public void testCosineKlusterClassification() { ClusterClassifier classifier = newCosineKlusterClassifier(); Vector pdf = classifier.classify(new DenseVector(2)); assertEquals("[0,0]", "[0.333, 0.333, 0.333]", AbstractCluster.formatVector(pdf, null)); pdf = classifier.classify(new DenseVector(2).assig...
public void testCosineKlusterClassification() { ClusterClassifier classifier = newCosineKlusterClassifier(); Vector pdf = classifier.classify(new DenseVector(2)); assertEquals("[0,0]", "[0.333, 0.333, 0.333]", AbstractCluster.formatVector(pdf, null)); pdf = classifier.classify(new DenseVector(2).assig...
public void doTest() throws Exception { // setLoggingLevel(null); del("*:*"); indexr(id,1, i1, 100, tlong, 100,t1,"now is the time for all good men" ,"foo_f", 1.414f, "foo_b", "true", "foo_d", 1.414d); indexr(id,2, i1, 50 , tlong, 50,t1,"to come to the aid of their country." ); i...
public void doTest() throws Exception { // setLoggingLevel(null); del("*:*"); indexr(id,1, i1, 100, tlong, 100,t1,"now is the time for all good men" ,"foo_f", 1.414f, "foo_b", "true", "foo_d", 1.414d); indexr(id,2, i1, 50 , tlong, 50,t1,"to come to the aid of their country." ); i...
private void testDebugQueries() throws Exception { handle.put("explain", UNORDERED); handle.put("debug", UNORDERED); handle.put("time", SKIPVAL); query("q", "now their fox sat had put", "fl", "*,score", CommonParams.DEBUG_QUERY, "true"); query("q", "id:[1 TO 5]", CommonParams.DEBUG_QUERY, ...
private void testDebugQueries() throws Exception { handle.put("explain", SKIPVAL); handle.put("debug", UNORDERED); handle.put("time", SKIPVAL); query("q", "now their fox sat had put", "fl", "*,score", CommonParams.DEBUG_QUERY, "true"); query("q", "id:[1 TO 5]", CommonParams.DEBUG_QUERY, "t...
private static void ignoreObsoleteMutations(ColumnFamily cf, SortedSet<ByteBuffer> mutatedIndexedColumns, ColumnFamily oldIndexedColumns) { if (oldIndexedColumns == null) return; for (Iterator<ByteBuffer> iter = mutatedIndexedColumns.iterator(); iter.hasNext(); ) { ...
private static void ignoreObsoleteMutations(ColumnFamily cf, SortedSet<ByteBuffer> mutatedIndexedColumns, ColumnFamily oldIndexedColumns) { if (oldIndexedColumns == null) return; for (Iterator<ByteBuffer> iter = mutatedIndexedColumns.iterator(); iter.hasNext(); ) { ...
public static void main(String[] args) throws IOException { if (args.length == 7) { String input = args[0]; String output = args[1]; String measureClass = args[2]; double t1 = Double.parseDouble(args[3]); double t2 = Double.parseDouble(args[4]); double convergenceDelta = Double...
public static void main(String[] args) throws IOException { if (args.length == 7) { String input = args[0]; String output = args[1]; String measureClass = args[2]; double t1 = Double.parseDouble(args[3]); double t2 = Double.parseDouble(args[4]); double convergenceDelta = Double...
private static ContextProvider getInitialContextUsingBuilder(BundleContext context, Hashtable<?, ?> environment) throws NamingException { ContextProvider provider = null; ServiceReference[] refs = Activator.getInitialContex...
private static ContextProvider getInitialContextUsingBuilder(BundleContext context, Hashtable<?, ?> environment) throws NamingException { ContextProvider provider = null; ServiceReference[] refs = Activator.getInitialContex...
private FieldInfos fieldInfos; long size;
private InputStream input; FieldInfos fieldInfos; long size;
public TestBlueprintContainer(ComponentDefinitionRegistryImpl registry, ProxyManager proxyManager) throws Exception { super(new TestBundleContext(), null, null, null, null, null, proxyManager); this.registry = registry; if (registry != null) { registry.registerComponentDefinition...
public TestBlueprintContainer(ComponentDefinitionRegistryImpl registry, ProxyManager proxyManager) throws Exception { super(new TestBundleContext(), null, null, null, null, null, null, proxyManager); this.registry = registry; if (registry != null) { registry.registerComponentDefi...
private ServerSocket getServerSocket(InetAddress localEp) throws IOException, ConfigurationException { final ServerSocket ss; if (DatabaseDescriptor.getEncryptionOptions().internode_encryption == EncryptionOptions.InternodeEncryption.all) { ss = SSLFactory.getServerSocket(Dat...
private ServerSocket getServerSocket(InetAddress localEp) throws IOException, ConfigurationException { final ServerSocket ss; if (DatabaseDescriptor.getEncryptionOptions() != null && DatabaseDescriptor.getEncryptionOptions().internode_encryption == EncryptionOptions.InternodeEncryption.all) ...
public List<Clause> splitIntoClauses(String s, boolean ignoreQuote) { ArrayList<Clause> lst = new ArrayList<Clause>(4); Clause clause; int pos=0; int end=s.length(); char ch=0; int start; boolean disallowUserField; while (pos < end) { clause = new Clause(); disallowUse...
public List<Clause> splitIntoClauses(String s, boolean ignoreQuote) { ArrayList<Clause> lst = new ArrayList<Clause>(4); Clause clause; int pos=0; int end=s.length(); char ch=0; int start; boolean disallowUserField; while (pos < end) { clause = new Clause(); disallowUse...
private void addDoc(RAMDirectory ramDir1, String s, boolean create) throws IOException { IndexWriter iw = new IndexWriter(ramDir1, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), create, IndexWriter.MaxFieldLength.LIMITED); Document doc = new Document(); doc.add(new Field("body", s, F...
private void addDoc(RAMDirectory ramDir1, String s, boolean create) throws IOException { IndexWriter iw = new IndexWriter(ramDir1, new StandardAnalyzer(TEST_VERSION_CURRENT), create, IndexWriter.MaxFieldLength.LIMITED); Document doc = new Document(); doc.add(new Field("body", s, Field.Store.YES, Field.Ind...
public void testMmapIndex() throws Exception { // sometimes the directory is not cleaned by rmDir, because on Windows it // may take some time until the files are finally dereferenced. So clean the // directory up front, or otherwise new IndexWriter will fail. rmDir(new File(storePathname)); FSDir...
public void testMmapIndex() throws Exception { // sometimes the directory is not cleaned by rmDir, because on Windows it // may take some time until the files are finally dereferenced. So clean the // directory up front, or otherwise new IndexWriter will fail. rmDir(new File(storePathname)); FSDir...
public void testPerFieldAnalyzer() throws Exception { PerFieldAnalyzerWrapper analyzer = new PerFieldAnalyzerWrapper(new SimpleAnalyzer()); analyzer.addAnalyzer("partnum", new KeywordAnalyzer()); QueryParser queryParser = new QueryParser(Version.LUCENE_CURRENT, "description", analyzer); Query query =...
public void testPerFieldAnalyzer() throws Exception { PerFieldAnalyzerWrapper analyzer = new PerFieldAnalyzerWrapper(new SimpleAnalyzer()); analyzer.addAnalyzer("partnum", new KeywordAnalyzer()); QueryParser queryParser = new QueryParser(TEST_VERSION_CURRENT, "description", analyzer); Query query = q...
private void doTestSearch(PrintWriter out, boolean useCompoundFile) throws Exception { Directory directory = new RAMDirectory(); Analyzer analyzer = new SimpleAnalyzer(); IndexWriter writer = new IndexWriter(directory, analyzer, true, IndexWriter...
private void doTestSearch(PrintWriter out, boolean useCompoundFile) throws Exception { Directory directory = new RAMDirectory(); Analyzer analyzer = new SimpleAnalyzer(); IndexWriter writer = new IndexWriter(directory, analyzer, true, IndexWriter...
public void testNot() throws Exception { RAMDirectory store = new RAMDirectory(); IndexWriter writer = new IndexWriter(store, new SimpleAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED); Document d1 = new Document(); d1.add(new Field("field", "a b", Field.Store.YES, Field.Index.ANALYZED)); w...
public void testNot() throws Exception { RAMDirectory store = new RAMDirectory(); IndexWriter writer = new IndexWriter(store, new SimpleAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED); Document d1 = new Document(); d1.add(new Field("field", "a b", Field.Store.YES, Field.Index.ANALYZED)); w...
public void testBasic() throws Exception { Directory dir = new RAMDirectory(); IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED); Document doc = new Document(); doc.add(new Field("field", "va...
public void testBasic() throws Exception { Directory dir = new RAMDirectory(); IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(TEST_VERSION_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED); Document doc = new Document(); doc.add(new Field("field", "value", Store.NO, Index.ANA...
public void testPhrasePrefixWithBooleanQuery() throws IOException { RAMDirectory indexStore = new RAMDirectory(); IndexWriter writer = new IndexWriter(indexStore, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT, Collections.emptySet()), true, IndexWriter.MaxFieldLength.LIMITED); add("Th...
public void testPhrasePrefixWithBooleanQuery() throws IOException { RAMDirectory indexStore = new RAMDirectory(); IndexWriter writer = new IndexWriter(indexStore, new StandardAnalyzer(TEST_VERSION_CURRENT, Collections.emptySet()), true, IndexWriter.MaxFieldLength.LIMITED); add("This is a test", "object", ...
public void testReverseDateSort() throws Exception { IndexSearcher searcher = new IndexSearcher(directory, true); Sort sort = new Sort(new SortField(DATE_TIME_FIELD, SortField.STRING, true)); QueryParser queryParser = new QueryParser(Version.LUCENE_CURRENT, TEXT_FIELD, new WhitespaceAnalyzer()); Que...
public void testReverseDateSort() throws Exception { IndexSearcher searcher = new IndexSearcher(directory, true); Sort sort = new Sort(new SortField(DATE_TIME_FIELD, SortField.STRING, true)); QueryParser queryParser = new QueryParser(TEST_VERSION_CURRENT, TEXT_FIELD, new WhitespaceAnalyzer()); Query...
protected void setUp() throws Exception { super.setUp(); final String docText[] = { "docThatNeverMatchesSoWeCanRequireLastDocCollectedToBeGreaterThanZero", "one blah three", "one foo three multiOne", "one foobar three multiThree", "blueberry pancakes", "blueberr...
protected void setUp() throws Exception { super.setUp(); final String docText[] = { "docThatNeverMatchesSoWeCanRequireLastDocCollectedToBeGreaterThanZero", "one blah three", "one foo three multiOne", "one foobar three multiThree", "blueberry pancakes", "blueberr...
protected void setUp() throws Exception { super.setUp(); super.setUp(); // create test index mDirectory = new RAMDirectory(); final IndexWriter writer = new IndexWriter(mDirectory, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFiel...
protected void setUp() throws Exception { super.setUp(); super.setUp(); // create test index mDirectory = new RAMDirectory(); final IndexWriter writer = new IndexWriter(mDirectory, new StandardAnalyzer(TEST_VERSION_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED); ...
protected void setUp() throws Exception { super.setUp(); // create test index final IndexWriter writer = new IndexWriter(mDirectory, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), false, IndexWriter.MaxFieldLength.LIMITED); addDocument(writer, "A", "Should we, ...
protected void setUp() throws Exception { super.setUp(); // create test index final IndexWriter writer = new IndexWriter(mDirectory, new StandardAnalyzer(TEST_VERSION_CURRENT), false, IndexWriter.MaxFieldLength.LIMITED); addDocument(writer, "A", "Should we, could we, would we?"); ...
public static final QueryParser qp = new QueryParser(Version.LUCENE_CURRENT, FIELD, new WhitespaceAnalyzer());
public static final QueryParser qp = new QueryParser(TEST_VERSION_CURRENT, FIELD, new WhitespaceAnalyzer());
public void testNPESpanQuery() throws Throwable { final Directory dir = new MockRAMDirectory(); final IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT, Collections.emptySet()), IndexWriter.MaxFieldLength.LIMITED); // Add documents addDoc(wri...
public void testNPESpanQuery() throws Throwable { final Directory dir = new MockRAMDirectory(); final IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(TEST_VERSION_CURRENT, Collections.emptySet()), IndexWriter.MaxFieldLength.LIMITED); // Add documents addDoc(writer, "1", "the big dogs w...
private void doTestCustomScore (String field, FieldScoreQuery.Type tp, double dboost) throws CorruptIndexException, Exception { float boost = (float) dboost; IndexSearcher s = new IndexSearcher(dir, true); FieldScoreQuery qValSrc = new FieldScoreQuery(field,tp); // a query that would score by the field ...
private void doTestCustomScore (String field, FieldScoreQuery.Type tp, double dboost) throws CorruptIndexException, Exception { float boost = (float) dboost; IndexSearcher s = new IndexSearcher(dir, true); FieldScoreQuery qValSrc = new FieldScoreQuery(field,tp); // a query that would score by the field ...
protected void setUp() throws Exception { super.setUp(); // prepare a small index with just a few documents. super.setUp(); dir = new RAMDirectory(); anlzr = new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT); IndexWriter iw = new IndexWriter(dir, anlzr, ...
protected void setUp() throws Exception { super.setUp(); // prepare a small index with just a few documents. super.setUp(); dir = new RAMDirectory(); anlzr = new StandardAnalyzer(TEST_VERSION_CURRENT); IndexWriter iw = new IndexWriter(dir, anlzr, IndexWri...
protected void setUp() throws Exception { super.setUp(); // RAMDirectory rd = new RAMDirectory(); // IndexWriter writer = new IndexWriter(rd, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED); // Document d = new Document(); ...
protected void setUp() throws Exception { super.setUp(); // RAMDirectory rd = new RAMDirectory(); // IndexWriter writer = new IndexWriter(rd, new StandardAnalyzer(TEST_VERSION_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED); // Document d = new Document(); d.add(new Field( ...
public void testParsingAndSearching() throws Exception { String field = "content"; boolean dbg = false; QueryParser qp = new QueryParser(Version.LUCENE_CURRENT, field, new WhitespaceAnalyzer()); qp.setAllowLeadingWildcard(true); String docs[] = { "\\ abcdefg1", "\\79 hijklmn1", ...
public void testParsingAndSearching() throws Exception { String field = "content"; boolean dbg = false; QueryParser qp = new QueryParser(TEST_VERSION_CURRENT, field, new WhitespaceAnalyzer()); qp.setAllowLeadingWildcard(true); String docs[] = { "\\ abcdefg1", "\\79 hijklmn1", ...
public Query makeQuery(String queryText) throws ParseException { Query q = (new QueryParser(Version.LUCENE_CURRENT, field, new WhitespaceAnalyzer())).parse(queryText); return q; }
public Query makeQuery(String queryText) throws ParseException { Query q = (new QueryParser(TEST_VERSION_CURRENT, field, new WhitespaceAnalyzer())).parse(queryText); return q; }
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 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(new...
protected TokenStreamComponents createComponents(String fieldName, Reader reader) { Tokenizer tokenizer = new MockTokenizer(reader, MockTokenizer.SIMPLE, true); TokenStream stream = new SynonymFilter(tokenizer, map, ignoreCase); return new TokenStreamComponents(tokenizer, new Remov...
protected TokenStreamComponents createComponents(String fieldName, Reader reader) { Tokenizer tokenizer = new MockTokenizer(reader, MockTokenizer.SIMPLE, true); TokenStream stream = new SynonymFilter(tokenizer, map, ignoreCase); return new TokenStreamComponents(tokenizer, new Remov...
return new TokenStreamComponents(tokenizer, new WordDelimiterFilter(tokenizer, flags, protectedWords)); } }; checkRandomData(random(), a, 10000*RANDOM_MULTIPLIER, 20, false, false); } }
return new TokenStreamComponents(tokenizer, new WordDelimiterFilter(tokenizer, flags, protectedWords)); } }; checkRandomData(random(), a, 200, 20, false, false); } }
public static void checkRandomData(Random random, Analyzer a, int iterations, int maxWordLength, boolean simple, boolean offsetsAreCorrect) throws IOException { long seed = random.nextLong(); boolean useCharFilter = random.nextBoolean(); checkRandomData(new Random(seed), a, iterations, maxWordLength, useC...
public static void checkRandomData(Random random, Analyzer a, int iterations, int maxWordLength, boolean simple, boolean offsetsAreCorrect) throws IOException { long seed = random.nextLong(); boolean useCharFilter = random.nextBoolean(); checkRandomData(new Random(seed), a, iterations, maxWordLength, useC...
public void testElision() throws Exception { String test = "Plop, juste pour voir l'embrouille avec O'brian. M'enfin."; Tokenizer tokenizer = new StandardTokenizer(Version.LUCENE_CURRENT, new StringReader(test)); Set articles = new HashSet(); articles.add("l"); articles.add("M"); TokenFilter f...
public void testElision() throws Exception { String test = "Plop, juste pour voir l'embrouille avec O'brian. M'enfin."; Tokenizer tokenizer = new StandardTokenizer(Version.LUCENE_CURRENT, new StringReader(test)); Set articles = new HashSet(); articles.add("l"); articles.add("M"); TokenFilter f...
public void testNegativePositions() throws Throwable { SinkTokenizer tokens = new SinkTokenizer(); Token t = new Token(); t.setTermText("a"); t.setPositionIncrement(0); tokens.add(t); t.setTermText("b"); t.setPositionIncrement(1); tokens.add(t); t.setTermText("c"); tokens.add(t...
public void testNegativePositions() throws Throwable { SinkTokenizer tokens = new SinkTokenizer(); Token t = new Token(); t.setTermText("a"); t.setPositionIncrement(0); tokens.add(t); t.setTermText("b"); t.setPositionIncrement(1); tokens.add(t); t.setTermText("c"); tokens.add(t...
public void prepare(ResponseBuilder rb) throws IOException { SolrParams params = rb.req.getParams(); if (!params.getBool(COMPONENT_NAME, false)) { return; } SolrSpellChecker spellChecker = getSpellChecker(params); if (params.getBool(SPELLCHECK_BUILD, false)) { spellChecker.build(rb.re...
public void prepare(ResponseBuilder rb) throws IOException { SolrParams params = rb.req.getParams(); if (!params.getBool(COMPONENT_NAME, false)) { return; } SolrSpellChecker spellChecker = getSpellChecker(params); if (params.getBool(SPELLCHECK_BUILD, false)) { spellChecker.build(rb.re...
protected Object createValue(IndexReader reader, Entry entryKey) throws IOException { String field = StringHelper.intern(entryKey.field); final int[] retArray = new int[reader.maxDoc()]; String[] mterms = new String[reader.maxDoc()+1]; TermDocs termDocs = reader.termDocs(); Ter...
protected Object createValue(IndexReader reader, Entry entryKey) throws IOException { String field = StringHelper.intern(entryKey.field); final int[] retArray = new int[reader.maxDoc()]; String[] mterms = new String[reader.maxDoc()+1]; TermDocs termDocs = reader.termDocs(); Ter...
public void testGuessToken() throws IOException { StorageService ss = StorageService.instance(); generateFakeEndpoints(3); InetAddress one = InetAddress.getByName("127.0.0.2"); InetAddress two = InetAddress.getByName("127.0.0.3"); InetAddress three = InetAddress.getByNa...
public void testGuessToken() throws IOException { StorageService ss = StorageService.instance(); generateFakeEndpoints(3); InetAddress one = InetAddress.getByName("127.0.0.2"); InetAddress two = InetAddress.getByName("127.0.0.3"); InetAddress three = InetAddress.getByNa...
public RangeSliceReply getRangeSlice(byte[] super_column, final DecoratedKey startKey, final DecoratedKey finishKey, int keyMax, SliceRange sliceRange, List<byte[]> columnNames) throws IOException, ExecutionException, InterruptedException { RangeReply rr = getKeyRangeRaw(startKey, finishKey, keyMax)...
public RangeSliceReply getRangeSlice(byte[] super_column, final DecoratedKey startKey, final DecoratedKey finishKey, int keyMax, SliceRange sliceRange, List<byte[]> columnNames) throws IOException, ExecutionException, InterruptedException { RangeReply rr = getKeyRangeRaw(startKey, finishKey, keyMax)...
public StreamRequestMetadata deserialize(DataInputStream dis) throws IOException { InetAddress target = CompactEndPointSerializationHelper.deserialize(dis); int size = dis.readInt(); List<Range> ranges = (size == 0) ? null : new ArrayList<Range>(); for( int i = 0; i <...
public StreamRequestMetadata deserialize(DataInputStream dis) throws IOException { InetAddress target = CompactEndPointSerializationHelper.deserialize(dis); int size = dis.readInt(); List<Range> ranges = (size == 0) ? null : new ArrayList<Range>(); for( int i = 0; i <...
private void validateRemoveWithNewData() throws IOException { ColumnFamilyStore store = Table.open("Keyspace1").getColumnFamilyStore("Super2"); ColumnFamily resolved = store.getColumnFamily(new NamesQueryFilter("key1", new QueryPath("Super2", "SC1".getBytes()), getBytes(2))); Collection<...
private void validateRemoveWithNewData() throws IOException { ColumnFamilyStore store = Table.open("Keyspace1").getColumnFamilyStore("Super2"); ColumnFamily resolved = store.getColumnFamily(new NamesQueryFilter("key1", new QueryPath("Super2", "SC1".getBytes()), getBytes(2)), Integer.MAX_VALUE); ...
public void collectReducedColumns(IColumnContainer container, Iterator<IColumn> reducedColumns, int gcBefore) { while (reducedColumns.hasNext()) { IColumn column = reducedColumns.next(); if (!column.isMarkedForDelete() || column.getLocalDeletionTime() > gcBefore) ...
public void collectReducedColumns(IColumnContainer container, Iterator<IColumn> reducedColumns, int gcBefore) { while (reducedColumns.hasNext()) { IColumn column = reducedColumns.next(); if (QueryFilter.isRelevant(column, container, gcBefore)) container.ad...
public ColumnFamily getColumnFamily(QueryFilter filter, int gcBefore) throws IOException { assert columnFamily_.equals(filter.getColumnFamilyName()); long start = System.currentTimeMillis(); try { // if we are querying subcolumns of a supercolumn, fetch the supercolu...
public ColumnFamily getColumnFamily(QueryFilter filter, int gcBefore) throws IOException { assert columnFamily_.equals(filter.getColumnFamilyName()); long start = System.currentTimeMillis(); try { // if we are querying subcolumns of a supercolumn, fetch the supercolu...
public final java.sql.ResultSet getGeneratedKeys() throws SQLException { checkStatus(); if (autoGeneratedKeysResultSet == null) return null; else { execute("VALUES IDENTITY_VAL_LOCAL()", true, false, JDBC30Translation.NO_GENERATED_KEYS, null, null); return results; } } /////////////////////////////...
public final java.sql.ResultSet getGeneratedKeys() throws SQLException { checkStatus(); if (autoGeneratedKeysResultSet == null) return null; else { execute("VALUES IDENTITY_VAL_LOCAL()", true, false, JDBC30Translation.NO_GENERATED_KEYS, null, null); return results; } } /////////////////////////////...
private static void removeObjects(Connection conn) throws SQLException { DatabaseMetaData dmd = conn.getMetaData(); SQLException sqle = null; // Loop a number of arbitary times to catch cases // where objects are dependent on objects in // different schemas. for...
private static void removeObjects(Connection conn) throws SQLException { DatabaseMetaData dmd = conn.getMetaData(); SQLException sqle = null; // Loop a number of arbitary times to catch cases // where objects are dependent on objects in // different schemas. for...
private static List<Node> retrieveRingData(String seedAddress, String remoteHost, int port) throws IOException { JMXServiceURL jmxUrl = new JMXServiceURL(String.format(fmtUrl, remoteHost, port)); JMXConnector jmxc = JMXConnectorFactory.connect(jmxUrl, null); StorageServiceMBean ssProxy; ...
private static List<Node> retrieveRingData(String seedAddress, String remoteHost, int port) throws IOException { JMXServiceURL jmxUrl = new JMXServiceURL(String.format(fmtUrl, remoteHost, port)); JMXConnector jmxc = JMXConnectorFactory.connect(jmxUrl, null); StorageServiceMBean ssProxy; ...
public void testGuessToken() throws IOException { StorageService ss = StorageService.instance; generateFakeEndpoints(3); InetAddress one = InetAddress.getByName("127.0.0.2"); InetAddress two = InetAddress.getByName("127.0.0.3"); InetAddress three = InetAddress.getByName...
public void testGuessToken() throws IOException { StorageService ss = StorageService.instance; generateFakeEndpoints(3); InetAddress one = InetAddress.getByName("127.0.0.2"); InetAddress two = InetAddress.getByName("127.0.0.3"); InetAddress three = InetAddress.getByName...
public void printRing(PrintStream outs) { Map<Range, List<String>> rangeMap = probe.getRangeToEndPointMap(null); List<Range> ranges = new ArrayList<Range>(rangeMap.keySet()); Collections.sort(ranges); Set<String> liveNodes = probe.getLiveNodes(); Set<String> deadNodes = p...
public void printRing(PrintStream outs) { Map<Range, List<String>> rangeMap = probe.getRangeToEndpointMap(null); List<Range> ranges = new ArrayList<Range>(rangeMap.keySet()); Collections.sort(ranges); Set<String> liveNodes = probe.getLiveNodes(); Set<String> deadNodes = p...
public List<TokenRange> describe_ring(String keyspace) { List<TokenRange> ranges = new ArrayList<TokenRange>(); for (Map.Entry<Range, List<String>> entry : StorageService.instance.getRangeToEndPointMap(keyspace).entrySet()) { Range range = entry.getKey(); List<Str...
public List<TokenRange> describe_ring(String keyspace) { List<TokenRange> ranges = new ArrayList<TokenRange>(); for (Map.Entry<Range, List<String>> entry : StorageService.instance.getRangeToEndpointMap(keyspace).entrySet()) { Range range = entry.getKey(); List<Str...
public DatacenterWriteResponseHandler(int blockFor, String table) { // Response is been managed by the map so the waitlist size really doesnt matter. super(blockFor, table); this.blockFor = new AtomicInteger(blockFor); endpointsnitch = (DatacenterEndPointSnitch) DatabaseDescripto...
public DatacenterWriteResponseHandler(int blockFor, String table) { // Response is been managed by the map so the waitlist size really doesnt matter. super(blockFor, table); this.blockFor = new AtomicInteger(blockFor); endpointsnitch = (DatacenterEndPointSnitch) DatabaseDescripto...
public ArrayList<InetAddress> getNaturalEndpoints(Token token, TokenMetadata metadata, String table) { int replicas = DatabaseDescriptor.getReplicationFactor(table); List<Token> tokens = metadata.sortedTokens(); ArrayList<InetAddress> endpoints = new ArrayList<InetAddress>(replicas); ...
public ArrayList<InetAddress> getNaturalEndpoints(Token token, TokenMetadata metadata, String table) { int replicas = DatabaseDescriptor.getReplicationFactor(table); List<Token> tokens = metadata.sortedTokens(); ArrayList<InetAddress> endpoints = new ArrayList<InetAddress>(replicas); ...
public int compare(InetAddress ia1, InetAddress ia2) { int n1 = metadata.pendingRangeChanges(ia1); int n2 = metadata.pendingRangeChanges(ia2); if (n1 != n2) return -(n1 - n2); // more targets = _less_ priority! ...
public int compare(InetAddress ia1, InetAddress ia2) { int n1 = metadata.pendingRangeChanges(ia1); int n2 = metadata.pendingRangeChanges(ia2); if (n1 != n2) return -(n1 - n2); // more targets = _less_ priority! ...
private static ICompactSerializer<GossipDigestAckMessage> serializer_; static { serializer_ = new GossipDigestAckMessageSerializer(); } List<GossipDigest> gDigestList_ = new ArrayList<GossipDigest>(); Map<InetAddress, EndPointState> epStateMap_ = new HashMap<InetAddress, EndPointSta...
private static ICompactSerializer<GossipDigestAckMessage> serializer_; static { serializer_ = new GossipDigestAckMessageSerializer(); } List<GossipDigest> gDigestList_ = new ArrayList<GossipDigest>(); Map<InetAddress, EndPointState> epStateMap_ = new HashMap<InetAddress, EndPointSta...
public static ICompactSerializer<GossipDigestAck2Message> serializer() { return serializer_; } GossipDigestAck2Message(Map<InetAddress, EndPointState> epStateMap) { epStateMap_ = epStateMap; } Map<InetAddress, EndPointState> getEndPointStateMap() { ...
public static ICompactSerializer<GossipDigestAck2Message> serializer() { return serializer_; } GossipDigestAck2Message(Map<InetAddress, EndPointState> epStateMap) { epStateMap_ = epStateMap; } Map<InetAddress, EndPointState> getEndpointStateMap() { ...
public boolean isAlive(InetAddress ep) { /* If the endpoint in question is the local endpoint return true. */ InetAddress localHost = FBUtilities.getLocalAddress(); if (localHost.equals(ep)) return true; /* Incoming port is assumed to be the Storage port. We need to chan...
public boolean isAlive(InetAddress ep) { /* If the endpoint in question is the local endpoint return true. */ InetAddress localHost = FBUtilities.getLocalAddress(); if (localHost.equals(ep)) return true; /* Incoming port is assumed to be the Storage port. We need to chan...
public void testInitalization() { SolrCore core = h.getCore(); // Build an explicit list //----------------------------------------------- List<String> names0 = new ArrayList<String>(); names0.add( MoreLikeThisComponent.COMPONENT_NAME ); NamedList args = new NamedList(); args.a...
public void testInitalization() { SolrCore core = h.getCore(); // Build an explicit list //----------------------------------------------- List<String> names0 = new ArrayList<String>(); names0.add( MoreLikeThisComponent.COMPONENT_NAME ); NamedList args = new NamedList(); args.a...
synchronized public void add(Document doc) { List fields = doc.getFields(); Iterator fieldIterator = fields.iterator(); while (fieldIterator.hasNext()) { Fieldable field = (Fieldable) fieldIterator.next(); add(field.name(), field.isIndexed(), field.isTermVectorStored(), field.isStorePositionWi...
synchronized public void add(Document doc) { List fields = doc.getFields(); Iterator fieldIterator = fields.iterator(); while (fieldIterator.hasNext()) { Fieldable field = (Fieldable) fieldIterator.next(); add(field.name(), field.isIndexed(), field.isTermVectorStored(), field.isStorePositionWi...
public void testTagsAndEncoder() throws Exception { FieldFragList ffl = ffl(new TermQuery(new Term(F, "a")), "<h1> a </h1>" ); SimpleFragmentsBuilder sfb = new SimpleFragmentsBuilder(); String[] preTags = { "[" }; String[] postTags = { "]" }; assertEquals( "&lt;h1&gt; [a] &lt;/h1&gt;", sfb...
public void testTagsAndEncoder() throws Exception { FieldFragList ffl = ffl(new TermQuery(new Term(F, "a")), "<h1> a </h1>" ); SimpleFragmentsBuilder sfb = new SimpleFragmentsBuilder(); String[] preTags = { "[" }; String[] postTags = { "]" }; assertEquals( "&lt;h1&gt; [a] &lt;&#x2F;h1&gt;", ...
public String[] suggestSimilar (String word, int num_sug, IndexReader ir, String field , boolean morePopular) throws IOException { final TRStringDistance sd=new TRStringDistance(word); final int lengthWord=word.length(); final int goalFreq=(morePopular&&ir!=null)?ir.docFreq(new Term(fi...
public String[] suggestSimilar (String word, int num_sug, IndexReader ir, String field , boolean morePopular) throws IOException { final TRStringDistance sd=new TRStringDistance(word); final int lengthWord=word.length(); final int goalFreq=(morePopular&&ir!=null)?ir.docFreq(new Term(fi...
protected void removeConstituent() { removeConstituent(provisionTo, resource); }
protected void removeConstituent() { removeConstituent(subsystem, resource); }
private void deactivate() { if (!isActive()) return; new StopAction(subsystems.getRootSubsystem(), true, false).run(); for (ServiceRegistration<?> registration : registrations) { try { registration.unregister(); } catch (IllegalStateException e) { logger.debug("Service had already been unregi...
private void deactivate() { if (!isActive()) return; new StopAction(subsystems.getRootSubsystem(), subsystems.getRootSubsystem(), true).run(); for (ServiceRegistration<?> registration : registrations) { try { registration.unregister(); } catch (IllegalStateException e) { logger.debug("Service...
public void init(NamedList args) { Integer v = (Integer)args.get("termInfosIndexDivisor"); if (v != null) { termInfosIndexDivisor = v.intValue(); } }
public void init(NamedList args) { Integer v = (Integer)args.get("setTermIndexInterval"); if (v != null) { termInfosIndexDivisor = v.intValue(); } }
public static void beforeClass() throws Exception { initCore("solrConfig.xml", "schema.xml"); parser = new SolrRequestParsers( h.getCore().getSolrConfig() ); }
public static void beforeClass() throws Exception { initCore("solrconfig.xml", "schema.xml"); parser = new SolrRequestParsers( h.getCore().getSolrConfig() ); }
public static void beforeClass() throws Exception { initCore("solrConfig-functionquery.xml", "schema11.xml"); }
public static void beforeClass() throws Exception { initCore("solrconfig-functionquery.xml", "schema11.xml"); }
public DocIdSet getDocIdSet(IndexReader reader) throws CorruptIndexException, IOException { BitSet bits = new BitSet(reader.maxDoc()); int chainSize = chain.length; int actionSize = actionType.length; int i = 0; /** * taken from ChainedFilter, first and on an empty bitset results in...
public DocIdSet getDocIdSet(IndexReader reader) throws CorruptIndexException, IOException { BitSet bits = new BitSet(reader.maxDoc()); int chainSize = chain.length; int actionSize = actionType.length; int i = 0; /** * taken from ChainedFilter, first and on an empty bitset results in...
public UpdateShardHandler(ConfigSolr cfg) { clientConnectionManager = new PoolingClientConnectionManager(); clientConnectionManager.setDefaultMaxPerRoute(cfg.getMaxUpdateConnections()); clientConnectionManager.setDefaultMaxPerRoute(cfg.getMaxUpdateConnectionsPerHost()); ModifiableSolrPa...
public UpdateShardHandler(ConfigSolr cfg) { clientConnectionManager = new PoolingClientConnectionManager(); clientConnectionManager.setMaxTotal(cfg.getMaxUpdateConnections()); clientConnectionManager.setDefaultMaxPerRoute(cfg.getMaxUpdateConnectionsPerHost()); ModifiableSolrParams param...
public boolean skipTo(int target) throws IOException { if (df > skipInterval) { // optimized case if (skipStream == null) skipStream = (InputStream) freqStream.clone(); // lazily clone if (!haveSkipped) { // lazily seek skip stream skipSt...
public boolean skipTo(int target) throws IOException { if (df > skipInterval) { // optimized case if (skipStream == null) skipStream = (InputStream) freqStream.clone(); // lazily clone if (!haveSkipped) { // lazily seek skip stream skipSt...
protected void waitForRecoveriesToFinish(String collection, ZkStateReader zkStateReader, boolean verbose, boolean failOnTimeout) throws Exception { boolean cont = true; int cnt = 0; while (cont) { if (verbose) System.out.println("-"); boolean sawLiveRecovering = false; z...
protected void waitForRecoveriesToFinish(String collection, ZkStateReader zkStateReader, boolean verbose, boolean failOnTimeout) throws Exception { boolean cont = true; int cnt = 0; while (cont) { if (verbose) System.out.println("-"); boolean sawLiveRecovering = false; z...
public boolean supportsConvert() { return true; }
public boolean supportsConvert() { return false; }
public FileDataModel(File dataFile) throws FileNotFoundException { if (dataFile == null) { throw new IllegalArgumentException("dataFile is null"); } if (!dataFile.exists() || dataFile.isDirectory()) { throw new FileNotFoundException(dataFile.toString()); } this.delimiter = UNKNOWN_DEL...
public FileDataModel(File dataFile) throws FileNotFoundException { if (dataFile == null) { throw new IllegalArgumentException("dataFile is null"); } if (!dataFile.exists() || dataFile.isDirectory()) { throw new FileNotFoundException(dataFile.toString()); } this.delimiter = UNKNOWN_DEL...
public void listSegments() throws IOException { DecimalFormat formatter = new DecimalFormat("###,###.###"); for (int x = 0; x < infos.size(); x++) { SegmentInfo info = infos.info(x); String sizeStr = formatter.format(info.sizeInBytes()); System.out.println(info.name + " " + sizeStr); } ...
public void listSegments() throws IOException { DecimalFormat formatter = new DecimalFormat("###,###.###"); for (int x = 0; x < infos.size(); x++) { SegmentInfo info = infos.info(x); String sizeStr = formatter.format(info.sizeInBytes(true)); System.out.println(info.name + " " + sizeStr); ...
public void testByteSizeLimit() throws Exception { // tests that the max merge size constraint is applied during optimize. Directory dir = new RAMDirectory(); // Prepare an index w/ several small segments and a large one. IndexWriterConfig conf = newWriterConfig(); IndexWriter writer = new IndexW...
public void testByteSizeLimit() throws Exception { // tests that the max merge size constraint is applied during optimize. Directory dir = new RAMDirectory(); // Prepare an index w/ several small segments and a large one. IndexWriterConfig conf = newWriterConfig(); IndexWriter writer = new IndexW...
public static void main (String args[]) { try { System.out.println("CallableStatement Test Starts"); ij.getPropertyArg(args); // This also tests quoted pathname in database name portion of URL, beetle 4781. String protocol = System.getProperty("ij.protocol"); String hostName = TestUtil.getHostNa...
public static void main (String args[]) { try { System.out.println("CallableStatement Test Starts"); ij.getPropertyArg(args); // This also tests quoted pathname in database name portion of URL, beetle 4781. String protocol = System.getProperty("ij.protocol"); String hostName = TestUtil.getHostNa...
public MonotonicBlockPackedReader(IndexInput in, int packedIntsVersion, int blockSize, long valueCount, boolean direct) throws IOException { checkBlockSize(blockSize); this.valueCount = valueCount; blockShift = Integer.numberOfTrailingZeros(blockSize); blockMask = blockSize - 1; final int numBlock...
public MonotonicBlockPackedReader(IndexInput in, int packedIntsVersion, int blockSize, long valueCount, boolean direct) throws IOException { checkBlockSize(blockSize); this.valueCount = valueCount; blockShift = Integer.numberOfTrailingZeros(blockSize); blockMask = blockSize - 1; final int numBlock...
public BlockPackedReader(IndexInput in, int packedIntsVersion, int blockSize, long valueCount, boolean direct) throws IOException { checkBlockSize(blockSize); this.valueCount = valueCount; blockShift = Integer.numberOfTrailingZeros(blockSize); blockMask = blockSize - 1; final int numBlocks = (int)...
public BlockPackedReader(IndexInput in, int packedIntsVersion, int blockSize, long valueCount, boolean direct) throws IOException { checkBlockSize(blockSize); this.valueCount = valueCount; blockShift = Integer.numberOfTrailingZeros(blockSize); blockMask = blockSize - 1; final int numBlocks = (int)...