buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public UpdateHandler(SolrCore core) { this.core=core; schema = core.getSchema(); idField = schema.getUniqueKeyField(); idFieldType = idField!=null ? idField.getType() : null; parseEventListeners(); initLog(); if (!core.getDirectoryFactory().isPersistent()) { try { clearLog()...
public UpdateHandler(SolrCore core) { this.core=core; schema = core.getSchema(); idField = schema.getUniqueKeyField(); idFieldType = idField!=null ? idField.getType() : null; parseEventListeners(); initLog(); if (!core.isReloaded() && !core.getDirectoryFactory().isPersistent()) { tr...
private void writeBytes(byte b[]) throws java.io.IOException { // Since this is an OutputStream returned by Clob.setAsciiStream // use Ascii encoding when creating the String from bytes String str = new String(b, "US-ASCII"); clob_.string_ = clob_.string_.substring(0, (int) off...
private void writeBytes(byte b[]) throws java.io.IOException { // Since this is an OutputStream returned by Clob.setAsciiStream // use Ascii encoding when creating the String from bytes String str = new String(b, "ISO-8859-1"); clob_.string_ = clob_.string_.substring(0, (int) o...
public SolrCore create(CoreDescriptor dcore) throws ParserConfigurationException, IOException, SAXException { // Make the instanceDir relative to the cores instanceDir if not absolute File idir = new File(dcore.getInstanceDir()); if (!idir.isAbsolute()) { idir = new File(solrHome, dcore.getInstance...
public SolrCore create(CoreDescriptor dcore) throws ParserConfigurationException, IOException, SAXException { // Make the instanceDir relative to the cores instanceDir if not absolute File idir = new File(dcore.getInstanceDir()); if (!idir.isAbsolute()) { idir = new File(solrHome, dcore.getInstance...
protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException { String[] elements = COMMA_PATTERN.split(value.toString()); log.debug("(DEBUG - MAP) Key[{}], Value[{}]", key.get(), value); // enforce well-formed textual representation of the graph if (elem...
protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException { String[] elements = COMMA_PATTERN.split(value.toString()); log.debug("(DEBUG - MAP) Key[{}], Value[{}]", key.get(), value); // enforce well-formed textual representation of the graph if (elem...
public static Document toDocument( SolrInputDocument doc, IndexSchema schema ) { Document out = new Document(); out.setBoost( doc.getDocumentBoost() ); // Load fields from SolrDocument to Document for( SolrInputField field : doc ) { String name = field.getName(); SchemaField sfield...
public static Document toDocument( SolrInputDocument doc, IndexSchema schema ) { Document out = new Document(); out.setBoost( doc.getDocumentBoost() ); // Load fields from SolrDocument to Document for( SolrInputField field : doc ) { String name = field.getName(); SchemaField sfield...
protected void afterExecute(Runnable r, Throwable t) { super.afterExecute(r, t); cassandraServer.clientState.logout(); } }; serverEngine = new CustomTThreadPoolServer(new TProcessorFactory(processor), ...
protected void afterExecute(Runnable r, Throwable t) { super.afterExecute(r, t); cassandraServer.logout(); } }; serverEngine = new CustomTThreadPoolServer(new TProcessorFactory(processor), tS...
public BitSet bits(IndexReader reader) throws IOException { BitSet bs = new BitSet(reader.maxDoc()); bs.set(docs1.scoreDocs[0].doc); return bs; } }; TopDocs docs2 = full.search(queryE, filt, nDocs, sort); // assertEquals(docs1.scoreDocs[0].score, docs2.scoreDocs[0]....
public BitSet bits(IndexReader reader) throws IOException { BitSet bs = new BitSet(reader.maxDoc()); bs.set(docs1.scoreDocs[0].doc); return bs; } }; TopDocs docs2 = full.search(queryE, filt, nDocs, sort); assertEquals(docs1.scoreDocs[0].score, docs2.scoreDocs[0].sco...
public static final String VERSION = "10.0.0"; }
public static final String VERSION = "11.0.0"; }
private static void runSuites(Vector suitesToRun) throws ClassNotFoundException, FileNotFoundException, IOException, Exception { // For each suite, locate its properties and runall files // which should be in the "suites" dir or user.dir String suiteName = ""; use...
private static void runSuites(Vector suitesToRun) throws ClassNotFoundException, FileNotFoundException, IOException, Exception { // For each suite, locate its properties and runall files // which should be in the "suites" dir or user.dir String suiteName = ""; use...
public void test_errorcode() throws Exception { ResultSet rs = null; Statement s = createStatement(); s.executeUpdate( "create table t(i int, s smallint)"); s.executeUpdate( "insert into t values (1,2)"); s.executeUpdate("insert i...
public void test_errorcode() throws Exception { ResultSet rs = null; Statement s = createStatement(); s.executeUpdate( "create table t(i int, s smallint)"); s.executeUpdate( "insert into t values (1,2)"); s.executeUpdate("insert i...
public static List<RecommendedItem> getTopItems(int howMany, LongPrimitiveIterator possibleItemIDs, IDRescorer rescorer, Estimator<Long> estimator) throws TasteExceptio...
public static List<RecommendedItem> getTopItems(int howMany, LongPrimitiveIterator possibleItemIDs, IDRescorer rescorer, Estimator<Long> estimator) throws TasteExceptio...
private void resolve(String key, byte[] buffer) { columnFamilies_.put(key, buffer); currentSize_.addAndGet(buffer.length + key.length()); } /* * */ void flush() throws IOException { if ( columnFamilies_.size() == 0 ) return; /* ...
private void resolve(String key, byte[] buffer) { columnFamilies_.put(key, buffer); currentSize_.addAndGet(buffer.length + key.length()); } /* * */ void flush() throws IOException { if ( columnFamilies_.size() == 0 ) return; /* ...
public int compare(String o1, String o2) { return dc.compare(partitioner.decorateKey(o1), partitioner.decorateKey(o2)); } }); DataOutputBuffer buffer = new DataOutputBuffer(); for (String key : orderedKeys) { buffer.reset();...
public int compare(String o1, String o2) { return dc.compare(partitioner.decorateKey(o1), partitioner.decorateKey(o2)); } }); DataOutputBuffer buffer = new DataOutputBuffer(); for (String key : orderedKeys) { buffer.reset();...
public static double[] parsePointDouble(double[] out, String externalVal, int dimension) { if (out == null || out.length != dimension) out = new double[dimension]; int idx = externalVal.indexOf(','); int end = idx; int start = 0; int i = 0; if (idx == -1 && dimension == 1 && externalVal.length...
public static double[] parsePointDouble(double[] out, String externalVal, int dimension) { if (out == null || out.length != dimension) out = new double[dimension]; int idx = externalVal.indexOf(','); int end = idx; int start = 0; int i = 0; if (idx == -1 && dimension == 1 && externalVal.length...
public static final String VERSION = "12.1.0"; }
public static final String VERSION = "13.0.0"; }
public static Test suite() { if (JDBC.vmSupportsJSR169()) { return new TestSuite("empty: client not supported on JSR169"); } else { return TestConfiguration.defaultSuite( ClobStoredProcedureTest.class); } }
public static Test suite() { if (JDBC.vmSupportsJSR169()) { return new TestSuite("empty: client not supported on JSR169; procs use DriverMgr"); } else { return TestConfiguration.defaultSuite( ClobStoredProcedureTest.class); } }
public static Test suite() { if (JDBC.vmSupportsJSR169()) { return new TestSuite("empty: client not supported on JSR169"); } else { return TestConfiguration.defaultSuite( BlobStoredProcedureTest.class); } }
public static Test suite() { if (JDBC.vmSupportsJSR169()) { return new TestSuite("empty: client not supported on JSR169; procs use DriverMgr"); } else { return TestConfiguration.defaultSuite( BlobStoredProcedureTest.class); } }
public int run(String[] args) throws Exception { addOptions(); if (parseArguments(args) == null) { return -1; } Map<String, String> options = parseOptions(); Path input = getInputPath(); Path output = getOutputPath(); if (hasOption(DefaultOptionCreator.OVERWRITE_OPTION))...
public int run(String[] args) throws Exception { addOptions(); if (parseArguments(args) == null) { return -1; } Map<String, String> options = parseOptions(); Path input = getInputPath(); Path output = getOutputPath(); if (hasOption(DefaultOptionCreator.OVERWRITE_OPTION))...
private void leaveRing() { SystemTable.setBootstrapped(false); tokenMetadata_.removeEndpoint(FBUtilities.getLocalAddress()); calculatePendingRanges(); Gossiper.instance.addLocalApplicationState(ApplicationState.STATUS, valueFactory.left(getLocalToken())); try { ...
private void leaveRing() { SystemTable.setBootstrapped(false); tokenMetadata_.removeEndpoint(FBUtilities.getLocalAddress()); calculatePendingRanges(); Gossiper.instance.addLocalApplicationState(ApplicationState.STATUS, valueFactory.left(getLocalToken())); try { ...
public void close() { try { logWriter.close(); } catch (IOException e) { throw new IOError(e); } } void turnOn(Integer cfId, Integer position) { cfLastWrite.put(cfId, position); } /** * Turn the dirty bit ...
public void close() { try { logWriter.close(); } catch (IOException e) { throw new IOError(e); } } void turnOn(Integer cfId, Integer position) { cfLastWrite.put(cfId, position); } /** * Turn the dirty bit ...
public void afterExecute(Runnable r, Throwable t) { super.afterExecute(r,t); // exceptions wrapped by FutureTask if (r instanceof FutureTask) { try { ((FutureTask) r).get(); } catch (InterruptedException e) ...
public void afterExecute(Runnable r, Throwable t) { super.afterExecute(r,t); // exceptions wrapped by FutureTask if (r instanceof FutureTask) { try { ((FutureTask) r).get(); } catch (InterruptedException e) ...
public void intepret(EndPoint ep) { ArrivalWindow hbWnd = arrivalSamples_.get(ep); if ( hbWnd == null ) { return; } long now = System.currentTimeMillis(); /* We need this so that we do not suspect a convict. */ boolean isConvicted =...
public void intepret(EndPoint ep) { ArrivalWindow hbWnd = arrivalSamples_.get(ep); if ( hbWnd == null ) { return; } long now = System.currentTimeMillis(); /* We need this so that we do not suspect a convict. */ boolean isConvicted =...
public void prepare(ResponseBuilder rb) throws IOException { SolrQueryRequest req = rb.req; SolrParams params = req.getParams(); if (!params.getBool(COMPONENT_NAME, true)) { return; } SolrQueryResponse rsp = rb.rsp; // Set field flags String fl = params.get(CommonParams.FL); ...
public void prepare(ResponseBuilder rb) throws IOException { SolrQueryRequest req = rb.req; SolrParams params = req.getParams(); if (!params.getBool(COMPONENT_NAME, true)) { return; } SolrQueryResponse rsp = rb.rsp; // Set field flags String fl = params.get(CommonParams.FL); ...
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { Object toReturn = null; // Added method to unwrap from the collaborator. if (method.getName().equals("getWrappedObject") && method.getDeclaringClass() == WrapperedObject.class) { ...
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { Object toReturn = null; // Added method to unwrap from the collaborator. if (method.getName().equals("unwrapObject") && method.getDeclaringClass() == WrapperedObject.class) { ...
public static Test suite() { TestSuite suite = new TestSuite("lang"); // DERBY-1315 and DERBY-1735 need to be addressed // before re-enabling this test as it's memory use is // different on different vms leading to failures in // the nightly runs. // suite.addTest(la...
public static Test suite() { TestSuite suite = new TestSuite("lang"); // DERBY-1315 and DERBY-1735 need to be addressed // before re-enabling this test as it's memory use is // different on different vms leading to failures in // the nightly runs. // suite.addTest(la...
public BCJava() { } // // ModuleControl interface // /** Start this module. We need a read/write version of the class utilities @exception StandardException standard cloudscape policy */
public BCJava() { } // // ModuleControl interface // /** Start this module. We need a read/write version of the class utilities @exception StandardException standard Derby policy */
public void update(Observable obj, Object arg) { if (SanityManager.DEBUG) { if (arg == null) SanityManager.THROWASSERT("still on observer list " + this); } if (arg.equals(RawTransaction.ABORT) || arg.equals(RawTransaction.SAVEPOINT_ROLLBACK) || (commitAsWell && arg.equals(RawTransaction.COMMIT))) {...
public void update(Observable obj, Object arg) { if (SanityManager.DEBUG) { if (arg == null) SanityManager.THROWASSERT("still on observer list " + this); } if (arg.equals(RawTransaction.ABORT) || arg.equals(RawTransaction.SAVEPOINT_ROLLBACK) || (commitAsWell && arg.equals(RawTransaction.COMMIT))) {...
public void setUndoOp(Undoable op) { if (SanityManager.DEBUG) { SanityManager.ASSERT(op instanceof PhysicalPageOperation); } undoOp = (PhysicalPageOperation)op; } /** Loggable methods */ /** Apply the undo operation, in this implementation of the RawStore, it can only call the undoMe method of und...
public void setUndoOp(Undoable op) { if (SanityManager.DEBUG) { SanityManager.ASSERT(op instanceof PhysicalPageOperation); } undoOp = (PhysicalPageOperation)op; } /** Loggable methods */ /** Apply the undo operation, in this implementation of the RawStore, it can only call the undoMe method of und...
public void setUndoOp(Undoable op) { if (SanityManager.DEBUG) { SanityManager.ASSERT(op instanceof ContainerOperation); } undoOp = (ContainerOperation)op; } /** Loggable methods */ /** Apply the undo operation, in this implementation of the RawStore, it can only call the undoMe method of undoOp ...
public void setUndoOp(Undoable op) { if (SanityManager.DEBUG) { SanityManager.ASSERT(op instanceof ContainerOperation); } undoOp = (ContainerOperation)op; } /** Loggable methods */ /** Apply the undo operation, in this implementation of the RawStore, it can only call the undoMe method of undoOp ...
public void doMe(Transaction xact, LogInstant instant, LimitObjectInput in) throws StandardException { if (fileToGo == null) return; BaseDataFileFactory bdff = (BaseDataFileFactory) ((RawTransaction) xact).getDataFactory(); bdff.fileToRemove(fileToGo, true); } /** @exception Standa...
public void doMe(Transaction xact, LogInstant instant, LimitObjectInput in) throws StandardException { if (fileToGo == null) return; BaseDataFileFactory bdff = (BaseDataFileFactory) ((RawTransaction) xact).getDataFactory(); bdff.fileToRemove(fileToGo, true); } /** @exception Standa...
public void setUndoOp(Undoable op) { if (SanityManager.DEBUG) { SanityManager.ASSERT(op instanceof LogicalPageOperation); } undoOp = (LogicalPageOperation)op; } /** Loggable methods */ /** Apply the undo operation, in this implementation of the RawStore, it can only call the undoMe method of undo...
public void setUndoOp(Undoable op) { if (SanityManager.DEBUG) { SanityManager.ASSERT(op instanceof LogicalPageOperation); } undoOp = (LogicalPageOperation)op; } /** Loggable methods */ /** Apply the undo operation, in this implementation of the RawStore, it can only call the undoMe method of undo...
public void update(Observable obj, Object arg) { if (SanityManager.DEBUG) { if (arg == null) SanityManager.THROWASSERT("still on observr list " + this); } if (arg.equals(RawTransaction.COMMIT)) { openContainerAndDoIt((RawTransaction) obj); } // remove this object if we are commiting, aborting or...
public void update(Observable obj, Object arg) { if (SanityManager.DEBUG) { if (arg == null) SanityManager.THROWASSERT("still on observr list " + this); } if (arg.equals(RawTransaction.COMMIT)) { openContainerAndDoIt((RawTransaction) obj); } // remove this object if we are commiting, aborting or...
private boolean abortAll; // true if any exception causes this transaction to be aborted. XactContext(ContextManager cm, String name, Xact xact, boolean abortAll, RawStoreFactory factory) { super(cm, name); this.xact = xact; this.abortAll = abortAll; this.factory = factory; xact.xc = this; // double li...
private boolean abortAll; // true if any exception causes this transaction to be aborted. XactContext(ContextManager cm, String name, Xact xact, boolean abortAll, RawStoreFactory factory) { super(cm, name); this.xact = xact; this.abortAll = abortAll; this.factory = factory; xact.xc = this; // double li...
protected ContainerLocking2(LockFactory lf) { this.lf = lf; } /** Obtain a Container shared or exclusive lock until the end of the nested transaction. @exception StandardException Standard Cloudscape error policy */
protected ContainerLocking2(LockFactory lf) { this.lf = lf; } /** Obtain a Container shared or exclusive lock until the end of the nested transaction. @exception StandardException Standard Derby error policy */
protected ContainerLocking3(LockFactory lf) { this.lf = lf; } /** Obtain a Container shared or exclusive lock until the end of the nested transaction. @exception StandardException Standard Cloudscape error policy */
protected ContainerLocking3(LockFactory lf) { this.lf = lf; } /** Obtain a Container shared or exclusive lock until the end of the nested transaction. @exception StandardException Standard Derby error policy */
public FlushedScan(LogToFile logFactory, long startAt) throws StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(startAt != LogCounter.INVALID_LOG_INSTANT, "cannot start scan on an invalid log instant"); } try { currentLogFileNumber = LogCounter.getLo...
public FlushedScan(LogToFile logFactory, long startAt) throws StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(startAt != LogCounter.INVALID_LOG_INSTANT, "cannot start scan on an invalid log instant"); } try { currentLogFileNumber = LogCounter.getLo...
public boolean fetchMaxOnBTree( TransactionManager xact_manager, Transaction rawtran, long conglomId, int open_mode, int lock_level, LockingPolicy locking_policy, int isolation_level, ...
public boolean fetchMaxOnBTree( TransactionManager xact_manager, Transaction rawtran, long conglomId, int open_mode, int lock_level, LockingPolicy locking_policy, int isolation_level, ...
Raised if, the Derby database connection is null. /* Derby - Class org.apache.derby.impl.load.LoadError Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownersh...
Raised if, the Derby database connection is null. /* Derby - Class org.apache.derby.impl.load.LoadError Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownersh...
public ResultDescription getResultDescription() { return resultDescription; } /* * class interface * */ DeleteResultSet ( NoPutResultSet source, Activation activation ) throws StandardException { this(source, activation.getConstantAction(), activation); } /** *...
public ResultDescription getResultDescription() { return resultDescription; } /* * class interface * */ DeleteResultSet ( NoPutResultSet source, Activation activation ) throws StandardException { this(source, activation.getConstantAction(), activation); } /** *...
public DeleteVTIResultSet ( NoPutResultSet source, Activation activation ) throws StandardException { super(source, activation); } /** @exception StandardException Standard Cloudscape error policy */
public DeleteVTIResultSet ( NoPutResultSet source, Activation activation ) throws StandardException { super(source, activation); } /** @exception StandardException Standard Derby error policy */
public ResultDescription getResultDescription() { return resultDescription; } /** * * @exception StandardException Thrown on error */ DMLVTIResultSet(NoPutResultSet source, Activation activation) throws StandardException { super(activation); sourceResultSet = source; con...
public ResultDescription getResultDescription() { return resultDescription; } /** * * @exception StandardException Thrown on error */ DMLVTIResultSet(NoPutResultSet source, Activation activation) throws StandardException { super(activation); sourceResultSet = source; con...
public UpdateVTIResultSet(NoPutResultSet source, Activation activation) throws StandardException { super(source, activation); } /** @exception StandardException Standard Cloudscape error policy */
public UpdateVTIResultSet(NoPutResultSet source, Activation activation) throws StandardException { super(source, activation); } /** @exception StandardException Standard Derby error policy */
public DeleteCascadeResultSet ( NoPutResultSet source, Activation activation, int constantActionItem, ResultSet[] dependentResultSets, String resultSetId ) throws StandardException { super(source, ((constantActionItem == -1) ?activation.getConstantAction() : (Consta...
public DeleteCascadeResultSet ( NoPutResultSet source, Activation activation, int constantActionItem, ResultSet[] dependentResultSets, String resultSetId ) throws StandardException { super(source, ((constantActionItem == -1) ?activation.getConstantAction() : (Consta...
public boolean requiresRelocking() { if (SanityManager.DEBUG) { SanityManager.THROWASSERT( "requiresRelocking() not expected to be called for " + getClass().getName()); } return false; } ///////////////////////////////////////////////////////// // // Access/RowSource -- not implemented // /...
public boolean requiresRelocking() { if (SanityManager.DEBUG) { SanityManager.THROWASSERT( "requiresRelocking() not expected to be called for " + getClass().getName()); } return false; } ///////////////////////////////////////////////////////// // // Access/RowSource -- not implemented // /...
private final GeneratedMethod methodCall; /* * class interface * */ CallStatementResultSet( GeneratedMethod methodCall, Activation a) throws StandardException { super(a); this.methodCall = methodCall; } /** @exception StandardException Standard Cloudscape error policy ...
private final GeneratedMethod methodCall; /* * class interface * */ CallStatementResultSet( GeneratedMethod methodCall, Activation a) throws StandardException { super(a); this.methodCall = methodCall; } /** @exception StandardException Standard Derby error policy */
public InsertVTIResultSet(NoPutResultSet source, NoPutResultSet vtiRS, Activation activation) throws StandardException { super(source, activation); this.vtiRS = (VTIResultSet) vtiRS; } /** @exception StandardException Standard Cloudscape error policy */
public InsertVTIResultSet(NoPutResultSet source, NoPutResultSet vtiRS, Activation activation) throws StandardException { super(source, activation); this.vtiRS = (VTIResultSet) vtiRS; } /** @exception StandardException Standard Derby error policy */
public void prepareToInvalidate(Provider p, int action, LanguageConnectionContext lcc) throws StandardException { /* this statement can have other open result sets if another one is closing without any problems. It is not a problem to create an index when there is an open result set, since...
public void prepareToInvalidate(Provider p, int action, LanguageConnectionContext lcc) throws StandardException { /* this statement can have other open result sets if another one is closing without any problems. It is not a problem to create an index when there is an open result set, since...
public int getParameterNumber(GenericParameter theParam) { for (int i = 0; i < parms.length; i++) { if (parms[i] == theParam) { return i+1; } } return 0; } /** Check that there are not output parameters defined by the parameter set. If there are unknown parameter types they are forced to...
public int getParameterNumber(GenericParameter theParam) { for (int i = 0; i < parms.length; i++) { if (parms[i] == theParam) { return i+1; } } return 0; } /** Check that there are not output parameters defined by the parameter set. If there are unknown parameter types they are forced to...
public long position(Blob pattern, long start) throws SQLException { //call checkValidity to exit by throwing a SQLException if //the Blob object has been freed by calling free() on it checkValidity(); boolean pushStack = false; try { ...
public long position(Blob pattern, long start) throws SQLException { //call checkValidity to exit by throwing a SQLException if //the Blob object has been freed by calling free() on it checkValidity(); boolean pushStack = false; try { ...
public void map(LongWritable key, Text value, OutputCollector<IntWritable,LongWritable> output, Reporter reporter) throws IOException { String[] tokens = ItemIDIndexMapper.COMMA.split(value.toString()); long itemID = Long.parseLong(tokens[1]); int inde...
public void map(LongWritable key, Text value, OutputCollector<IntWritable,LongWritable> output, Reporter reporter) throws IOException { String[] tokens = ItemIDIndexMapper.COMMA.split(value.toString()); long itemID = Long.parseLong(tokens[1]); int inde...
public void writeSetSpecialRegister(java.util.ArrayList sqlsttList) throws SqlException; }
public void writeSetSpecialRegister(Section section, java.util.ArrayList sqlsttList) throws SqlException; }
private void showColumnMeta(StringBuilder sb, CfDef cfDef, ColumnDef colDef) { sb.append(NEWLINE + TAB + TAB + "{"); final AbstractType comparator = getFormatType((cfDef.column_type == "Super") ? cfDef.subcomparator_type ...
private void showColumnMeta(StringBuilder sb, CfDef cfDef, ColumnDef colDef) { sb.append(NEWLINE + TAB + TAB + "{"); final AbstractType comparator = getFormatType(cfDef.column_type.equals("Super") ? cfDef.subcomparator_type ...
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...
public void test_errorcode() throws Exception { ResultSet rs = null; Statement s = createStatement(); s.executeUpdate( "create table t(i int, s smallint)"); s.executeUpdate( "insert into t values (1,2)"); s.executeUpdate("insert i...
public void test_errorcode() throws Exception { ResultSet rs = null; Statement s = createStatement(); s.executeUpdate( "create table t(i int, s smallint)"); s.executeUpdate( "insert into t values (1,2)"); s.executeUpdate("insert i...
public void testAddIndexes() throws Exception { boolean optimize = false; Directory dir1 = new MockRAMDirectory(); IndexWriter writer = new IndexWriter(dir1, new WhitespaceAnalyzer(), IndexWriter.MaxFieldLength.LIMITED); writer.setInfoStream(infoStream); // create the index createInde...
public void testAddIndexes() throws Exception { boolean optimize = false; Directory dir1 = new MockRAMDirectory(); IndexWriter writer = new IndexWriter(dir1, new WhitespaceAnalyzer(), IndexWriter.MaxFieldLength.LIMITED); writer.setInfoStream(infoStream); // create the index createInde...
private static int stageQueueSize_ = 4096; static { try { configFileName = getStorageConfigPath(); if (logger.isDebugEnabled()) logger.debug("Loading settings from " + configFileName); InputStream inp...
private static int stageQueueSize_ = 4096; static { try { configFileName = getStorageConfigPath(); if (logger.isDebugEnabled()) logger.info("Loading settings from " + configFileName); InputStream inpu...
public KSMetaData(String name, Class<? extends AbstractReplicationStrategy> strategyClass, int replicationFactor, CFMetaData... cfDefs) { this.name = name; this.strategyClass = strategyClass; this.replicationFactor = replicationFactor; Map<String, CFMetaData> cfmap = new HashMap<...
public KSMetaData(String name, Class<? extends AbstractReplicationStrategy> strategyClass, int replicationFactor, CFMetaData... cfDefs) { this.name = name; this.strategyClass = strategyClass; this.replicationFactor = replicationFactor; Map<String, CFMetaData> cfmap = new HashMap<...
public static final String VERSION = "8.2.0"; }
public static final String VERSION = "8.3.0"; }
public static final String VERSION = "11.1.0"; }
public static final String VERSION = "12.0.0"; }
protected void closeActions() throws SQLException { //we release the resource for preparedStatement preparedStatement = null; try{ setupContextStack(); } catch (SQLException se) { //we may have already committed the transaction in which case //setupContextStack will fail, the close should just retur...
public final void addBatch(String sql) throws SQLException { throw newSQLException(SQLState.NOT_FOR_PREPARED_STATEMENT, "addBatch(String)"); } /** Additional close to close our activation. @exception SQLException thrown on failure */ void closeActions() throws SQLException { //we release the resource ...
public void withDefaultSolrAndXsl() throws Exception { File tmpdir = File.createTempFile("test", "tmp", TEMP_DIR); tmpdir.delete(); tmpdir.mkdir(); tmpdir.deleteOnExit(); AbstractDataImportHandlerTestCase.createFile(tmpdir, "x.xsl", xsl.getBytes("UTF-8"), false); Map entityAttrs = ...
public void withDefaultSolrAndXsl() throws Exception { File tmpdir = File.createTempFile("test", "tmp", TEMP_DIR); tmpdir.delete(); tmpdir.mkdir(); tmpdir.deleteOnExit(); AbstractDataImportHandlerTestCase.createFile(tmpdir, "x.xsl", xsl.getBytes("UTF-8"), false); Map entityAttrs = ...
public void generate(ActivationClassBuilder acb, MethodBuilder mb, ResultSetNode child) throws StandardException { /* ** If sorting is not required, don't generate a sort result set - ** just return the child result set. */ if ( ! sortNeeded) { child.generate(acb, mb); return;...
public void generate(ActivationClassBuilder acb, MethodBuilder mb, ResultSetNode child) throws StandardException { /* ** If sorting is not required, don't generate a sort result set - ** just return the child result set. */ if ( ! sortNeeded) { child.generate(acb, mb); return;...
protected ResultSetNode optimizeSource( Optimizer optimizer, ResultSetNode sourceResultSet, PredicateList predList, CostEstimate outerCost) throws StandardException { ResultSetNode retval; if (sourceResultSet instanceof FromTable) { FromList optList = (FromList) getNodeFactory...
protected ResultSetNode optimizeSource( Optimizer optimizer, ResultSetNode sourceResultSet, PredicateList predList, CostEstimate outerCost) throws StandardException { ResultSetNode retval; if (sourceResultSet instanceof FromTable) { FromList optList = (FromList) getNodeFactory...
private static final HashMap outputs; static { HashMap englishOutputs = new HashMap(); englishOutputs.put("RuntimeInfoWithActiveConn", "--- Derby Network Server Runtime Information ---\n" + "---------- Session Information ---------------\n" + "Session # :2\n" + "\n" + "\n" + "--------...
private static final HashMap outputs; static { HashMap englishOutputs = new HashMap(); englishOutputs.put("RuntimeInfoWithActiveConn", "--- Derby Network Server Runtime Information ---\n" + "---------- Session Information ---------------\n" + "Session # :2\n" + "\n" + "\n" + "--------...
public void run() { MemtableManager.instance().submit(cfName_, Memtable.this, cLogCtx); } }; flushQueuer = new FutureTask(runnable, null); } }
public void run() { ColumnFamilyStore.submitFlush(Memtable.this, cLogCtx); } }; flushQueuer = new FutureTask(runnable, null); } }
String SET_STREAM_INEXACT_LENGTH_DATA = "XJ023.S"; /* Derby - Class org.apache.derby.iapi.reference.SQLState Copyright 1999, 2004 The Apache Software Foundation or its licensors, as applicable. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance...
String SET_STREAM_INEXACT_LENGTH_DATA = "XJ023.S"; /* Derby - Class org.apache.derby.iapi.reference.SQLState Copyright 1999, 2004 The Apache Software Foundation or its licensors, as applicable. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance...
private String toStr(SolrDocumentList lst, int maxSz) { if (lst.size() <= maxSz) return lst.toString(); StringBuilder sb = new StringBuilder("SolrDocumentList[sz=" + lst.size()); if (lst.size() != lst.getNumFound()) { sb.append(" numFound=" + lst.getNumFound()); } sb.append("]="); sb.ap...
private String toStr(SolrDocumentList lst, int maxSz) { if (lst.size() <= maxSz) return lst.toString(); StringBuilder sb = new StringBuilder("SolrDocumentList[sz=" + lst.size()); if (lst.size() != lst.getNumFound()) { sb.append(" numFound=" + lst.getNumFound()); } sb.append("]="); sb.ap...
public void reduce(Text key, Iterator<Text> values, OutputCollector<Text, Text> output, Reporter reporter) throws IOException { ColumnFamily columnFamily; String Keyspace = "Keyspace1"; String CFName = "Super1"; Message message; List<ColumnFami...
public void reduce(Text key, Iterator<Text> values, OutputCollector<Text, Text> output, Reporter reporter) throws IOException { ColumnFamily columnFamily; String Keyspace = "Keyspace1"; String CFName = "Super1"; Message message; List<ColumnFami...
public String toString() { StringBuilder sb = new StringBuilder("ColumnFamily("); CFMetaData cfm = metadata(); sb.append(cfm == null ? "-deleted-" : cfm.cfName); if (isMarkedForDelete()) sb.append(" -deleted at " + getMarkedForDeleteAt() + "-"); sb.append(" ...
public String toString() { StringBuilder sb = new StringBuilder("ColumnFamily("); CFMetaData cfm = metadata(); sb.append(cfm == null ? "<anonymous>" : cfm.cfName); if (isMarkedForDelete()) sb.append(" -deleted at " + getMarkedForDeleteAt() + "-"); sb.append(...
private void printSliceList(CfDef columnFamilyDef, List<KeySlice> slices) throws NotFoundException, TException, IllegalAccessException, InstantiationException, NoSuchFieldException { AbstractType validator; String columnFamilyName = columnFamilyDef.getName(); for (KeySlice ks : slic...
private void printSliceList(CfDef columnFamilyDef, List<KeySlice> slices) throws NotFoundException, TException, IllegalAccessException, InstantiationException, NoSuchFieldException { AbstractType validator; String columnFamilyName = columnFamilyDef.getName(); for (KeySlice ks : slic...
public Object addingService(ServiceReference ref) { if(quiesce.get()){ return null; } Map<EntityManagerFactoryManager, ServiceReference> managersToManage = new HashMap<EntityManagerFactoryManager, ServiceReference>(); synchronized (this) { if(_logger.isDebugEnabled()) _logge...
public Object addingService(ServiceReference ref) { if(quiesce.get()){ return null; } Map<EntityManagerFactoryManager, ServiceReference> managersToManage = new HashMap<EntityManagerFactoryManager, ServiceReference>(); synchronized (this) { if(_logger.isDebugEnabled()) _logge...
private ConglomerateController base_cc_for_locking; /* ** Methods of B2IController. */ B2IController() { // Perform the generic b-tree construction. super(); } void init( TransactionManager xact_manager, Transaction rawtran, int ...
private ConglomerateController base_cc_for_locking; /* ** Methods of B2IController. */ B2IController() { // Perform the generic b-tree construction. super(); } void init( TransactionManager xact_manager, Transaction rawtran, int ...
public Explanation explain(IndexReader reader, int doc) throws IOException { Explanation result = new Explanation(); result.setDescription("weight("+getQuery()+" in "+doc+"), product of:"); StringBuilder docFreqs = new StringBuilder(); StringBuilder query = new StringBuilder(); ...
public Explanation explain(IndexReader reader, int doc) throws IOException { Explanation result = new Explanation(); result.setDescription("weight("+getQuery()+" in "+doc+"), product of:"); StringBuilder docFreqs = new StringBuilder(); StringBuilder query = new StringBuilder(); ...
private ResultColumn makeColumnReferenceFromName ( TableName tableName, String columnName ) throws StandardException { ContextManager cm = getContextManager(); NodeFactory nodeFactory = getNodeFactory(); ResultColumn rc = (ResultColumn) nodeFactory.getNode ( C_NodeTypes.RESULT_COLUMN, null...
private ResultColumn makeColumnReferenceFromName ( TableName tableName, String columnName ) throws StandardException { ContextManager cm = getContextManager(); NodeFactory nodeFactory = getNodeFactory(); ResultColumn rc = (ResultColumn) nodeFactory.getNode ( C_NodeTypes.RESULT_COLUMN, colu...
private SSTableReader streamIn(DataInput input, PendingFile localFile, PendingFile remoteFile) throws IOException { ColumnFamilyStore cfs = Table.open(localFile.desc.ksname).getColumnFamilyStore(localFile.desc.cfname); DecoratedKey key; SSTableWriter writer = new SSTableWriter(localFile....
private SSTableReader streamIn(DataInput input, PendingFile localFile, PendingFile remoteFile) throws IOException { ColumnFamilyStore cfs = Table.open(localFile.desc.ksname).getColumnFamilyStore(localFile.desc.cfname); DecoratedKey key; SSTableWriter writer = new SSTableWriter(localFile....
public Visitable visit(Visitable node) throws StandardException { if (node instanceof ColumnReference) { ColumnReference cr = (ColumnReference)node; if (groupByList == null) { throw StandardException.newException(SQLState.LANG_INVALID_COL_REF_NON_GROUPED_SELECT_LIST, cr.getSQLColumnName()); }...
public Visitable visit(Visitable node) throws StandardException { if (node instanceof ColumnReference) { ColumnReference cr = (ColumnReference)node; if (groupByList == null) { throw StandardException.newException(SQLState.LANG_INVALID_COL_REF_NON_GROUPED_SELECT_LIST, cr.getSQLColumnName()); }...
private void validateNameSort(Table table, int N) throws IOException { for (int i = 0; i < N; ++i) { DecoratedKey key = Util.dk(Integer.toString(i)); ColumnFamily cf; cf = Util.getColumnFamily(table, key, "Standard1"); Collection<IColumn> columns ...
private void validateNameSort(Table table, int N) throws IOException { for (int i = 0; i < N; ++i) { DecoratedKey key = Util.dk(Integer.toString(i)); ColumnFamily cf; cf = Util.getColumnFamily(table, key, "Standard1"); Collection<IColumn> columns ...
public int getLocalDeletionTime() { return value.getInt(value.position()+value.arrayOffset() ); }
public int getLocalDeletionTime() { return value.getInt(value.position()); }
public String getString(ByteBuffer bytes) { if (bytes.remaining() == 0) { return ""; } if (bytes.remaining() != 8) { throw new MarshalException("A long is exactly 8 bytes: "+bytes.remaining()); } return String.valu...
public String getString(ByteBuffer bytes) { if (bytes.remaining() == 0) { return ""; } if (bytes.remaining() != 8) { throw new MarshalException("A long is exactly 8 bytes: "+bytes.remaining()); } return String.valu...
public static UUID getUUID(ByteBuffer raw) { return new UUID(raw.getLong(raw.position() + raw.arrayOffset()), raw.getLong(raw.position() + raw.arrayOffset() + 8)); }
public static UUID getUUID(ByteBuffer raw) { return new UUID(raw.getLong(raw.position()), raw.getLong(raw.position() + 8)); }
public String toString() { return commandName; }
public UpdateCommand clone() { try { return (UpdateCommand) super.clone(); } catch (CloneNotSupportedException e) { return null; } } }
private static final String[] JDBCAPI_TESTS_BOTH = { // from old jdbc20.runall "connectionJdbc20", "resultsetJdbc20", // from old jdbcapi.runall "derbyStress", // "prepStmtMetaData", TODO: convert - different canon ...
private static final String[] JDBCAPI_TESTS_BOTH = { // from old jdbc20.runall "connectionJdbc20", "resultsetJdbc20", // from old jdbcapi.runall // "derbyStress", TODO: Need a way to control heap size from Junit tests ...
public final boolean isDeleted(int n) { int i = readerIndex(n); // find segment num return readers[i].isDeleted(n - starts[i]); // dispatch to segment reader } synchronized final void doDelete(int n) throws IOException { numDocs = -1; // invalidate cache int i = readerIndex(n); // ...
public final boolean isDeleted(int n) { int i = readerIndex(n); // find segment num return readers[i].isDeleted(n - starts[i]); // dispatch to segment reader } synchronized final void doDelete(int n) throws IOException { numDocs = -1; // invalidate cache int i = readerIndex(n); // ...
public void run() { synchronized (scheduled) { Throwable t = new TimeoutException(); state = State.Failed; String[] missingDependecies = getMissingDepen...
public void run() { synchronized (scheduled) { Throwable t = new TimeoutException(); state = State.Failed; String[] missingDependecies = getMissingDepen...
public void lockEvent(Latch lockInfo) { } /** Determine if this request can be granted. <p) Implements the grant/wait lock logic for row locks. See the
public void lockEvent(Latch lockInfo) { } /** Determine if this request can be granted. <p> Implements the grant/wait lock logic for row locks. See the
private void processWithSyncBatch() throws Exception { CheaterFutureTask firstTask = queue.take(); if (!(firstTask.getRawCallable() instanceof CommitLog.LogRecordAdder)) { firstTask.run(); return; } // attempt to do a bunch of LogRecordAdder ops b...
private void processWithSyncBatch() throws Exception { CheaterFutureTask firstTask = queue.take(); if (!(firstTask.getRawCallable() instanceof CommitLog.LogRecordAdder)) { firstTask.run(); return; } // attempt to do a bunch of LogRecordAdder ops b...
public synchronized void initServer() throws IOException, org.apache.cassandra.config.ConfigurationException { logger_.info("Cassandra version: " + FBUtilities.getReleaseVersionString()); logger_.info("Thrift API version: " + Constants.VERSION); if (initialized) { if...
public synchronized void initServer() throws IOException, org.apache.cassandra.config.ConfigurationException { logger_.info("Cassandra version: " + FBUtilities.getReleaseVersionString()); logger_.info("Thrift API version: " + Constants.VERSION); if (initialized) { if...
public static final String VERSION = "12.0.0"; }
public static final String VERSION = "12.1.0"; }
public void testClobCreateLocatorSP() throws SQLException { //initialize the locator to a default value. int locator = -1; //call the stored procedure to return the created locator. CallableStatement cs = prepareCall ("? = CALL SYSIBM.CLOBCREATELOCATOR()"); cs.re...
public void testClobCreateLocatorSP() throws SQLException { //initialize the locator to a default value. int locator = -1; //call the stored procedure to return the created locator. CallableStatement cs = prepareCall ("? = CALL SYSIBM.CLOBCREATELOCATOR()"); cs.re...
public void testCorruptionAfterDiskFullDuringMerge() throws IOException { MockDirectoryWrapper dir = newDirectory(); //IndexWriter w = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random)).setReaderPooling(true)); IndexWriter w = new IndexWriter( dir, ne...
public void testCorruptionAfterDiskFullDuringMerge() throws IOException { MockDirectoryWrapper dir = newDirectory(); //IndexWriter w = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random)).setReaderPooling(true)); IndexWriter w = new IndexWriter( dir, ne...
public void setFetchDirection(int direction) throws SQLException { checkNotClosed(); if (direction == ResultSet.FETCH_FORWARD || direction == ResultSet.FETCH_REVERSE || direction == ResultSet.FETCH_UNKNOWN) { if ((getResultSetType() == ResultSet.TYPE_FORWARD_ONLY) && (direct...
public void setFetchDirection(int direction) throws SQLException { checkNotClosed(); if (direction == ResultSet.FETCH_FORWARD || direction == ResultSet.FETCH_REVERSE || direction == ResultSet.FETCH_UNKNOWN) { if ((getResultSetType() == ResultSet.TYPE_FORWARD_ONLY) && (direct...
public final void clear() { for (int i = 0; i < size; i++) heap[i] = null; size = 0; }
public final void clear() { for (int i = 0; i <= size; i++) heap[i] = null; size = 0; }
public Query getQuery(Element e) throws ParserException { String fieldsList=e.getAttribute("fieldNames"); //a comma-delimited list of fields String fields[]=defaultFieldNames; if((fieldsList!=null)&&(fieldsList.trim().length()>0)) { fields=fieldsList.trim().split(","); //trim the fieldnames for (int i...
public Query getQuery(Element e) throws ParserException { String fieldsList=e.getAttribute("fieldNames"); //a comma-delimited list of fields String fields[]=defaultFieldNames; if((fieldsList!=null)&&(fieldsList.trim().length()>0)) { fields=fieldsList.trim().split(","); //trim the fieldnames for (int i...
private static void sendMessages(String localDataCenter, Map<String, Multimap<Message, InetAddress>> dcMessages, IWriteResponseHandler handler) throws IOException { for (Map.Entry<String, Multimap<Message, InetAddress>> entry: dcMessages.entrySet()) { String dataCenter = entry.ge...
private static void sendMessages(String localDataCenter, Map<String, Multimap<Message, InetAddress>> dcMessages, IWriteResponseHandler handler) throws IOException { for (Map.Entry<String, Multimap<Message, InetAddress>> entry: dcMessages.entrySet()) { String dataCenter = entry.ge...
private static void deliverHintsToEndpoint(InetAddress endPoint) throws IOException, DigestMismatchException, InvalidRequestException, TimeoutException { if (logger_.isDebugEnabled()) logger_.debug("Started hinted handoff for endPoint " + endPoint); byte[] targetEPBytes = endPoint.get...
private static void deliverHintsToEndpoint(InetAddress endPoint) throws IOException, DigestMismatchException, InvalidRequestException, TimeoutException { if (logger_.isDebugEnabled()) logger_.debug("Started hinted handoff for endPoint " + endPoint); byte[] targetEPBytes = endPoint.get...
public void test_errorcode() throws Exception { ResultSet rs = null; Statement s = createStatement(); s.executeUpdate( "create table t(i int, s smallint)"); s.executeUpdate( "insert into t values (1,2)"); s.executeUpdate("insert i...
public void test_errorcode() throws Exception { ResultSet rs = null; Statement s = createStatement(); s.executeUpdate( "create table t(i int, s smallint)"); s.executeUpdate( "insert into t values (1,2)"); s.executeUpdate("insert i...
public void testAddDocument() throws Exception { Document testDoc = new Document(); DocHelper.setupDoc(testDoc); IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()))); writer.addDocument(testDoc); writer.commit(); SegmentInfoPerCommit...
public void testAddDocument() throws Exception { Document testDoc = new Document(); DocHelper.setupDoc(testDoc); IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()))); writer.addDocument(testDoc); writer.commit(); SegmentInfoPerCommit...
public FieldsProducer fieldsProducer(SegmentReadState state) throws IOException { return new Lucene3xFields(state.dir, state.fieldInfos, state.segmentInfo, state.context, state.termsIndexDivisor); }
public FieldsProducer fieldsProducer(SegmentReadState state) throws IOException { return new Lucene3xFields(state.directory, state.fieldInfos, state.segmentInfo, state.context, state.termsIndexDivisor); }
private JiraIssue makeJiraIssue( Element itemElement ) throws Exception { String key = squeezeText( getFirstChild( itemElement, JIRA_KEY ) ); String title = squeezeText( getFirstChild( itemElement, JIRA_TITLE ) ); long releaseNoteAttachmentID = getReleaseNoteAttachmen...
private JiraIssue makeJiraIssue( Element itemElement ) throws Exception { String key = squeezeText( getFirstChild( itemElement, JIRA_KEY ) ); String title = squeezeText( getFirstChild( itemElement, JIRA_TITLE ) ); long releaseNoteAttachmentID = getReleaseNoteAttachmen...
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...