buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private static void runClustering(String input,
String clustersIn,
String output,
String measureClass,
String convergenceDelta) {
if (log.isInfoEnabled()) {
log.inf... | private static void runClustering(String input,
String clustersIn,
String output,
String measureClass,
String convergenceDelta) {
if (log.isInfoEnabled()) {
log.inf... |
private HeaderPrintWriter errorStream;
/**
Maintains a list of all the contexts that this thread has created
and/or used. The object stored in the thread local varys according
how this thread has been used and will be one of:
<UL>
<LI> null - the thread no affiliation with a context manager.
<LI> Conte... | private HeaderPrintWriter errorStream;
/**
Maintains a list of all the contexts that this thread has created
and/or used. The object stored in the thread local varys according
how this thread has been used and will be one of:
<UL>
<LI> null - the thread no affiliation with a context manager.
<LI> Conte... |
public Locale setLocale(Object serviceModule, String userDefinedLocale)
throws StandardException;
/**
Set the locale for the service at boot time. The passed-in
properties must be the one passed to the boot method.
@exception StandardException Cloudscape error.
*/
| public Locale setLocale(Object serviceModule, String userDefinedLocale)
throws StandardException;
/**
Set the locale for the service at boot time. The passed-in
properties must be the one passed to the boot method.
@exception StandardException Derby error.
*/
|
Derby interface for creating a stored form for
/*
Derby - Class org.apache.derby.iapi.services.io.Formatable
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 ow... | Derby interface for creating a stored form for
/*
Derby - Class org.apache.derby.iapi.services.io.Formatable
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 ow... |
Derby interface for identifying the format id for the
/*
Derby - Class org.apache.derby.iapi.services.io.TypedFormat
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 copy... | Derby interface for identifying the format id for the
/*
Derby - Class org.apache.derby.iapi.services.io.TypedFormat
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 copy... |
* public, static, etc.
* @see ClassBuilder#newMethodBuilder
* @see #newConstructorBuilder
*/
LocalField addField(String type, String name, int modifiers);
/**
Fully create the bytecode and load the
class using the ClassBuilder's ClassFactory.
@exception StandardException Standard Cloudscape policy... | * public, static, etc.
* @see ClassBuilder#newMethodBuilder
* @see #newConstructorBuilder
*/
LocalField addField(String type, String name, int modifiers);
/**
Fully create the bytecode and load the
class using the ClassBuilder's ClassFactory.
@exception StandardException Standard Derby policy
*/
|
public static final int DECRYPT = 2;
SecureRandom getSecureRandom();
/**
Returns a CipherProvider which is the encryption or decryption engine.
@param mode is either ENCRYPT or DECRYPT. The CipherProvider can only
do encryption or decryption but not both.
@exception StandardException Standard Cloudsca... | public static final int DECRYPT = 2;
SecureRandom getSecureRandom();
/**
Returns a CipherProvider which is the encryption or decryption engine.
@param mode is either ENCRYPT or DECRYPT. The CipherProvider can only
do encryption or decryption but not both.
@exception StandardException Standard Derby Er... |
public void readExternalFromArray(ArrayInputStream in)
throws IOException
{
arg_passer[0] = rawData;
rawLength = in.readCloudscapeUTF(arg_passer);
rawData = arg_passer[0];
// restoreToNull();
value = null;
stream = null;
// clear out the ... | public void readExternalFromArray(ArrayInputStream in)
throws IOException
{
arg_passer[0] = rawData;
rawLength = in.readDerbyUTF(arg_passer);
rawData = arg_passer[0];
// restoreToNull();
value = null;
stream = null;
// clear out the int a... |
public boolean hasReturnOutputParameter();
/**
Check that there are not output parameters defined
by the parameter set. If there are unknown parameter
types they are forced to input types. i.e. Cloudscape static method
calls with parameters that are array.
| public boolean hasReturnOutputParameter();
/**
Check that there are not output parameters defined
by the parameter set. If there are unknown parameter
types they are forced to input types. i.e. Derby static method
calls with parameters that are array.
|
public void testCreateAndManipulateCores() throws Exception {
CoreContainer cc = init(SOLR_XML_LOTS_SYSVARS, "SystemVars1", "SystemVars2", "new_one", "new_two");
try {
final CoreAdminHandler admin = new CoreAdminHandler(cc);
String instPathOne = new File(solrHomeDirectory, "new_one").getAbsolutePa... | public void testCreateAndManipulateCores() throws Exception {
CoreContainer cc = init(SOLR_XML_LOTS_SYSVARS, "SystemVars1", "SystemVars2", "new_one", "new_two");
try {
final CoreAdminHandler admin = new CoreAdminHandler(cc);
String instPathOne = new File(solrHomeDirectory, "new_one").getAbsolutePa... |
public void run() {
try {
TermsEnum termsEnum = MultiFields.getTerms(s.getIndexReader(), "body").iterator();
int seenTermCount = 0;
int shift;
int trigger;
if (totTermCount.get() == 0) {
... | public void run() {
try {
TermsEnum termsEnum = MultiFields.getTerms(s.getIndexReader(), "body").iterator();
int seenTermCount = 0;
int shift;
int trigger;
if (totTermCount.get() == 0) {
... |
public static int getJDBCType(String type)
{
if ("SMALLINT".equals(type))
return Types.SMALLINT;
if ("INTEGER".equals(type) || "INT".equals(type))
return Types.INTEGER;
if ("BIGINT".equals(type))
return Types.BIGINT;
if (type.equals("F... | public static int getJDBCType(String type)
{
if ("SMALLINT".equals(type))
return Types.SMALLINT;
if ("INTEGER".equals(type) || "INT".equals(type))
return Types.INTEGER;
if ("BIGINT".equals(type))
return Types.BIGINT;
if (type.equals("F... |
public List<Token> getSplits(String table, String cfName, Range range, int keysPerSplit)
{
List<Token> tokens = new ArrayList<Token>();
// we use the actual Range token for the first and last brackets of the splits to ensure correctness
tokens.add(range.left);
List<DecoratedKey>... | public List<Token> getSplits(String table, String cfName, Range range, int keysPerSplit)
{
List<Token> tokens = new ArrayList<Token>();
// we use the actual Range token for the first and last brackets of the splits to ensure correctness
tokens.add(range.left);
List<DecoratedKey>... |
private static List<PendingFile> createPendingFiles(Collection<SSTableReader> sstables, Collection<Range> ranges, OperationType type)
{
List<PendingFile> pending = new ArrayList<PendingFile>();
for (SSTableReader sstable : sstables)
{
Descriptor desc = sstable.descriptor;
... | private static List<PendingFile> createPendingFiles(Collection<SSTableReader> sstables, Collection<Range> ranges, OperationType type)
{
List<PendingFile> pending = new ArrayList<PendingFile>();
for (SSTableReader sstable : sstables)
{
Descriptor desc = sstable.descriptor;
... |
public ShardRequest[] constructRequest(ResponseBuilder rb) {
ShardRequest sreq = new ShardRequest();
GroupingSpecification groupingSpecification = rb.getGroupingSpec();
if (groupingSpecification.getFields().length == 0) {
return new ShardRequest[0];
}
sreq.purpose = ShardRequest.PURPOSE_GET... | public ShardRequest[] constructRequest(ResponseBuilder rb) {
ShardRequest sreq = new ShardRequest();
GroupingSpecification groupingSpecification = rb.getGroupingSpec();
if (groupingSpecification.getFields().length == 0) {
return new ShardRequest[0];
}
sreq.purpose = ShardRequest.PURPOSE_GET... |
public BinaryMemtable(ColumnFamilyStore cfs)
{
this.cfs = cfs;
condition = lock.newCondition();
}
boolean isThresholdViolated()
{
return currentSize.get() >= threshold;
}
/*
* This version is used by the external clients to put data into
* the memtable. Th... | public BinaryMemtable(ColumnFamilyStore cfs)
{
this.cfs = cfs;
condition = lock.newCondition();
}
boolean isThresholdViolated()
{
return currentSize.get() >= threshold;
}
/*
* This version is used by the external clients to put data into
* the memtable. Th... |
public List<Row> search(IndexClause clause, AbstractBounds range, IFilter dataFilter)
{
// Start with the most-restrictive indexed clause, then apply remaining clauses
// to each row matching that clause.
// TODO: allow merge join instead of just one index + loop
IndexExpression ... | public List<Row> search(IndexClause clause, AbstractBounds range, IFilter dataFilter)
{
// Start with the most-restrictive indexed clause, then apply remaining clauses
// to each row matching that clause.
// TODO: allow merge join instead of just one index + loop
IndexExpression ... |
private static void sendMessages(String localDataCenter, Map<String, Multimap<Message, InetAddress>> dcMessages)
throws IOException
{
for (Map.Entry<String, Multimap<Message, InetAddress>> entry: dcMessages.entrySet())
{
String dataCenter = entry.getKey();
// Grab a ... | private static void sendMessages(String localDataCenter, Map<String, Multimap<Message, InetAddress>> dcMessages)
throws IOException
{
for (Map.Entry<String, Multimap<Message, InetAddress>> entry: dcMessages.entrySet())
{
String dataCenter = entry.getKey();
// Grab a ... |
public void eval(MockRAMDirectory dir) throws IOException {
StackTraceElement[] trace = new Exception().getStackTrace();
for (int i = 0; i < trace.length; i++) {
if ("doMerge".equals(trace[i].getMethodName()))
throw new IOException("now failing during merge");
}
}
}
pub... | public void eval(MockRAMDirectory dir) throws IOException {
StackTraceElement[] trace = new Exception().getStackTrace();
for (int i = 0; i < trace.length; i++) {
if ("doMerge".equals(trace[i].getMethodName()))
throw new IOException("now failing during merge");
}
}
}
pub... |
public MockIndexWriter(Directory dir, Analyzer a, boolean create, MaxFieldLength mfl) throws IOException {
super(dir, false, a, create, mfl);
}
boolean testPoint(String name) {
if (doFail.get() != null && !name.equals("startDoFlush") && r.nextInt(20) == 17) {
if (DEBUG) {
Syst... | public MockIndexWriter(Directory dir, Analyzer a, boolean create, MaxFieldLength mfl) throws IOException {
super(dir, a, create, mfl);
}
boolean testPoint(String name) {
if (doFail.get() != null && !name.equals("startDoFlush") && r.nextInt(20) == 17) {
if (DEBUG) {
System.out.... |
public void runStressTest(Directory directory, boolean autoCommit, MergeScheduler mergeScheduler) throws Exception {
IndexWriter modifier = new IndexWriter(directory, autoCommit, ANALYZER, true, IndexWriter.MaxFieldLength.LIMITED);
modifier.setMaxBufferedDocs(10);
TimedThread[] threads = new TimedThread... | public void runStressTest(Directory directory, boolean autoCommit, MergeScheduler mergeScheduler) throws Exception {
IndexWriter modifier = new IndexWriter(directory, autoCommit, ANALYZER, true);
modifier.setMaxBufferedDocs(10);
TimedThread[] threads = new TimedThread[4];
int numThread = 0;
if ... |
public SegmentInfo(String name, int docCount, Directory dir, boolean isCompoundFile, boolean hasSingleNormFile,
int docStoreOffset, String docStoreSegment, boolean docStoreIsCompoundFile, boolean hasProx) {
this(name, docCount, dir);
this.isCompoundFile = (byte) (isCompoundFile ? YES : N... | public SegmentInfo(String name, int docCount, Directory dir, boolean isCompoundFile, boolean hasSingleNormFile,
int docStoreOffset, String docStoreSegment, boolean docStoreIsCompoundFile, boolean hasProx) {
this(name, docCount, dir);
this.isCompoundFile = (byte) (isCompoundFile ? YES : N... |
public int doLogic() throws IOException {
PerfRunData runData = getRunData();
Config config = runData.getConfig();
IndexWriter writer = new IndexWriter(runData.getDirectory(),
config.get("autocommit", DEFAULT_AUTO_COMMIT),
r... | public int doLogic() throws IOException {
PerfRunData runData = getRunData();
Config config = runData.getConfig();
IndexWriter writer = new IndexWriter(runData.getDirectory(),
config.get("autocommit", DEFAULT_AUTO_COMMIT),
r... |
public void doRandom(int iter, boolean ignoreCase) {
CharArrayMap<Integer> map = new CharArrayMap<Integer>(TEST_VERSION_CURRENT, 1, ignoreCase);
HashMap<String,Integer> hmap = new HashMap<String,Integer>();
char[] key;
for (int i=0; i<iter; i++) {
int len = r.nextInt(5);
key = new char[le... | public void doRandom(int iter, boolean ignoreCase) {
CharArrayMap<Integer> map = new CharArrayMap<Integer>(TEST_VERSION_CURRENT, 1, ignoreCase);
HashMap<String,Integer> hmap = new HashMap<String,Integer>();
char[] key;
for (int i=0; i<iter; i++) {
int len = r.nextInt(5);
key = new char[le... |
public Object transformRow(Map<String, Object> row, Context context) {
for (Map<String, String> fld : context.getAllEntityFields()) {
String style = context.replaceTokens(fld.get(FORMAT_STYLE));
if (style != null) {
String column = fld.get(DataImporter.COLUMN);
String srcCol = fld.get(... | public Object transformRow(Map<String, Object> row, Context context) {
for (Map<String, String> fld : context.getAllEntityFields()) {
String style = context.replaceTokens(fld.get(FORMAT_STYLE));
if (style != null) {
String column = fld.get(DataImporter.COLUMN);
String srcCol = fld.get(... |
public Filter makeFilter(SpatialArgs args) {
final SpatialOperation op = args.getOperation();
if (! SpatialOperation.is(op, SpatialOperation.IsWithin, SpatialOperation.Intersects, SpatialOperation.BBoxWithin, SpatialOperation.BBoxIntersects))
throw new UnsupportedSpatialOperation(op);
Shape shape =... | public Filter makeFilter(SpatialArgs args) {
final SpatialOperation op = args.getOperation();
if (! SpatialOperation.is(op, SpatialOperation.IsWithin, SpatialOperation.Intersects, SpatialOperation.BBoxWithin, SpatialOperation.BBoxIntersects))
throw new UnsupportedSpatialOperation(op);
Shape shape =... |
public Filter makeFilter(SpatialArgs args) {
final SpatialOperation op = args.getOperation();
if (! SpatialOperation.is(op, SpatialOperation.IsWithin, SpatialOperation.Intersects, SpatialOperation.BBoxWithin, SpatialOperation.BBoxIntersects))
throw new UnsupportedSpatialOperation(op);
Shape shape =... | public Filter makeFilter(SpatialArgs args) {
final SpatialOperation op = args.getOperation();
if (! SpatialOperation.is(op, SpatialOperation.IsWithin, SpatialOperation.Intersects, SpatialOperation.BBoxWithin, SpatialOperation.BBoxIntersects))
throw new UnsupportedSpatialOperation(op);
Shape shape =... |
protected TopGroups groupByFieldOrFunction(IndexSearcher searcher, Filter filter, Query query, int groupOffset, int groupLimit) throws IOException {
int topN = groupOffset + groupLimit;
final AbstractFirstPassGroupingCollector firstPassCollector;
final AbstractAllGroupsCollector allGroupsCollector;
fi... | protected TopGroups groupByFieldOrFunction(IndexSearcher searcher, Filter filter, Query query, int groupOffset, int groupLimit) throws IOException {
int topN = groupOffset + groupLimit;
final AbstractFirstPassGroupingCollector firstPassCollector;
final AbstractAllGroupsCollector allGroupsCollector;
fi... |
public TopGroups<BytesRef> result() {
if (firstPhaseGroups.isEmpty()) {
return new TopGroups<BytesRef>(groupSort.getSort(), sortWithinGroup.getSort(), 0, 0, new GroupDocs[0]);
}
| public TopGroups<BytesRef> result() {
if (firstPhaseGroups.isEmpty()) {
return new TopGroups<BytesRef>(groupSort.getSort(), sortWithinGroup.getSort(), 0, 0, new GroupDocs[0], Float.NaN);
}
|
public void process(ResponseBuilder rb, ShardRequest shardRequest) {
Sort groupSort = rb.getGroupingSpec().getGroupSort();
String[] fields = rb.getGroupingSpec().getFields();
String[] queries = rb.getGroupingSpec().getQueries();
Sort sortWithinGroup = rb.getGroupingSpec().getSortWithinGroup();
//... | public void process(ResponseBuilder rb, ShardRequest shardRequest) {
Sort groupSort = rb.getGroupingSpec().getGroupSort();
String[] fields = rb.getGroupingSpec().getFields();
String[] queries = rb.getGroupingSpec().getQueries();
Sort sortWithinGroup = rb.getGroupingSpec().getSortWithinGroup();
//... |
protected void readInternal(byte[] b, int offset, int len) throws IOException {
final ByteBuffer bb;
// Determine the ByteBuffer we should use
if (b == buffer && 0 == offset) {
// Use our own pre-wrapped byteBuf:
assert byteBuf != null;
byteBuf.clear();
byteBuf.li... | protected void readInternal(byte[] b, int offset, int len) throws IOException {
final ByteBuffer bb;
// Determine the ByteBuffer we should use
if (b == buffer && 0 == offset) {
// Use our own pre-wrapped byteBuf:
assert byteBuf != null;
byteBuf.clear();
byteBuf.li... |
public static void downloadFromZK(SolrZkClient zkClient, String zkPath,
File dir) throws IOException, KeeperException, InterruptedException {
List<String> files = zkClient.getChildren(zkPath, null, true);
for (String file : files) {
List<String> children = zkClient.getChildren(zkPath + "/" + ... | public static void downloadFromZK(SolrZkClient zkClient, String zkPath,
File dir) throws IOException, KeeperException, InterruptedException {
List<String> files = zkClient.getChildren(zkPath, null, true);
for (String file : files) {
List<String> children = zkClient.getChildren(zkPath + "/" + ... |
public String toString()
{
return socketChannel_.toString();
}
void closeSocket()
{
if (pendingWrites_.size() > 0)
logger_.error("Closing down connection " + socketChannel_ + " with " + pendingWrites_.size() + " writes remaining.");
cancel(key_);
... | public String toString()
{
return socketChannel_.toString();
}
void closeSocket()
{
if (pendingWrites_.size() > 0)
logger_.error("Closing down connection " + socketChannel_ + " with " + pendingWrites_.size() + " writes remaining.");
cancel(key_);
... |
public static final CharArraySet DEFAULT_ARTICLES = CharArraySet.unmodifiableSet(
new CharArraySet(Version.LUCENE_CURRENT, Arrays.asList(
"l", "m", "t", "qu", "n", "s", "j"), true));
| public static final CharArraySet DEFAULT_ARTICLES = CharArraySet.unmodifiableSet(
new CharArraySet(Version.LUCENE_CURRENT, Arrays.asList(
"l", "m", "t", "qu", "n", "s", "j", "d", "c", "jusqu", "quoiqu", "lorsqu", "puisqu"), true));
|
public int compress(byte[] input, int inputOffset, int inputLength, ICompressor.WrappedArray output, int outputOffset) throws IOException
{
Deflater def = deflater.get();
def.reset();
def.setInput(input, inputOffset, inputLength);
def.finish();
if (def.needsInput())
... | public int compress(byte[] input, int inputOffset, int inputLength, ICompressor.WrappedArray output, int outputOffset) throws IOException
{
Deflater def = deflater.get();
def.reset();
def.setInput(input, inputOffset, inputLength);
def.finish();
if (def.needsInput())
... |
public void testImportExportProcedureNegative() throws Exception
{
ResultSet rs = null;
CallableStatement cSt;
Statement st = createStatement();
String [][] expRS;
String [] expColNames;
st.executeUpdate(
"create schema iep");
st.ex... | public void testImportExportProcedureNegative() throws Exception
{
ResultSet rs = null;
CallableStatement cSt;
Statement st = createStatement();
String [][] expRS;
String [] expColNames;
st.executeUpdate(
"create schema iep");
st.ex... |
protected void decorateSQL(Statement s) throws SQLException
{
s.executeUpdate("create schema emc");
s.executeUpdate("create schema \"emcAddOn\"");
s.executeUpdate("create table emc.contacts " +
"(id int primary key, e_mail v... | protected void decorateSQL(Statement s) throws SQLException
{
s.executeUpdate("create schema emc");
s.executeUpdate("create schema \"emcAddOn\"");
s.executeUpdate("create table emc.contacts " +
"(id int primary key, e_mail v... |
public void doTest() throws Exception {
handle.clear();
handle.put("QTime", SKIPVAL);
handle.put("timestamp", SKIPVAL);
// start a couple indexing threads
indexThread = new StopableIndexingThread(0, true);
indexThread.start();
indexThread2 = new StopableIndexingThread(10000,... | public void doTest() throws Exception {
handle.clear();
handle.put("QTime", SKIPVAL);
handle.put("timestamp", SKIPVAL);
// start a couple indexing threads
indexThread = new StopableIndexingThread(0, true);
indexThread.start();
indexThread2 = new StopableIndexingThread(10000,... |
private String msg() {
ZkController zkController = uhandler.core.getCoreDescriptor().getCoreContainer().getZkController();
String myURL = "";
if (zkController != null) {
myURL = zkController.getZkServerAddress();
}
// TODO: core name turns up blank in many tests - find URL if cloud enable... | private String msg() {
ZkController zkController = uhandler.core.getCoreDescriptor().getCoreContainer().getZkController();
String myURL = "";
if (zkController != null) {
myURL = zkController.getBaseUrl();
}
// TODO: core name turns up blank in many tests - find URL if cloud enabled?
r... |
private void setResource(){
if (res != null){
return;
}
if ( locale == null || locale.toString().equals("none") ){
res = ResourceBundle.getBundle(MESSAGE_FILE);
}
else
try {
res = ResourceBundle.getBundle(messageFileName,locale);
}
catch(java.util.MissingResourceException e){
res = Resource... | private void setResource(){
if (res != null){
return;
}
if ( locale == null || locale.toString().equals("none") ){
res = ResourceBundle.getBundle(messageFileName);
}
else
try {
res = ResourceBundle.getBundle(messageFileName,locale);
}
catch(java.util.MissingResourceException e){
res = Resou... |
private static TreeSet clientMessageIds = new TreeSet();
/**
* Initialize the set of shared message ids
*/
static void initClientMessageIds()
{
// Add message ids that don't start with XJ here
clientMessageIds.add(SQLState.NO_CURRENT_CONNECTION);
clientMessageIds.a... | private static TreeSet clientMessageIds = new TreeSet();
/**
* Initialize the set of shared message ids
*/
static void initClientMessageIds()
{
// Add message ids that don't start with XJ here
clientMessageIds.add(SQLState.NO_CURRENT_CONNECTION);
clientMessageIds.a... |
protected static DRDAProtocolException newAgentError(DRDAConnThread agent,
int svrcod, String rdbnam, String srvdgn)
{
if ( SanityManager.DEBUG )
System.out.println("agentError in " + agent);
Object[] oa = {new Integer(svrcod), rdbnam, srvdgn};
return new DRDAProtocolException(DRDA_AgentErro... | protected static DRDAProtocolException newAgentError(DRDAConnThread agent,
int svrcod, String rdbnam, String srvdgn)
{
if ( SanityManager.DEBUG )
agent.trace("agentError in " + agent);
Object[] oa = {new Integer(svrcod), rdbnam, srvdgn};
return new DRDAProtocolException(DRDA_AgentError,
... |
public boolean skipTo(int target) throws IOException {
if (scorerQueue == null) {
initScorerQueue();
}
if (scorerQueue.size() < minimumNrMatchers) {
return false;
}
if (target <= currentDoc) {
target = currentDoc + 1;
}
do {
Scorer top = (Scorer) scorerQueue.top();
... | public boolean skipTo(int target) throws IOException {
if (scorerQueue == null) {
initScorerQueue();
}
if (scorerQueue.size() < minimumNrMatchers) {
return false;
}
if (target <= currentDoc) {
return true;
}
do {
Scorer top = (Scorer) scorerQueue.top();
if (to... |
private SegmentInfoPerCommit merge(Directory dir, SegmentInfoPerCommit si1, SegmentInfoPerCommit si2, String merged, boolean useCompoundFile)
throws Exception {
IOContext context = newIOContext(random());
SegmentReader r1 = new SegmentReader(si1, DirectoryReader.DEFAULT_TERMS_INDEX_DIVISOR, context);
... | private SegmentInfoPerCommit merge(Directory dir, SegmentInfoPerCommit si1, SegmentInfoPerCommit si2, String merged, boolean useCompoundFile)
throws Exception {
IOContext context = newIOContext(random());
SegmentReader r1 = new SegmentReader(si1, DirectoryReader.DEFAULT_TERMS_INDEX_DIVISOR, context);
... |
public void testMerge() throws IOException {
final Codec codec = Codec.getDefault();
final SegmentInfo si = new SegmentInfo(mergedDir, Constants.LUCENE_MAIN_VERSION, mergedSegment, -1, false, codec, null, null);
SegmentMerger merger = new SegmentMerger(si, InfoStream.getDefault(), mergedDir, IndexWriterC... | public void testMerge() throws IOException {
final Codec codec = Codec.getDefault();
final SegmentInfo si = new SegmentInfo(mergedDir, Constants.LUCENE_MAIN_VERSION, mergedSegment, -1, false, codec, null, null);
SegmentMerger merger = new SegmentMerger(si, InfoStream.getDefault(), mergedDir, IndexWriterC... |
public void tryPerformAction(ConsistencyLevel cl) throws Exception
{
ByteBuffer bname = ByteBuffer.wrap(name.getBytes());
ColumnPath cpath = new ColumnPath(cf).setColumn(bname);
CounterColumn col = client.get_counter(key, cpath, cl).column;
assertEquals(bn... | public void tryPerformAction(ConsistencyLevel cl) throws Exception
{
ByteBuffer bname = ByteBuffer.wrap(name.getBytes());
ColumnPath cpath = new ColumnPath(cf).setColumn(bname);
CounterColumn col = client.get(key, cpath, cl).counter_column;
assertEquals(bn... |
public static ImportedBundle buildFragmentHost_(String fragmentHostHeader) throws InvalidAttributeException {
logger.debug(LOG_ENTRY, "buildFragmentHost_", new Object[]{fragmentHostHeader});
if(fragmentHostHeader == null) {
return null;
}
Map<String, Map<String, String>> parsedFragHost =... | public static ImportedBundle buildFragmentHost_(String fragmentHostHeader) throws InvalidAttributeException {
logger.debug(LOG_ENTRY, "buildFragmentHost_", new Object[]{fragmentHostHeader});
if(fragmentHostHeader == null) {
return null;
}
Map<String, Map<String, String>> parsedFragHost =... |
private void testCollectionsAPI() throws Exception {
// TODO: fragile - because we dont pass collection.confName, it will only
// find a default if a conf set with a name matching the collection name is found, or
// if there is only one conf set. That and the fact that other tests run first in this
... | private void testCollectionsAPI() throws Exception {
// TODO: fragile - because we dont pass collection.confName, it will only
// find a default if a conf set with a name matching the collection name is found, or
// if there is only one conf set. That and the fact that other tests run first in this
... |
public DistributedRowMatrix times(DistributedRowMatrix other) throws IOException {
if (numRows != other.numRows()) {
throw new CardinalityException(numRows, other.numRows());
}
Path outPath = new Path(outputTmpBasePath.getParent(), "productWith");
JobConf conf = MatrixMultiplicationJob.createMat... | public DistributedRowMatrix times(DistributedRowMatrix other) throws IOException {
if (numRows != other.numRows()) {
throw new CardinalityException(numRows, other.numRows());
}
Path outPath = new Path(outputTmpBasePath.getParent(), "productWith");
JobConf conf = MatrixMultiplicationJob.createMat... |
public ICompactSerializer2<IColumn> getColumnSerializer()
{
return metadata.cfType == ColumnFamilyType.Standard
? Column.serializer()
: SuperColumn.serializer(getColumnComparator());
}
| public ICompactSerializer2<IColumn> getColumnSerializer()
{
return metadata.cfType == ColumnFamilyType.Standard
? Column.serializer()
: SuperColumn.serializer(metadata.subcolumnComparator);
}
|
public static Query formSimilarQuery( String body,
Analyzer a,
String field,
Set stop)
throws IOException
{
TokenStream ts = a.tokenStream( field, new StringReader( body));
org.apache.lucene.analysis.Token t;
BooleanQuery tmp = new BooleanQuery();
Set alread... | public static Query formSimilarQuery( String body,
Analyzer a,
String field,
Set stop)
throws IOException
{
TokenStream ts = a.tokenStream( field, new StringReader( body));
org.apache.lucene.analysis.Token t;
BooleanQuery tmp = new BooleanQuery();
Set alread... |
public static void main(String[] args) throws Exception {
if (args.length != 6) {
System.out.println("\nUsage: java org.apache.lucene.store.LockStressTest myID verifierHostOrIP verifierPort lockFactoryClassName lockDirName sleepTime\n" +
"\n" +
" myID = in... | public static void main(String[] args) throws Exception {
if (args.length != 6) {
System.out.println("\nUsage: java org.apache.lucene.store.LockStressTest myID verifierHostOrIP verifierPort lockFactoryClassName lockDirName sleepTime\n" +
"\n" +
" myID = in... |
public void run() {
createSnapshot(indexCommit, numberToKeep, replicationHandler);
}
}.start();
}
void createSnapshot(final IndexCommit indexCommit, int numberToKeep, ReplicationHandler replicationHandler) {
LOG.info("Creating backup snapshot...");
NamedList<Object> details = new Na... | public void run() {
createSnapshot(indexCommit, numberToKeep, replicationHandler);
}
}.start();
}
void createSnapshot(final IndexCommit indexCommit, int numberToKeep, ReplicationHandler replicationHandler) {
LOG.info("Creating backup snapshot...");
NamedList<Object> details = new Na... |
public void testBasic() throws IOException {
URI uri = dfsCluster.getURI();
Path lockPath = new Path(uri.toString(), "/basedir/lock");
HdfsLockFactory lockFactory = new HdfsLockFactory(lockPath, new Configuration());
Lock lock = lockFactory.makeLock("testlock");
boolean success = lock.obtain();
... | public void testBasic() throws IOException {
URI uri = dfsCluster.getURI();
Path lockPath = new Path(uri.toString(), "/basedir/lock");
HdfsLockFactory lockFactory = new HdfsLockFactory(lockPath, new Configuration());
Lock lock = lockFactory.makeLock("testlock");
boolean success = lock.obtain();
... |
public void callback(Object key);
} | public void callback();
} |
public void setBoolean(int parameterIndex, boolean x) throws SQLException {
try
{
synchronized (connection_) {
if (agent_.loggingEnabled()) {
agent_.logWriter_.traceEntry(this, "setBoolean", parameterIndex, x);
}
... | public void setBoolean(int parameterIndex, boolean x) throws SQLException {
try
{
synchronized (connection_) {
if (agent_.loggingEnabled()) {
agent_.logWriter_.traceEntry(this, "setBoolean", parameterIndex, x);
}
... |
private void buildFDODTA(int numVars,
int[][] protocolTypesAndLengths,
Object[] inputs) throws SqlException {
try
{
Object o = null;
markLengthBytes(CodePoint.FDODTA);
write1Byte(FdocaConstant... | private void buildFDODTA(int numVars,
int[][] protocolTypesAndLengths,
Object[] inputs) throws SqlException {
try
{
Object o = null;
markLengthBytes(CodePoint.FDODTA);
write1Byte(FdocaConstant... |
public LogWatcherConfig getLogWatcherConfig() {
return new LogWatcherConfig(
getBool(CfgProp.SOLR_LOGGING_ENABLED, false),
get(CfgProp.SOLR_LOGGING_CLASS, null),
get(CfgProp.SOLR_LOGGING_WATCHER_THRESHOLD, null),
getInt(CfgProp.SOLR_LOGGING_WATCHER_SIZE, 50)
);
}
| public LogWatcherConfig getLogWatcherConfig() {
return new LogWatcherConfig(
getBool(CfgProp.SOLR_LOGGING_ENABLED, true),
get(CfgProp.SOLR_LOGGING_CLASS, null),
get(CfgProp.SOLR_LOGGING_WATCHER_THRESHOLD, null),
getInt(CfgProp.SOLR_LOGGING_WATCHER_SIZE, 50)
);
}
|
public int compare(Passage left, Passage right) {
return left.startOffset - right.startOffset;
}
});
return passages;
}
// advance breakiterator
assert BreakIterator.DONE < 0;
current.startOffset = Math.max(bi.preceding(start+1), ... | public int compare(Passage left, Passage right) {
return left.startOffset - right.startOffset;
}
});
return passages;
}
// advance breakiterator
assert BreakIterator.DONE < 0;
current.startOffset = Math.max(bi.preceding(start+1), ... |
public Set<InetAddress> calculateNaturalEndpoints(Token searchToken, TokenMetadata tokenMetadata, String table)
{
int totalReplicas = getReplicationFactor(table);
Map<String, Integer> remainingReplicas = new HashMap<String, Integer>(datacenters.get(table));
Map<String, Set<String>> dcUse... | public Set<InetAddress> calculateNaturalEndpoints(Token searchToken, TokenMetadata tokenMetadata, String table)
{
int totalReplicas = getReplicationFactor(table);
Map<String, Integer> remainingReplicas = new HashMap<String, Integer>(datacenters.get(table));
Map<String, Set<String>> dcUse... |
private ValueNode timestampDiffBind()
throws StandardException
{
bindDateTimeArg( rightOperand, 2);
bindDateTimeArg( receiver, 3);
setType(DataTypeDescriptor.getBuiltInDataTypeDescriptor( Types.INTEGER));
return this;
} // End of timestampDiffBind
| private ValueNode timestampDiffBind()
throws StandardException
{
bindDateTimeArg( rightOperand, 2);
bindDateTimeArg( receiver, 3);
setType(DataTypeDescriptor.getBuiltInDataTypeDescriptor( Types.BIGINT));
return this;
} // End of timestampDiffBind
|
private void assertIndexQueryWorks(ColumnFamilyStore indexedCFS)
{
assert "Indexed1".equals(indexedCFS.getColumnFamilyName());
// make sure all sstables including 2ary indexes load from disk
indexedCFS.clearUnsafe();
for (ColumnFamilyStore indexCfs : indexedCFS.indexManager.getI... | private void assertIndexQueryWorks(ColumnFamilyStore indexedCFS)
{
assert "Indexed1".equals(indexedCFS.getColumnFamilyName());
// make sure all sstables including 2ary indexes load from disk
indexedCFS.clearUnsafe();
for (ColumnFamilyStore indexCfs : indexedCFS.indexManager.getI... |
public void testEnsureCapacity() {
OpenBitSet bits = new OpenBitSet(1);
int bit = random().nextInt(100) + 10;
bits.ensureCapacity(bit); // make room for more bits
bits.fastSet(bit);
assertTrue(bits.fastGet(bit));
bits.ensureCapacity(bit + 1);
bits.fastSet(bit + 1);
assertTrue(bits.fast... | public void testEnsureCapacity() {
OpenBitSet bits = new OpenBitSet(1);
int bit = random().nextInt(100) + 10;
bits.ensureCapacity(bit); // make room for more bits
bits.fastSet(bit);
assertTrue(bits.fastGet(bit));
bits.ensureCapacity(bit + 1);
bits.fastSet(bit + 1);
assertTrue(bits.fast... |
public void testSSLBasicDSPlainConnect()
throws Exception
{
DataSource ds = JDBCDataSource.getDataSource();
JDBCDataSource.setBeanProperty(ds,"createDatabase","create");
try {
Connection c2 = ds.getConnection();
c2.close();
fail();
... | public void testSSLBasicDSPlainConnect()
throws Exception
{
DataSource ds = JDBCDataSource.getDataSource();
JDBCDataSource.setBeanProperty(ds,"createDatabase","create");
try {
Connection c2 = ds.getConnection();
c2.close();
fail();
... |
public void testRandom() throws Exception {
for(int iter=0;iter<2*_TestUtil.getRandomMultiplier();iter++) {
Directory dir = new MockRAMDirectory();
IndexWriter w = new IndexWriter(dir, new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer()).setMergePolicy(NoMergePolicy.COMPOUND_FILES));
... | public void testRandom() throws Exception {
for(int iter=0;iter<2*_TestUtil.getRandomMultiplier();iter++) {
Directory dir = new MockRAMDirectory();
IndexWriter w = new IndexWriter(dir, new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer()).setMergePolicy(NoMergePolicy.COMPOUND_FILES));
... |
protected static void processOutput(JobConf job,
Path outputPath,
int[] firstIds,
TreeID[] keys,
Node[] trees,
PredictionCallbac... | protected static void processOutput(JobConf job,
Path outputPath,
int[] firstIds,
TreeID[] keys,
Node[] trees,
PredictionCallbac... |
abstract public byte[] getClobBytes_(int column, int[] dataOffset /*output*/) throws SqlException;
//------- the following getters perform any necessary cross-conversion _------
final boolean getBoolean(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types... | abstract public byte[] getClobBytes_(int column, int[] dataOffset /*output*/) throws SqlException;
//------- the following getters perform any necessary cross-conversion _------
final boolean getBoolean(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types... |
public void testPerFieldCodec() throws Exception {
final int NUM_DOCS = atLeast(173);
if (VERBOSE) {
System.out.println("TEST: NUM_DOCS=" + NUM_DOCS);
}
MockDirectoryWrapper dir = newDirectory();
dir.setCheckIndexOnClose(false); // we use a custom codec provider
| public void testPerFieldCodec() throws Exception {
final int NUM_DOCS = atLeast(173);
if (VERBOSE) {
System.out.println("TEST: NUM_DOCS=" + NUM_DOCS);
}
BaseDirectoryWrapper dir = newDirectory();
dir.setCheckIndexOnClose(false); // we use a custom codec provider
|
public void test() throws Exception {
// NOTE: if we see a fail on this test with "NestedPulsing" its because its
// reuse isnt perfect (but reasonable). see TestPulsingReuse.testNestedPulsing
// for more details
final MockDirectoryWrapper dir = newDirectory();
final TieredMergePolicy tmp = new ... | public void test() throws Exception {
// NOTE: if we see a fail on this test with "NestedPulsing" its because its
// reuse isnt perfect (but reasonable). see TestPulsingReuse.testNestedPulsing
// for more details
final MockDirectoryWrapper dir = newMockDirectory();
final TieredMergePolicy tmp = ... |
public void testStallControl() throws InterruptedException, IOException {
int[] numThreads = new int[] { 4 + random().nextInt(8), 1 };
final int numDocumentsToIndex = 50 + random().nextInt(50);
for (int i = 0; i < numThreads.length; i++) {
AtomicInteger numDocs = new AtomicInteger(numDocumentsToInd... | public void testStallControl() throws InterruptedException, IOException {
int[] numThreads = new int[] { 4 + random().nextInt(8), 1 };
final int numDocumentsToIndex = 50 + random().nextInt(50);
for (int i = 0; i < numThreads.length; i++) {
AtomicInteger numDocs = new AtomicInteger(numDocumentsToInd... |
private IndexWriter initIndex(Random random, boolean initialCommit) throws IOException {
return initIndex(random, newDirectory(random), initialCommit);
}
| private IndexWriter initIndex(Random random, boolean initialCommit) throws IOException {
return initIndex(random, newMockDirectory(random), initialCommit);
}
|
public void testRollingUpdates() throws Exception {
Random random = new Random(random().nextLong());
final MockDirectoryWrapper dir = newDirectory();
dir.setCheckIndexOnClose(false); // we use a custom codec provider
final LineFileDocs docs = new LineFileDocs(random, defaultCodecSupportsDocValues());
... | public void testRollingUpdates() throws Exception {
Random random = new Random(random().nextLong());
final BaseDirectoryWrapper dir = newDirectory();
dir.setCheckIndexOnClose(false); // we use a custom codec provider
final LineFileDocs docs = new LineFileDocs(random, defaultCodecSupportsDocValues());
... |
protected void handleCreateAction(SolrQueryRequest req, SolrQueryResponse rsp) throws SolrException {
SolrParams params = req.getParams();
CoreDescriptor dcore = buildCoreDescriptor(params, coreContainer);
if (coreContainer.getAllCoreNames().contains(dcore.getName())) {
log.warn("Creating a core w... | protected void handleCreateAction(SolrQueryRequest req, SolrQueryResponse rsp) throws SolrException {
SolrParams params = req.getParams();
CoreDescriptor dcore = buildCoreDescriptor(params, coreContainer);
if (coreContainer.getAllCoreNames().contains(dcore.getName())) {
log.warn("Creating a core w... |
public FieldInfos read(Directory directory, String segmentName, IOContext iocontext) throws IOException {
final String fileName = IndexFileNames.segmentFileName(segmentName, "", FIELD_INFOS_EXTENSION);
IndexInput input = directory.openInput(fileName, iocontext);
boolean hasVectors = false;
boolean ha... | public FieldInfos read(Directory directory, String segmentName, IOContext iocontext) throws IOException {
final String fileName = IndexFileNames.segmentFileName(segmentName, "", FIELD_INFOS_EXTENSION);
IndexInput input = directory.openInput(fileName, iocontext);
boolean hasVectors = false;
boolean ha... |
public void setUp() throws Exception {
super.setUp();
final String docText[] = {
"docThatNeverMatchesSoWeCanRequireLastDocCollectedToBeGreaterThanZero",
"one blah three",
"one foo three multiOne",
"one foobar three multiThree",
"blueberry pancakes",
"blueberry p... | public void setUp() throws Exception {
super.setUp();
final String docText[] = {
"docThatNeverMatchesSoWeCanRequireLastDocCollectedToBeGreaterThanZero",
"one blah three",
"one foo three multiOne",
"one foobar three multiThree",
"blueberry pancakes",
"blueberry p... |
public void testCachedThread_FullImport() throws Exception {
int numThreads = random.nextInt(9) + 1; // between one and 10
String config = getCachedConfig(random.nextBoolean(), random.nextBoolean(), numThreads);
runFullImport(config);
}
| public void testCachedThread_FullImport() throws Exception {
int numThreads = random.nextInt(8) + 2; // between 2 and 10
String config = getCachedConfig(random.nextBoolean(), random.nextBoolean(), numThreads);
runFullImport(config);
}
|
public synchronized void run() {
long started = System.currentTimeMillis();
try {
CommitUpdateCommand command = new CommitUpdateCommand( false );
command.waitFlush = true;
command.waitSearcher = true;
commit( command );
autoCommitCount++;
}
catch (Ex... | public synchronized void run() {
long started = System.currentTimeMillis();
try {
CommitUpdateCommand command = new CommitUpdateCommand( false );
command.waitFlush = true;
command.waitSearcher = true;
commit( command );
autoCommitCount++;
}
catch (Ex... |
public final String toString(String f) {
StringBuilder buffer = new StringBuilder();
if (!field.equals(f)) {
buffer.append(field);
buffer.append(":");
}
buffer.append("\"");
Iterator<Term[]> i = termArrays.iterator();
while (i.hasNext()) {
Term[] terms = i.next();
if (... | public final String toString(String f) {
StringBuilder buffer = new StringBuilder();
if (field == null || !field.equals(f)) {
buffer.append(field);
buffer.append(":");
}
buffer.append("\"");
Iterator<Term[]> i = termArrays.iterator();
while (i.hasNext()) {
Term[] terms = i.n... |
public FileInfo(long lasmodified, String name, long size, long checksum) {
this.lastmodified = lasmodified;
this.name = name;
this.size = size;
this.checksum = checksum;
}
Map<String, Object> getAsMap() {
Map<String, Object> map = new HashMap<String, Object>();
map.put(N... | public FileInfo(long lasmodified, String name, long size, long checksum) {
this.lastmodified = lasmodified;
this.name = name;
this.size = size;
this.checksum = checksum;
}
Map<String, Object> getAsMap() {
Map<String, Object> map = new HashMap<String, Object>();
map.put(N... |
public void testRollingUpdates() throws Exception {
Random random = new Random(random().nextLong());
final MockDirectoryWrapper dir = newDirectory();
dir.setCheckIndexOnClose(false); // we use a custom codec provider
final LineFileDocs docs = new LineFileDocs(random, true);
//provider.register(ne... | public void testRollingUpdates() throws Exception {
Random random = new Random(random().nextLong());
final BaseDirectoryWrapper dir = newDirectory();
dir.setCheckIndexOnClose(false); // we use a custom codec provider
final LineFileDocs docs = new LineFileDocs(random, true);
//provider.register(ne... |
private ResourceAdapter ra;
XADatabase (String dbName)
{
super(dbName);
}
/**
* Make a new connection using the database name and set
* the connection in the database
**/
synchronized void makeConnection(Properties p) throws
SQLException
{
if (xaDataSource == null)
{
xaDataSource = new Embed... | private ResourceAdapter ra;
XADatabase (String dbName)
{
super(dbName);
}
/**
* Make a new connection using the database name and set
* the connection in the database
**/
synchronized void makeConnection(Properties p) throws
SQLException
{
if (xaDataSource == null)
{
xaDataSource = new Embed... |
private static final String ALREADY_CLOSED_ERR_MESSAGE =
SqlException.getMessageUtil().getTextMessage(
MessageId.CONN_ALREADY_CLOSED);
| private static final String ALREADY_CLOSED_ERR_MESSAGE =
SqlException.getMessageUtil().getTextMessage(
MessageId.OBJECT_CLOSED);
|
private static final String MESSAGE =
MessageService.getTextMessage(MessageId.CONN_ALREADY_CLOSED);
| private static final String MESSAGE =
MessageService.getTextMessage(MessageId.OBJECT_CLOSED);
|
String OBJECT_CLOSED = "J104";
/*
Derby - Class org.apache.derby.shared.common.reference.MessageId
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional informati... | String OBJECT_CLOSED = "J104";
/*
Derby - Class org.apache.derby.shared.common.reference.MessageId
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional informati... |
private void doCommit() throws IOException {
SolrQueryRequest req = new LocalSolrQueryRequest(solrCore,
new ModifiableSolrParams());
// reboot the writer on the new index and get a new searcher
solrCore.getUpdateHandler().newIndexWriter();
try {
// first try to open an NRT searcher ... | private void doCommit() throws IOException {
SolrQueryRequest req = new LocalSolrQueryRequest(solrCore,
new ModifiableSolrParams());
// reboot the writer on the new index and get a new searcher
solrCore.getUpdateHandler().newIndexWriter(true);
try {
// first try to open an NRT searc... |
public synchronized void addDatum(double datum, double weight) {
double oldTotalWeight = totalWeight;
totalWeight += weight;
if (oldTotalWeight <= 0.0) {
average = datum * weight;
} else {
average = average * oldTotalWeight / totalWeight + datum * weight / totalWeight;
}
}
| public synchronized void addDatum(double datum, double weight) {
double oldTotalWeight = totalWeight;
totalWeight += weight;
if (oldTotalWeight <= 0.0) {
average = datum;
} else {
average = average * oldTotalWeight / totalWeight + datum * weight / totalWeight;
}
}
|
String LANG_IO_EXCEPTION = "X0X63.S";
/*
Derby - Class org.apache.derby.shared.common.reference.SQLState
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additio... | String LANG_IO_EXCEPTION = "X0X63.S";
/*
Derby - Class org.apache.derby.shared.common.reference.SQLState
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additio... |
public Session(String[] arguments) throws IllegalArgumentException
{
float STDev = 0.1f;
CommandLineParser parser = new PosixParser();
try
{
CommandLine cmd = parser.parse(availableOptions, arguments);
if (cmd.hasOption("h"))
throw new Il... | public Session(String[] arguments) throws IllegalArgumentException
{
float STDev = 0.1f;
CommandLineParser parser = new PosixParser();
try
{
CommandLine cmd = parser.parse(availableOptions, arguments);
if (cmd.hasOption("h"))
throw new Il... |
public void testTrecFeedDirAllTypes() throws Exception {
File dataDir = _TestUtil.getTempDir("trecFeedAllTypes");
_TestUtil.unzip(getDataFile("trecdocs.zip"), dataDir);
TrecContentSource tcs = new TrecContentSource();
Properties props = new Properties();
props.setProperty("print.props", "false");... | public void testTrecFeedDirAllTypes() throws Exception {
File dataDir = _TestUtil.getTempDir("trecFeedAllTypes");
_TestUtil.unzip(getDataFile("trecdocs.zip"), dataDir);
TrecContentSource tcs = new TrecContentSource();
Properties props = new Properties();
props.setProperty("print.props", "false");... |
public void testGetAsciiStreamCreateClob() throws Exception {
//The String that will be used
//to do the inserts into the
//Clob.
String str = "Hi I am the insert String";
//Create the InputStream that will
//be used for comparing the Stream
... | public void testGetAsciiStreamCreateClob() throws Exception {
//The String that will be used
//to do the inserts into the
//Clob.
String str = "Hi I am the insert String";
//Create the InputStream that will
//be used for comparing the Stream
... |
public void testLRUCache() throws Exception {
final int n = 100;
testCache(new SimpleLRUCache(n), n);
}
| public void testLRUCache() throws Exception {
final int n = 100;
testCache(new SimpleLRUCache<Integer,Object>(n), n);
}
|
private final SegmentReader origInstance;
TermInfosReader tis;
FieldsReader fieldsReaderOrig;
TermVectorsReader termVectorsReaderOrig;
CompoundFileReader cfsReader;
CompoundFileReader storeCFSReader;
CoreReaders(SegmentReader origInstance, Directory dir, SegmentInfo si, int readBufferSize,... | private final SegmentReader origInstance;
TermInfosReader tis;
FieldsReader fieldsReaderOrig;
TermVectorsReader termVectorsReaderOrig;
CompoundFileReader cfsReader;
CompoundFileReader storeCFSReader;
CoreReaders(SegmentReader origInstance, Directory dir, SegmentInfo si, int readBufferSize,... |
private void doExport() throws SQLException
{
try {
if (entityName == null && selectStatement == null)
throw LoadError.entityNameMissing();
if (outputFileName == null)
throw LoadError.dataFileNull();
try {
doAllTheWork();
} catch (IOException iex) {
//in case of ioexception, catch it... | private void doExport() throws SQLException
{
try {
if (entityName == null && selectStatement == null)
throw LoadError.entityNameMissing();
if (outputFileName == null)
throw LoadError.dataFileNull();
try {
doAllTheWork();
} catch (IOException iex) {
//in case of ioexception, catch it... |
public CharSequence system_update_column_family(CfDef cf_def) throws AvroRemoteException, InvalidRequestException
{
checkKeyspaceAndLoginAuthorized(Permission.WRITE);
if (cf_def.keyspace == null || cf_def.name == null)
throw newInvalidRequestException("Keyspace and CF name m... | public CharSequence system_update_column_family(CfDef cf_def) throws AvroRemoteException, InvalidRequestException
{
checkKeyspaceAndLoginAuthorized(Permission.WRITE);
if (cf_def.keyspace == null || cf_def.name == null)
throw newInvalidRequestException("Keyspace and CF name m... |
public void testAddIndexesWithCloseNoWait() throws Throwable {
final int NUM_COPY = 50;
CommitAndAddIndexes3 c = new CommitAndAddIndexes3(NUM_COPY);
if (VERBOSE) {
c.writer2.setInfoStream(System.out);
}
c.launchThreads(-1);
Thread.sleep(500);
// Close w/o first stopping/joining th... | public void testAddIndexesWithCloseNoWait() throws Throwable {
final int NUM_COPY = 50;
CommitAndAddIndexes3 c = new CommitAndAddIndexes3(NUM_COPY);
if (VERBOSE) {
c.writer2.setInfoStream(System.out);
}
c.launchThreads(-1);
Thread.sleep(_TestUtil.nextInt(random, 10, 500));
// Clos... |
public void setUp()
throws Exception {
super.initialCharLength = CLOBLENGTH;
super.initialByteLength = CLOBLENGTH *3; // All tamil letters.
super.bytesPerChar = BYTES_PER_CHAR;
EmbedStatement embStmt = (EmbedStatement)createStatement();
EmbedConnection embCon =(Em... | public void setUp()
throws Exception {
super.initialCharLength = CLOBLENGTH;
super.initialByteLength = CLOBLENGTH *3; // All tamil letters.
super.bytesPerChar = BYTES_PER_CHAR;
EmbedStatement embStmt = (EmbedStatement)createStatement();
EmbedConnection embCon =(Em... |
public void setUp()
throws Exception {
super.initialCharLength = CLOBLENGTH;
super.initialByteLength = CLOBLENGTH *3; // Only Tamil characters.
super.bytesPerChar = BYTES_PER_CHAR;
EmbedStatement embStmt = (EmbedStatement)createStatement();
EmbedConnection embCon ... | public void setUp()
throws Exception {
super.initialCharLength = CLOBLENGTH;
super.initialByteLength = CLOBLENGTH *3; // Only Tamil characters.
super.bytesPerChar = BYTES_PER_CHAR;
EmbedStatement embStmt = (EmbedStatement)createStatement();
EmbedConnection embCon ... |
public void testFunctionNullHandling() throws SQLException, UnsupportedEncodingException
{
Statement s = createStatement();
// Create three simple functions that take an integer and
// return its value as a VARCHAR().
s.executeUpdate(
"CREATE FUNCTION SV_NOCALL(I... | public void testFunctionNullHandling() throws SQLException, UnsupportedEncodingException
{
Statement s = createStatement();
// Create three simple functions that take an integer and
// return its value as a VARCHAR().
s.executeUpdate(
"CREATE FUNCTION SV_NOCALL(I... |
public void waitForThingsToLevelOut(int waitForRecTimeSeconds) throws Exception {
log.info("Wait for recoveries to finish - wait " + waitForRecTimeSeconds + " for each attempt");
int cnt = 0;
boolean retry = false;
do {
waitForRecoveriesToFinish(VERBOSE, waitForRecTimeSeconds);
try ... | public void waitForThingsToLevelOut(int waitForRecTimeSeconds) throws Exception {
log.info("Wait for recoveries to finish - wait " + waitForRecTimeSeconds + " for each attempt");
int cnt = 0;
boolean retry = false;
do {
waitForRecoveriesToFinish(VERBOSE, waitForRecTimeSeconds);
try ... |
public void run() {
try {
final LineFileDocs docs = new LineFileDocs(random);
int numDocs = 0;
while (System.nanoTime() < endTimeNanos) {
final int what = random.nextInt(3);
final NodeState node = nodes[random.nextInt(nodes.length)];
if (numDocs == 0 || wh... | public void run() {
try {
final LineFileDocs docs = new LineFileDocs(random, defaultCodecSupportsDocValues());
int numDocs = 0;
while (System.nanoTime() < endTimeNanos) {
final int what = random.nextInt(3);
final NodeState node = nodes[random.nextInt(nodes.length)];... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.