buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
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... |
private void checkTerms(Terms terms, Bits liveDocs, String... termsList) throws IOException {
assertNotNull(terms);
final TermsEnum te = terms.iterator(null);
for (String t : termsList) {
BytesRef b = te.next();
assertNotNull(b);
assertEquals(t, b.utf8ToString());
DocsEnum td ... | private void checkTerms(Terms terms, Bits liveDocs, String... termsList) throws IOException {
assertNotNull(terms);
final TermsEnum te = terms.iterator(null);
for (String t : termsList) {
BytesRef b = te.next();
assertNotNull(b);
assertEquals(t, b.utf8ToString());
DocsEnum td ... |
public void testCloseWithThreads() throws Exception {
int NUM_THREADS = 3;
int numIterations = TEST_NIGHTLY ? 7 : 3;
for(int iter=0;iter<numIterations;iter++) {
Directory dir = newDirectory();
IndexWriter writer = new IndexWriter(
dir,
newIndexWriterConfig(TEST_VERSION_CUR... | public void testCloseWithThreads() throws Exception {
int NUM_THREADS = 3;
int numIterations = TEST_NIGHTLY ? 7 : 3;
for(int iter=0;iter<numIterations;iter++) {
Directory dir = newDirectory();
IndexWriter writer = new IndexWriter(
dir,
newIndexWriterConfig(TEST_VERSION_CUR... |
public int docId(AtomicReader reader, Term term) throws IOException {
int docFreq = reader.docFreq(term);
assertEquals(1, docFreq);
DocsEnum termDocsEnum = reader.termDocsEnum(null, term.field, term.bytes, 0);
int nextDoc = termDocsEnum.nextDoc();
assertEquals(DocIdSetIterator.NO_MORE_DOCS, termDo... | public int docId(AtomicReader reader, Term term) throws IOException {
int docFreq = reader.docFreq(term);
assertEquals(1, docFreq);
DocsEnum termDocsEnum = reader.termDocsEnum(null, term.field, term.bytes, false);
int nextDoc = termDocsEnum.nextDoc();
assertEquals(DocIdSetIterator.NO_MORE_DOCS, te... |
private void verifyCount(IndexReader ir) throws Exception {
Fields fields = MultiFields.getFields(ir);
if (fields == null) {
return;
}
FieldsEnum e = fields.iterator();
String field;
while ((field = e.next()) != null) {
Terms terms = fields.terms(field);
if (terms == null) {
... | private void verifyCount(IndexReader ir) throws Exception {
Fields fields = MultiFields.getFields(ir);
if (fields == null) {
return;
}
FieldsEnum e = fields.iterator();
String field;
while ((field = e.next()) != null) {
Terms terms = fields.terms(field);
if (terms == null) {
... |
public int[] toDocsArray(Term term, Bits bits, IndexReader reader)
throws IOException {
Fields fields = MultiFields.getFields(reader);
Terms cterms = fields.terms(term.field);
TermsEnum ctermsEnum = cterms.iterator(null);
if (ctermsEnum.seekExact(new BytesRef(term.text()), false)) {
DocsEn... | public int[] toDocsArray(Term term, Bits bits, IndexReader reader)
throws IOException {
Fields fields = MultiFields.getFields(reader);
Terms cterms = fields.terms(term.field);
TermsEnum ctermsEnum = cterms.iterator(null);
if (ctermsEnum.seekExact(new BytesRef(term.text()), false)) {
DocsEn... |
private void verifyTermDocs(Directory dir, Term term, int numDocs)
throws IOException {
IndexReader reader = DirectoryReader.open(dir);
DocsEnum docsEnum = _TestUtil.docs(random(), reader, term.field, term.bytes, null, null, 0);
int count = 0;
while (docsEnum.nextDoc() != DocIdSetIterator.NO_MOR... | private void verifyTermDocs(Directory dir, Term term, int numDocs)
throws IOException {
IndexReader reader = DirectoryReader.open(dir);
DocsEnum docsEnum = _TestUtil.docs(random(), reader, term.field, term.bytes, null, null, false);
int count = 0;
while (docsEnum.nextDoc() != DocIdSetIterator.NO... |
public int doTest(int iter, int ndocs, int maxTF, float percentDocs) throws IOException {
Directory dir = newDirectory();
long start = System.currentTimeMillis();
addDocs(random(), dir, ndocs, "foo", "val", maxTF, percentDocs);
long end = System.currentTimeMillis();
if (VERBOSE) System.out.printl... | public int doTest(int iter, int ndocs, int maxTF, float percentDocs) throws IOException {
Directory dir = newDirectory();
long start = System.currentTimeMillis();
addDocs(random(), dir, ndocs, "foo", "val", maxTF, percentDocs);
long end = System.currentTimeMillis();
if (VERBOSE) System.out.printl... |
public void testCodec() throws Exception {
Directory dir = new AppendingRAMDirectory(random(), new RAMDirectory());
IndexWriterConfig cfg = new IndexWriterConfig(Version.LUCENE_40, new MockAnalyzer(random()));
cfg.setCodec(new AppendingCodec());
((TieredMergePolicy)cfg.getMergePolicy()).setUseCom... | public void testCodec() throws Exception {
Directory dir = new AppendingRAMDirectory(random(), new RAMDirectory());
IndexWriterConfig cfg = new IndexWriterConfig(Version.LUCENE_40, new MockAnalyzer(random()));
cfg.setCodec(new AppendingCodec());
((TieredMergePolicy)cfg.getMergePolicy()).setUseCom... |
public DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs) throws IOException {
final AtomicReader reader = context.reader();
final Fields fields = reader.fields();
if (fields == null) {
// reader has no fields
return DocIdSet.EMPTY_DOCIDSET;
}
final Terms terms = field... | public DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs) throws IOException {
final AtomicReader reader = context.reader();
final Fields fields = reader.fields();
if (fields == null) {
// reader has no fields
return DocIdSet.EMPTY_DOCIDSET;
}
final Terms terms = field... |
public synchronized ShapeFieldCache<T> getCache(AtomicReader reader) throws IOException {
ShapeFieldCache<T> idx = sidx.get(reader);
if (idx != null) {
return idx;
}
long startTime = System.currentTimeMillis();
log.fine("Building Cache [" + reader.maxDoc() + "]");
idx = new ShapeFieldCa... | public synchronized ShapeFieldCache<T> getCache(AtomicReader reader) throws IOException {
ShapeFieldCache<T> idx = sidx.get(reader);
if (idx != null) {
return idx;
}
long startTime = System.currentTimeMillis();
log.fine("Building Cache [" + reader.maxDoc() + "]");
idx = new ShapeFieldCa... |
private FixedBitSet createExpectedResult(String queryValue, boolean from, IndexReader topLevelReader, IndexIterationContext context) throws IOException {
final Map<String, List<RandomDoc>> randomValueDocs;
final Map<String, List<RandomDoc>> linkValueDocuments;
if (from) {
randomValueDocs = context.r... | private FixedBitSet createExpectedResult(String queryValue, boolean from, IndexReader topLevelReader, IndexIterationContext context) throws IOException {
final Map<String, List<RandomDoc>> randomValueDocs;
final Map<String, List<RandomDoc>> linkValueDocuments;
if (from) {
randomValueDocs = context.r... |
public DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs) throws IOException {
AtomicReader reader = context.reader();
FixedBitSet result = new FixedBitSet(reader.maxDoc());
Fields fields = reader.fields();
if (fields == null) {
return result;
}
BytesRef br = new BytesR... | public DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs) throws IOException {
AtomicReader reader = context.reader();
FixedBitSet result = new FixedBitSet(reader.maxDoc());
Fields fields = reader.fields();
if (fields == null) {
return result;
}
BytesRef br = new BytesR... |
protected Map<CategoryPath, Integer> facetCountsTruth() throws IOException {
FacetIndexingParams iParams = getFacetIndexingParams(Integer.MAX_VALUE);
String delim = String.valueOf(iParams.getFacetDelimChar());
Map<CategoryPath, Integer> res = new HashMap<CategoryPath, Integer>();
HashSet<Term> handled... | protected Map<CategoryPath, Integer> facetCountsTruth() throws IOException {
FacetIndexingParams iParams = getFacetIndexingParams(Integer.MAX_VALUE);
String delim = String.valueOf(iParams.getFacetDelimChar());
Map<CategoryPath, Integer> res = new HashMap<CategoryPath, Integer>();
HashSet<Term> handled... |
private void recount(FacetResultNode fresNode, ScoredDocIDs docIds)
throws IOException {
// TODO (Facet): change from void to return the new, smaller docSet, and use
// that for the children, as this will make their intersection ops faster.
// can do this only when the new set is "sufficiently" smal... | private void recount(FacetResultNode fresNode, ScoredDocIDs docIds)
throws IOException {
// TODO (Facet): change from void to return the new, smaller docSet, and use
// that for the children, as this will make their intersection ops faster.
// can do this only when the new set is "sufficiently" smal... |
public int getOrdinal(CategoryPath categoryPath) throws IOException {
ensureOpen();
if (categoryPath.length()==0) {
return ROOT_ORDINAL;
}
String path = categoryPath.toString(delimiter);
// First try to find the answer in the LRU cache:
synchronized(ordinalCache) {
Integer res = o... | public int getOrdinal(CategoryPath categoryPath) throws IOException {
ensureOpen();
if (categoryPath.length()==0) {
return ROOT_ORDINAL;
}
String path = categoryPath.toString(delimiter);
// First try to find the answer in the LRU cache:
synchronized(ordinalCache) {
Integer res = o... |
private static float[] getFloats(FileFloatSource ffs, IndexReader reader) {
float[] vals = new float[reader.maxDoc()];
if (ffs.defVal != 0) {
Arrays.fill(vals, ffs.defVal);
}
InputStream is;
String fname = "external_" + ffs.field.getName();
try {
is = VersionedFile.getLatestFile(ff... | private static float[] getFloats(FileFloatSource ffs, IndexReader reader) {
float[] vals = new float[reader.maxDoc()];
if (ffs.defVal != 0) {
Arrays.fill(vals, ffs.defVal);
}
InputStream is;
String fname = "external_" + ffs.field.getName();
try {
is = VersionedFile.getLatestFile(ff... |
private static Document getFirstLiveDoc(AtomicReader reader, String fieldName, Terms terms) throws IOException {
DocsEnum docsEnum = null;
TermsEnum termsEnum = terms.iterator(null);
BytesRef text;
// Deal with the chance that the first bunch of terms are in deleted documents. Is there a better way?
... | private static Document getFirstLiveDoc(AtomicReader reader, String fieldName, Terms terms) throws IOException {
DocsEnum docsEnum = null;
TermsEnum termsEnum = terms.iterator(null);
BytesRef text;
// Deal with the chance that the first bunch of terms are in deleted documents. Is there a better way?
... |
public NamedList<Integer> getFacetTermEnumCounts(SolrIndexSearcher searcher, DocSet docs, String field, int offset, int limit, int mincount, boolean missing, String sort, String prefix)
throws IOException {
/* :TODO: potential optimization...
* cache the Terms with the highest docFreq and try them first
... | public NamedList<Integer> getFacetTermEnumCounts(SolrIndexSearcher searcher, DocSet docs, String field, int offset, int limit, int mincount, boolean missing, String sort, String prefix)
throws IOException {
/* :TODO: potential optimization...
* cache the Terms with the highest docFreq and try them first
... |
protected int getFirstMatch(IndexReader r, Term t) throws IOException {
Fields fields = MultiFields.getFields(r);
if (fields == null) return -1;
Terms terms = fields.terms(t.field());
if (terms == null) return -1;
BytesRef termBytes = t.bytes();
final TermsEnum termsEnum = terms.iterator(null)... | protected int getFirstMatch(IndexReader r, Term t) throws IOException {
Fields fields = MultiFields.getFields(r);
if (fields == null) return -1;
Terms terms = fields.terms(t.field());
if (terms == null) return -1;
BytesRef termBytes = t.bytes();
final TermsEnum termsEnum = terms.iterator(null)... |
public int run(String[] args) throws IOException, ClassNotFoundException, InterruptedException {
addInputOption();
addOutputOption();
Map<String,String> parsedArgs = parseArguments(args);
if (parsedArgs == null) {
return -1;
}
Path prefsFile = getInputPath();
Path outputPa... | public int run(String[] args) throws IOException, ClassNotFoundException, InterruptedException {
addInputOption();
addOutputOption();
Map<String,String> parsedArgs = parseArguments(args);
if (parsedArgs == null) {
return -1;
}
Path prefsFile = getInputPath();
Path outputPa... |
protected void writeExternal_v10_2(ObjectOutput out) throws IOException
{
// write the format id of this conglomerate
FormatIdUtil.writeFormatIdInteger(out, this.getTypeFormatId());
out.writeInt((int) id.getSegmentId());
out.writeLong(id.getContainerId());
// write number of co... | protected void writeExternal_v10_2(ObjectOutput out) throws IOException
{
// write the format id of this conglomerate
FormatIdUtil.writeFormatIdInteger(out, conglom_format_id);
out.writeInt((int) id.getSegmentId());
out.writeLong(id.getContainerId());
// write number of columns... |
private void go()
throws Exception
{
try
{
// Connect to the database, prepare statements,
// and load id-to-name mappings.
this.conn = DriverManager.getConnection(sourceDBUrl);
prepForDump();
boolean at10_6 = atVersion( conn, 10, 6 );
boolean at10_9 = atVersion( conn, 10, ... | private void go()
throws Exception
{
try
{
// Connect to the database, prepare statements,
// and load id-to-name mappings.
this.conn = DriverManager.getConnection(sourceDBUrl);
prepForDump();
boolean at10_6 = atVersion( conn, 10, 6 );
boolean at10_9 = atVersion( conn, 10, ... |
private void describeKeySpace(String keySpaceName, KsDef metadata) throws TException
{
NodeProbe probe = sessionState.getNodeProbe();
// getting compaction manager MBean to displaying index building information
CompactionManagerMBean compactionManagerMBean = (probe == null) ? null : pro... | private void describeKeySpace(String keySpaceName, KsDef metadata) throws TException
{
NodeProbe probe = sessionState.getNodeProbe();
// getting compaction manager MBean to displaying index building information
CompactionManagerMBean compactionManagerMBean = (probe == null) ? null : pro... |
public static void main(String[] args) throws Throwable
{
if ( args.length != 2 )
{
System.out.println("Usage : java com.facebook.infrastructure.tools.ThreadListBuilder <directory containing files to be processed> <directory to dump the bloom filter in.>");
System.exit(1)... | public static void main(String[] args) throws Throwable
{
if ( args.length != 2 )
{
System.out.println("Usage : java org.apache.cassandra.tools.ThreadListBuilder <directory containing files to be processed> <directory to dump the bloom filter in.>");
System.exit(1);
... |
public static void main(String[] args) throws Throwable
{
if ( args.length != 3 )
{
System.out.println("Usage : java com.facebook.infrastructure.tools.TokenUpdater <ip:port> <token> <file containing node token info>");
System.exit(1);
}
String ipP... | public static void main(String[] args) throws Throwable
{
if ( args.length != 3 )
{
System.out.println("Usage : java org.apache.cassandra.tools.TokenUpdater <ip:port> <token> <file containing node token info>");
System.exit(1);
}
String ipPort = a... |
public boolean isPresent(String key)
{
for (int bucketIndex : getHashBuckets(key))
{
if (!filter_.get(bucketIndex))
{
return false;
}
}
return true;
}
/*
param@ key -- value whose hash is used to fill
the filt... | public boolean isPresent(String key)
{
for (int bucketIndex : getHashBuckets(key))
{
if (!filter_.get(bucketIndex))
{
return false;
}
}
return true;
}
/*
@param key -- value whose hash is used to fill
the filt... |
private static void printUsage()
{
System.err.println("");
System.err.println("Usage: cascli --host hostname [--port <portname>]");
System.err.println("");
}
| private static void printUsage()
{
System.err.println("");
System.err.println("Usage: cassandra-cli --host hostname [--port <portname>]");
System.err.println("");
}
|
private static final int COMPOSITE_BUNDLE_MASK =
Bundle.INSTALLED | Bundle.STARTING | Bundle.ACTIVE | Bundle.STOPPING;
| private static final int COMPOSITE_BUNDLE_MASK =
Bundle.INSTALLED | Bundle.RESOLVED | Bundle.STARTING | Bundle.ACTIVE | Bundle.STOPPING;
|
protected Row getReduced()
{
Comparator<IColumn> colComparator = filter.filter.getColumnComparator(comparator);
Iterator<IColumn> colCollated = IteratorUtils.collatedIterator(colComparator, colIters);
ColumnFamily returnCF = null;
... | protected Row getReduced()
{
Comparator<IColumn> colComparator = filter.filter.getColumnComparator(comparator);
Iterator<IColumn> colCollated = IteratorUtils.collatedIterator(colComparator, colIters);
ColumnFamily returnCF = null;
... |
public static double getRowsCachedFraction(String tableName, String columnFamilyName)
{
Double v = tableRowsCachedFractions_.get(Pair.create(tableName, columnFamilyName));
return v == null ? 0.01 : v;
}
| public static double getRowsCachedFraction(String tableName, String columnFamilyName)
{
Double v = tableRowsCachedFractions_.get(Pair.create(tableName, columnFamilyName));
return v == null ? 0 : v;
}
|
public TestBlueprintContainer(ComponentDefinitionRegistryImpl registry, ProxyManager proxyManager) throws Exception {
super(new TestBundleContext(), null, null, null, null, null, null, proxyManager);
this.registry = registry;
if (registry != null) {
registry.registerComponentDefi... | public TestBlueprintContainer(ComponentDefinitionRegistryImpl registry, ProxyManager proxyManager) throws Exception {
super(null, new TestBundleContext(), null, null, null, null, null, null, proxyManager);
this.registry = registry;
if (registry != null) {
registry.registerCompone... |
private void applyAllDeletes(DocumentsWriterDeleteQueue deleteQueue) throws IOException {
if (deleteQueue != null) {
synchronized (ticketQueue) {
// Freeze and insert the delete flush ticket in the queue
ticketQueue.add(new FlushTicket(deleteQueue.freezeGlobalBuffer(null), false));
a... | private void applyAllDeletes(DocumentsWriterDeleteQueue deleteQueue) throws IOException {
if (deleteQueue != null) {
synchronized (ticketQueue) {
// Freeze and insert the delete flush ticket in the queue
ticketQueue.add(new FlushTicket(deleteQueue.freezeGlobalBuffer(null), false));
a... |
public void run() {
try {
for(int j=0;j<NUM_ITER2;j++) {
writerFinal.forceMerge(1, false);
for(int k=0;k<17*(1+iFinal);k++) {
Document d = new Document();
d.add(newField("id", iterFinal + "_" + iFinal + "_" + j + "_"... | public void run() {
try {
for(int j=0;j<NUM_ITER2;j++) {
writerFinal.forceMerge(1, false);
for(int k=0;k<17*(1+iFinal);k++) {
Document d = new Document();
d.add(newField("id", iterFinal + "_" + iFinal + "_" + j + "_"... |
public void testDocValuesSimple() throws IOException {
Directory dir = newDirectory();
IndexWriter writer = new IndexWriter(dir, writerConfig(false));
for (int i = 0; i < 5; i++) {
Document doc = new Document();
doc.add(new PackedLongDocValuesField("docId", i));
doc.add(new TextField("do... | public void testDocValuesSimple() throws IOException {
Directory dir = newDirectory();
IndexWriter writer = new IndexWriter(dir, writerConfig(false));
for (int i = 0; i < 5; i++) {
Document doc = new Document();
doc.add(new PackedLongDocValuesField("docId", i));
doc.add(new TextField("do... |
public void testMixupDocs() throws Exception {
Directory dir = newDirectory();
IndexWriterConfig iwc = newIndexWriterConfig(TEST_VERSION_CURRENT, null);
iwc.setMergePolicy(newLogMergePolicy());
RandomIndexWriter writer = new RandomIndexWriter(random(), dir, iwc);
Document doc = new Document();
... | public void testMixupDocs() throws Exception {
Directory dir = newDirectory();
IndexWriterConfig iwc = newIndexWriterConfig(TEST_VERSION_CURRENT, null);
iwc.setMergePolicy(newLogMergePolicy());
RandomIndexWriter writer = new RandomIndexWriter(random(), dir, iwc);
Document doc = new Document();
... |
private static int runSequentially(Configuration conf, Path input, Path output)
throws IOException, ExecutionException, InterruptedException {
long start = System.currentTimeMillis();
// Run StreamingKMeans step in parallel by spawning 1 thread per input path to process.
ExecutorService pool = Executo... | private static int runSequentially(Configuration conf, Path input, Path output)
throws IOException, ExecutionException, InterruptedException {
long start = System.currentTimeMillis();
// Run StreamingKMeans step in parallel by spawning 1 thread per input path to process.
ExecutorService pool = Executo... |
public void copy(BytesRef bytes, BytesRef out) throws IOException {
int left = blockSize - upto;
if (bytes.length > left) {
if (currentBlock != null) {
blocks.add(currentBlock);
blockEnd.add(upto);
}
currentBlock = new byte[blockSize];
upto = 0;
left = blockSize;
... | public void copy(BytesRef bytes, BytesRef out) throws IOException {
int left = blockSize - upto;
if (bytes.length > left || currentBlock==null) {
if (currentBlock != null) {
blocks.add(currentBlock);
blockEnd.add(upto);
}
currentBlock = new byte[blockSize];
upto = 0;
... |
public static AbstractType getSubComparator(String tableName, String cfName)
{
assert tableName != null;
return getCFMetaData(tableName, cfName).comparator;
}
| public static AbstractType getSubComparator(String tableName, String cfName)
{
assert tableName != null;
return getCFMetaData(tableName, cfName).subcolumnComparator;
}
|
public void lock() throws KeeperException, InterruptedException {
if (lock.lock()) {
// we got the lock, just return
gotLock = true;
return;
}
// we need to wait for the lock
int cnt = 0;
while (!gotLock) {
if (cnt++ == 15) {
// get out of line
lock.unl... | public void lock() throws KeeperException, InterruptedException {
if (lock.lock()) {
// we got the lock, just return
gotLock = true;
return;
}
// we need to wait for the lock
int cnt = 0;
while (!gotLock) {
if (cnt++ == 15) {
// get out of line
lock.unl... |
public void testRemovedServiceWillUnregisterMBean() throws Exception{
Object service = new Object();
ServiceReference reference = mock(ServiceReference.class);
BundleContext bundleContext = mock(BundleContext.class);
Logger agentLogger = mock(Logger.class);
JMXAgentContext ... | public void testRemovedServiceWillUnregisterMBean() throws Exception{
Object service = new Object();
ServiceReference reference = mock(ServiceReference.class);
BundleContext bundleContext = mock(BundleContext.class);
Logger agentLogger = mock(Logger.class);
JMXAgentContext ... |
public void forceCompaction()
{
Set<String> columnFamilies = tableMetadata_.getColumnFamilies();
for ( String columnFamily : columnFamilies )
{
ColumnFamilyStore cfStore = columnFamilyStores_.get( columnFamily );
if ( cfStore != null )
MinorCompact... | public void forceCompaction()
{
Set<String> columnFamilies = tableMetadata_.getColumnFamilies();
for ( String columnFamily : columnFamilies )
{
ColumnFamilyStore cfStore = columnFamilyStores_.get( columnFamily );
if ( cfStore != null )
CompactionMa... |
private void testCompaction(String columnFamilyName, int insertsPerTable) throws IOException, ExecutionException, InterruptedException
{
Table table = Table.open("Keyspace1");
ColumnFamilyStore store = table.getColumnFamilyStore(columnFamilyName);
Set<String> inserted = new HashSet<Stri... | private void testCompaction(String columnFamilyName, int insertsPerTable) throws IOException, ExecutionException, InterruptedException
{
Table table = Table.open("Keyspace1");
ColumnFamilyStore store = table.getColumnFamilyStore(columnFamilyName);
Set<String> inserted = new HashSet<Stri... |
public void testCompactions() throws IOException, ExecutionException, InterruptedException
{
// this test does enough rows to force multiple block indexes to be used
Table table = Table.open("Keyspace1");
ColumnFamilyStore store = table.getColumnFamilyStore("Standard1");
final i... | public void testCompactions() throws IOException, ExecutionException, InterruptedException
{
// this test does enough rows to force multiple block indexes to be used
Table table = Table.open("Keyspace1");
ColumnFamilyStore store = table.getColumnFamilyStore("Standard1");
final i... |
public void testURLStream() throws IOException
{
String content = null;
URL url = new URL( "http://svn.apache.org/repos/asf/lucene/solr/trunk/" );
InputStream in = url.openStream();
try {
content = IOUtils.toString( in );
}
finally {
IOUtils.closeQuietly(in);
}
ass... | public void testURLStream() throws IOException
{
String content = null;
URL url = new URL( "http://svn.apache.org/repos/asf/lucene/dev/trunk/" );
InputStream in = url.openStream();
try {
content = IOUtils.toString( in );
}
finally {
IOUtils.closeQuietly(in);
}
asse... |
public boolean referencesSessionSchema()
throws StandardException
{
for (SubqueryNode sqn : this)
{
if (sqn.getResultSet().referencesSessionSchema())
{
return true;
}
}
return false;
}
| public boolean referencesSessionSchema()
throws StandardException
{
for (SubqueryNode sqn : this)
{
if (sqn.referencesSessionSchema())
{
return true;
}
}
return false;
}
|
public InputStream getResourceStream(String template_name) throws ResourceNotFoundException {
return loader.openResource(template_name);
}
| public InputStream getResourceStream(String template_name) throws ResourceNotFoundException {
return loader.openResource("velocity/" + template_name);
}
|
public GenericResultDescription(ResultColumnDescriptor[] columns,
String statementType)
{
this.columns = columns;
this.statementType = statementType;
}
| public GenericResultDescription(ResultColumnDescriptor[] columns,
String statementType)
{
this.columns = (ResultColumnDescriptor[]) ArrayUtil.copy( columns );
this.statementType = statementType;
}
|
public Collection<ColumnFamily> getColumnFamilies()
{
return modifications_.values();
}
void addHints(RowMutation rm) throws IOException
{
for (ColumnFamily cf : rm.getColumnFamilies())
{
byte[] combined = HintedHandOffManager.makeCombinedName(rm.getTable(), cf.m... | public Collection<ColumnFamily> getColumnFamilies()
{
return modifications_.values();
}
void addHints(RowMutation rm) throws IOException
{
for (ColumnFamily cf : rm.getColumnFamilies())
{
byte[] combined = HintedHandOffManager.makeCombinedName(rm.getTable(), cf.m... |
protected Row getReduced()
{
Comparator<IColumn> colComparator = QueryFilter.getColumnComparator(comparator);
Iterator<IColumn> colCollated = IteratorUtils.collatedIterator(colComparator, colIters);
ColumnFamily returnCF = null;
... | protected Row getReduced()
{
Comparator<IColumn> colComparator = QueryFilter.getColumnComparator(comparator);
Iterator<IColumn> colCollated = IteratorUtils.collatedIterator(colComparator, colIters);
ColumnFamily returnCF = null;
... |
public static final String VERSION = "8.3.0";
} | public static final String VERSION = "8.4.0";
} |
public void addToVector(byte[] originalForm, double weight, Vector data) {
int probes = getProbes();
String name = getName();
for (int i = 0; i < probes; i++) {
int n = hashForProbe(originalForm, data.size(), name, i);
if(isTraceEnabled()){
trace(name, n);
}
... | public void addToVector(byte[] originalForm, double weight, Vector data) {
int probes = getProbes();
String name = getName();
for (int i = 0; i < probes; i++) {
int n = hashForProbe(originalForm, data.size(), name, i);
if(isTraceEnabled()){
trace((String) null, n);
}
data.s... |
public void addToVector(byte[] originalForm, double weight, Vector data) {
int probes = getProbes();
String name = getName();
for (int i = 0; i < probes; i++) {
int n = hashForProbe(originalForm, data.size(), name, i);
if(isTraceEnabled()){
trace(name.getBytes(Charsets.UTF_8), n); ... | public void addToVector(byte[] originalForm, double weight, Vector data) {
int probes = getProbes();
String name = getName();
for (int i = 0; i < probes; i++) {
int n = hashForProbe(originalForm, data.size(), name, i);
if(isTraceEnabled()){
trace((String) null, n);
}
data.s... |
private static int stageQueueSize_ = 4096;
static
{
try
{
configFileName = getStorageConfigPath();
if (logger.isDebugEnabled())
logger.debug("Loading settings from " + configFileName);
XMLUtils xmlUtils = new XMLUtils(configFileName);
... | private static int stageQueueSize_ = 4096;
static
{
try
{
configFileName = getStorageConfigPath();
if (logger.isDebugEnabled())
logger.debug("Loading settings from " + configFileName);
XMLUtils xmlUtils = new XMLUtils(configFileName);
... |
private void addMyself() {
synchronized(allInstances) {
final int size=0;
int upto = 0;
for(int i=0;i<size;i++) {
final ConcurrentMergeScheduler other = (ConcurrentMergeScheduler) allInstances.get(i);
if (!(other.closed && 0 == other.mergeThreadCount()))
// Keep this on... | private void addMyself() {
synchronized(allInstances) {
final int size = allInstances.size();
int upto = 0;
for(int i=0;i<size;i++) {
final ConcurrentMergeScheduler other = (ConcurrentMergeScheduler) allInstances.get(i);
if (!(other.closed && 0 == other.mergeThreadCount()))
... |
public XAConnection getXAConnection() throws SQLException {
return getXAConnection(user, password);
}
| public XAConnection getXAConnection() throws SQLException {
return getXAConnection(getUser(), getPassword());
}
|
private void handleException(Throwable t) throws SQLException
{
if (t instanceof SQLException)
{
// let ij handle it
throw (SQLException)t;
}
if (t instanceof XAException)
{
int errorCode = ((XAException)t).errorCode;
String error = LocalizedResource.getMessage("IJ_IlleValu");
// XA_RBBASE 1... | private void handleException(Throwable t) throws SQLException
{
if (t instanceof SQLException)
{
// let ij handle it
throw (SQLException)t;
}
if (t instanceof XAException)
{
int errorCode = ((XAException)t).errorCode;
String error = LocalizedResource.getMessage("IJ_IlleValu");
// XA_RBBASE 1... |
public DirectUpdateHandler2(SolrCore core, UpdateHandler updateHandler) {
super(core);
solrCoreState = core.getSolrCoreState();
UpdateHandlerInfo updateHandlerInfo = core.getSolrConfig()
.getUpdateHandlerInfo();
int docsUpperBound = updateHandlerInfo.autoCommmitMaxDocs; // getInt("updateH... | public DirectUpdateHandler2(SolrCore core, UpdateHandler updateHandler) {
super(core, updateHandler.getUpdateLog());
solrCoreState = core.getSolrCoreState();
UpdateHandlerInfo updateHandlerInfo = core.getSolrConfig()
.getUpdateHandlerInfo();
int docsUpperBound = updateHandlerInfo.autoComm... |
public void testIterableThrowsException() throws IOException {
Directory dir = newDirectory();
IndexWriter w = new IndexWriter(dir, newIndexWriterConfig(
TEST_VERSION_CURRENT, new MockAnalyzer(random())));
int iters = atLeast(100);
int docCount = 0;
int docId = 0;
Set<String> liveIds =... | public void testIterableThrowsException() throws IOException {
Directory dir = newDirectory();
IndexWriter w = new IndexWriter(dir, newIndexWriterConfig(
TEST_VERSION_CURRENT, new MockAnalyzer(random())));
int iters = atLeast(100);
int docCount = 0;
int docId = 0;
Set<String> liveIds =... |
public CommitLogSegment.CommitLogContext write(RowMutation rowMutation, Object serializedRow) throws IOException
{
long currentPosition = -1L;
try
{
currentPosition = logWriter.getFilePointer();
CommitLogSegment.CommitLogContext cLogCtx = new CommitLogSegment.Comm... | public CommitLogSegment.CommitLogContext write(RowMutation rowMutation, Object serializedRow) throws IOException
{
long currentPosition = -1L;
try
{
currentPosition = logWriter.getFilePointer();
CommitLogSegment.CommitLogContext cLogCtx = new CommitLogSegment.Comm... |
public long[] get(Boolean reset)
{
long[] rv = new long[numBuckets];
for (int i = 0; i < numBuckets; i++)
rv[i] = buckets.get(i);
if (reset)
for (int i = 0; i < numBuckets; i++)
buckets.set(i, 0L);
return rv;
}
} | public long[] get(boolean reset)
{
long[] rv = new long[numBuckets];
for (int i = 0; i < numBuckets; i++)
rv[i] = buckets.get(i);
if (reset)
for (int i = 0; i < numBuckets; i++)
buckets.set(i, 0L);
return rv;
}
} |
public void transform(Map<String, ?> result, ResponseBuilder rb, SolrDocumentSource solrDocumentSource) {
NamedList<Object> commands = new NamedList<Object>();
for (Map.Entry<String, ?> entry : result.entrySet()) {
Object value = entry.getValue();
if (TopGroups.class.isInstance(value)) {
@... | public void transform(Map<String, ?> result, ResponseBuilder rb, SolrDocumentSource solrDocumentSource) {
NamedList<Object> commands = new SimpleOrderedMap<Object>();
for (Map.Entry<String, ?> entry : result.entrySet()) {
Object value = entry.getValue();
if (TopGroups.class.isInstance(value)) {
... |
// cannot use this state since it is private to a connection.
// switch to a new statement.
foundInCache = false;
preparedStmt = new GenericPreparedStatement(this);
break;
}
}
// did it get updated while we waited for the lock on it?
if (preparedStmt.upToDate()) {
re... | // cannot use this state since it is private to a connection.
// switch to a new statement.
foundInCache = false;
preparedStmt = new GenericPreparedStatement(this);
break;
}
}
// did it get updated while we waited for the lock on it?
if (preparedStmt.upToDate()) {
re... |
protected double getScoreForLabelInstance(int label, Vector instance) {
double result = 0.0;
Iterator<Element> elements = instance.iterateNonZero();
while (elements.hasNext()) {
Element e = elements.next();
result += e.get() * getScoreForLabelFeature(label, e.index());
}
return result ... | protected double getScoreForLabelInstance(int label, Vector instance) {
double result = 0.0;
Iterator<Element> elements = instance.iterateNonZero();
while (elements.hasNext()) {
Element e = elements.next();
result += e.get() * getScoreForLabelFeature(label, e.index());
}
return -result... |
public void testColumnPrivileges() throws Exception {
grant("select(c1),update(c3,c2),references(c3,c1,c2)", "s1", "t1", users[4]);
assertSelectPrivilege(true, users[4], "s1", "t1", new String[] {"c1"});
assertSelectPrivilege(false, users[4], "s1", "t1", new String[] {"c2"});
assertSelectPrivilege(false, users... | public void testColumnPrivileges() throws Exception {
grant("select(c1),update(c3,c2),references(c3,c1,c2)", "s1", "t1", users[4]);
assertSelectPrivilege(true, users[4], "s1", "t1", new String[] {"c1"});
assertSelectPrivilege(false, users[4], "s1", "t1", new String[] {"c2"});
assertSelectPrivilege(false, users... |
private void handleShutdown(StandardException shutdownCause) {
if (inBoot) {
bootException = shutdownCause;
return;
}
try {
shutdownInitiated = true;
String conStr = "jdbc:derby:"+dbname+";"+
Attribute.REPLICATION_INTERNAL_SHU... | private void handleShutdown(StandardException shutdownCause) {
if (inBoot) {
bootException = shutdownCause;
return;
}
try {
shutdownInitiated = true;
String conStr = "jdbc:derby:"+dbname+";"+
Attribute.REPLICATION_INTERNAL_SHU... |
private boolean authenticateRemotely
(
String userName,
String userPassword,
String databaseName
)
throws StandardException, SQLWarning
{
// this catches the case when someone specifies derby.authentication.provider=NATIVE::LOCAL
// at the system lev... | private boolean authenticateRemotely
(
String userName,
String userPassword,
String databaseName
)
throws StandardException, SQLWarning
{
// this catches the case when someone specifies derby.authentication.provider=NATIVE::LOCAL
// at the system lev... |
private static EmbedConnection getEmbedConnection() throws SQLException {
//DERBY-4664 Do not use DriverManager("jdbc:default:connection") because
// some other product's Driver might hijack our stored procedure.
InternalDriver id = InternalDriver.activeDriver();
if (id != null) {
... | private static EmbedConnection getEmbedConnection() throws SQLException {
//DERBY-4664 Do not use DriverManager("jdbc:default:connection") because
// some other product's Driver might hijack our stored procedure.
InternalDriver id = InternalDriver.activeDriver();
if (id != null) {
... |
public final Connection getConnection(String username, String password)
throws SQLException {
Properties info = new Properties();
if (username != null)
info.put(Attribute.USERNAME_ATTR, username);
if (password != null)
info.put(Attribute.PASSWORD_ATTR, password);
if (createDatabase != null)
info... | public final Connection getConnection(String username, String password)
throws SQLException {
Properties info = new Properties();
if (username != null)
info.put(Attribute.USERNAME_ATTR, username);
if (password != null)
info.put(Attribute.PASSWORD_ATTR, password);
if (createDatabase != null)
info... |
public Connection getConnection(String username, String password)
throws SQLException {
return this.getConnection(username, password, true);
}
/**
* @param requestPassword Use {@code true} if the password came from the
* {@link #getConnection()} call.
*/
final Connect... | public Connection getConnection(String username, String password)
throws SQLException {
return this.getConnection(username, password, true);
}
/**
* @param requestPassword Use {@code true} if the password came from the
* {@link #getConnection()} call.
*/
final Connect... |
private static Connection getDefaultConn()throws SQLException
{
InternalDriver id = InternalDriver.activeDriver();
if (id != null) {
Connection conn = id.connect("jdbc:default:connection", null);
if (conn != null)
return conn;
}
throw Util.noCurrentConnection();
}
| private static Connection getDefaultConn()throws SQLException
{
InternalDriver id = InternalDriver.activeDriver();
if (id != null) {
Connection conn = id.connect( "jdbc:default:connection", null, 0 );
if (conn != null)
return conn;
}
throw Util.noCurrentConnection();
}
|
protected void runNewOrder(Object displayData, boolean forRollback)
throws Exception
{
short homeWarehouse = warehouse();
final int orderItemCount = rand.randomInt(5, 15);
int[] items = new int[orderItemCount];
short[] quantities = new short[orderItemCount];
short[] s... | protected void runNewOrder(Object displayData, boolean forRollback)
throws Exception
{
short homeWarehouse = warehouse();
final int orderItemCount = rand.randomInt(5, 15);
int[] items = new int[orderItemCount];
short[] quantities = new short[orderItemCount];
short[] s... |
public void fullRankWide() {
Matrix x = matrix().transpose();
QRDecomposition qr = new QRDecomposition(x);
assertFalse(qr.hasFullRank());
Matrix rActual = qr.getR();
| public void fullRankWide() {
Matrix x = matrix().transpose();
QRDecomposition qr = new QRDecomposition(x);
assertTrue(qr.hasFullRank());
Matrix rActual = qr.getR();
|
public static void main(String args[]) {
NetworkServerControlImpl server = null;
//
// The following variable lets us preserve the error printing behavior
// seen before we started installing a security manager. Errors can be
// raised as we figure out whether we need to ins... | public static void main(String args[]) {
NetworkServerControlImpl server = null;
//
// The following variable lets us preserve the error printing behavior
// seen before we started installing a security manager. Errors can be
// raised as we figure out whether we need to ins... |
LockOwner getOwner();
/*
Derby - Class org.apache.derby.iapi.services.locks.CompatibilitySpace
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 ownership.
Th... | LockOwner getOwner();
/*
Derby - Class org.apache.derby.iapi.services.locks.CompatibilitySpace
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 ownership.
Th... |
public String toString()
{
return "Token(" + token + ")";
}
| public String toString()
{
return token.toString();
}
|
public void norms(String field, byte[] bytes, int offset) throws IOException {
byte[] norms = getIndex().getNormsByFieldNameAndDocumentNumber().get(field);
System.arraycopy(norms, offset, bytes, 0, norms.length);
}
| public void norms(String field, byte[] bytes, int offset) throws IOException {
byte[] norms = getIndex().getNormsByFieldNameAndDocumentNumber().get(field);
System.arraycopy(norms, 0, bytes, offset, norms.length);
}
|
public void reduce(WritableComparable<?> key,
Iterator<VectorWritable> values,
OutputCollector<WritableComparable<?>,VectorWritable> output,
Reporter reporter) throws IOException {
if (!values.hasNext()) return;
Vector value = values.next().get();... | public void reduce(WritableComparable<?> key,
Iterator<VectorWritable> values,
OutputCollector<WritableComparable<?>,VectorWritable> output,
Reporter reporter) throws IOException {
if (!values.hasNext()) return;
Vector value = values.next().get();... |
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 truncate(CharSequence columnFamily) throws AvroRemoteException, InvalidRequestException, UnavailableException
{
if (logger.isDebugEnabled())
logger.debug("truncating {} in {}", columnFamily, state().getKeyspace());
try
{
state().hasColumnFamilyAccess(... | public Void truncate(CharSequence columnFamily) throws AvroRemoteException, InvalidRequestException, UnavailableException
{
if (logger.isDebugEnabled())
logger.debug("truncating {} in {}", columnFamily, state().getKeyspace());
try
{
state().hasColumnFamilyAccess(... |
private void sendReplicationNotification(InetAddress local, InetAddress remote)
{
// notify the remote token
Message msg = new Message(local, StorageService.Verb.REPLICATION_FINISHED, new byte[0]);
IFailureDetector failureDetector = FailureDetector.instance;
while (failureDetecto... | private void sendReplicationNotification(InetAddress local, InetAddress remote)
{
// notify the remote token
Message msg = new Message(local, StorageService.Verb.REPLICATION_FINISHED, new byte[0], Gossiper.instance.getVersion(remote));
IFailureDetector failureDetector = FailureDetector.i... |
public void doVerb(Message message)
{
InetAddress from = message.getFrom();
if (logger_.isTraceEnabled())
logger_.trace("Received a GossipDigestAckMessage from {}", from);
if (!Gossiper.instance.isEnabled())
{
if (logger_.isTraceEnabled())
... | public void doVerb(Message message)
{
InetAddress from = message.getFrom();
if (logger_.isTraceEnabled())
logger_.trace("Received a GossipDigestAckMessage from {}", from);
if (!Gossiper.instance.isEnabled())
{
if (logger_.isTraceEnabled())
... |
public void doVerb(Message message)
{
InetAddress from = message.getFrom();
if (logger_.isTraceEnabled())
logger_.trace("Received a GossipDigestSynMessage from {}", from);
if (!Gossiper.instance.isEnabled())
{
if (logger_.isTraceEnabled())
... | public void doVerb(Message message)
{
InetAddress from = message.getFrom();
if (logger_.isTraceEnabled())
logger_.trace("Received a GossipDigestSynMessage from {}", from);
if (!Gossiper.instance.isEnabled())
{
if (logger_.isTraceEnabled())
... |
public static Message createMessage(String keyspace, byte[] key, String columnFamily, List<ColumnFamily> columnFamilies)
{
ColumnFamily baseColumnFamily;
DataOutputBuffer bufOut = new DataOutputBuffer();
RowMutation rm;
Message message;
Column column;
/* Get the ... | public static Message createMessage(String keyspace, byte[] key, String columnFamily, List<ColumnFamily> columnFamilies)
{
ColumnFamily baseColumnFamily;
DataOutputBuffer bufOut = new DataOutputBuffer();
RowMutation rm;
Message message;
Column column;
/* Get the ... |
public void run()
{
try
{
ss.removeToken(token);
}
catch (Exception e)
{
System.err.println(e);
e.printStackTrace();
return;
... | public void run()
{
try
{
ss.removeToken(token);
}
catch (Exception e)
{
System.err.println(e);
e.printStackTrace();
return;
... |
public void eval(MockDirectoryWrapper dir) throws IOException {
if (!failed) {
failed = true;
throw new IOException("fail in add doc");
}
}
};
// create a couple of files
String[] keywords = { "1", "2" };
String[] unindexed = { "Netherland... | public void eval(MockDirectoryWrapper dir) throws IOException {
if (!failed) {
failed = true;
throw new IOException("fail in add doc");
}
}
};
// create a couple of files
String[] keywords = { "1", "2" };
String[] unindexed = { "Netherland... |
protected void doCommit(Map<String,String> commitUserData) throws IOException {
if (hasChanges) {
segmentInfos.setUserData(commitUserData);
// Default deleter (for backwards compatibility) is
// KeepOnlyLastCommitDeleter:
IndexFileDeleter deleter = new IndexFileDeleter(directory,
... | protected void doCommit(Map<String,String> commitUserData) throws IOException {
if (hasChanges) {
segmentInfos.setUserData(commitUserData);
// Default deleter (for backwards compatibility) is
// KeepOnlyLastCommitDeleter:
IndexFileDeleter deleter = new IndexFileDeleter(directory,
... |
private void saveCleanEigens(Configuration conf, Collection<Map.Entry<MatrixSlice, EigenStatus>> prunedEigenMeta)
throws IOException {
Path path = new Path(outPath, CLEAN_EIGENVECTORS);
FileSystem fs = FileSystem.get(path.toUri(), conf);
SequenceFile.Writer seqWriter = new SequenceFile.Writer(fs, conf... | private void saveCleanEigens(Configuration conf, Collection<Map.Entry<MatrixSlice, EigenStatus>> prunedEigenMeta)
throws IOException {
Path path = new Path(outPath, CLEAN_EIGENVECTORS);
FileSystem fs = FileSystem.get(path.toUri(), conf);
SequenceFile.Writer seqWriter = new SequenceFile.Writer(fs, conf... |
private void countFacets(ResponseBuilder rb, ShardRequest sreq) {
FacetInfo fi = rb._facetInfo;
for (ShardResponse srsp: sreq.responses) {
int shardNum = rb.getShardNum(srsp.shard);
NamedList facet_counts = (NamedList)srsp.rsp.getResponse().get("facet_counts");
// handle facet queries
... | private void countFacets(ResponseBuilder rb, ShardRequest sreq) {
FacetInfo fi = rb._facetInfo;
for (ShardResponse srsp: sreq.responses) {
int shardNum = rb.getShardNum(srsp.shard);
NamedList facet_counts = (NamedList)srsp.rsp.getResponse().get("facet_counts");
// handle facet queries
... |
public java.io.Reader getCharacterStream(long pos, long length)
throws SQLException {
//call checkValidity to exit by throwing a SQLException if
//the Clob object has been freed by calling free() on it
checkValidity();
if (pos <= 0) {
throw Util.generateC... | public java.io.Reader getCharacterStream(long pos, long length)
throws SQLException {
//call checkValidity to exit by throwing a SQLException if
//the Clob object has been freed by calling free() on it
checkValidity();
if (pos <= 0) {
throw Util.generateC... |
private void initialize(IndexReader[] subReaders, boolean closeSubReaders) {
this.subReaders = subReaders;
starts = new int[subReaders.length + 1]; // build starts array
decrefOnClose = new boolean[subReaders.length];
for (int i = 0; i < subReaders.length; i++) {
starts[i] = maxDoc;
max... | private void initialize(IndexReader[] subReaders, boolean closeSubReaders) {
this.subReaders = (IndexReader[]) subReaders.clone();
starts = new int[subReaders.length + 1]; // build starts array
decrefOnClose = new boolean[subReaders.length];
for (int i = 0; i < subReaders.length; i++) {
start... |
public final java.sql.ResultSet getGeneratedKeys() throws SQLException {
checkStatus();
if (autoGeneratedKeysResultSet == null)
return null;
else {
execute("VALUES IDENTITY_VAL_LOCAL()", true, false, JDBC30Translation.NO_GENERATED_KEYS, null, null);
return results;
}
}
/////////////////////////////... | public final java.sql.ResultSet getGeneratedKeys() throws SQLException {
checkStatus();
if (autoGeneratedKeysResultSet == null)
return null;
else {
execute("VALUES IDENTITY_VAL_LOCAL()", true, false, JDBC30Translation.NO_GENERATED_KEYS, null, null);
return results;
}
}
/////////////////////////////... |
public Row getRow(Table table) throws IOException, ColumnFamilyNotDefinedException
{
if (columnNames != EMPTY_COLUMNS)
{
return table.getRow(key, columnFamilyColumn, columnNames);
}
if (sinceTimestamp > 0)
{
return table.getRow(key, columnFamilyCo... | public Row getRow(Table table) throws IOException, ColumnFamilyNotDefinedException
{
if (!columnNames.isEmpty())
{
return table.getRow(key, columnFamilyColumn, columnNames);
}
if (sinceTimestamp > 0)
{
return table.getRow(key, columnFamilyColumn, ... |
AvroValidation.validateColumnPath(keyspace, newColumnPath(cfName, null, cosc.column.name));
package org.apache.cassandra.avro;
/*
*
* 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
*... | AvroValidation.validateColumnPath(keyspace, newColumnPath(cfName, null, cosc.column.name));
package org.apache.cassandra.avro;
/*
*
* 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
*... |
Set<BundleInfo> resolve (AriesApplication app, ResolveConstraint... constraints) throws ResolverException ;
/*
* 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... | Set<BundleInfo> resolve (AriesApplication app, ResolveConstraint... constraints) throws ResolverException ;
/*
* 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... |
package org.apache.derby.shared.common.reference;
/*
Derby - Class org.apache.derby.iapi.reference.MessageId
Copyright 2000, 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... | package org.apache.derby.shared.common.reference;
/*
Derby - Class org.apache.derby.iapi.reference.MessageId
Copyright 2000, 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 final void writeNorms(Document doc, String segment) throws IOException {
for(int n = 0; n < fieldInfos.size(); n++){
FieldInfo fi = fieldInfos.fieldInfo(n);
if(fi.isIndexed){
float norm = fieldBoosts[n] * similarity.lengthNorm(fi.name, fieldLengths[n]);
OutputStream norms = di... | private final void writeNorms(Document doc, String segment) throws IOException {
for(int n = 0; n < fieldInfos.size(); n++){
FieldInfo fi = fieldInfos.fieldInfo(n);
if(fi.isIndexed){
float norm = fieldBoosts[n] * similarity.lengthNorm(fi.name, fieldLengths[n]);
OutputStream norms = di... |
private final int readerIndex(int n) { // find reader for doc n:
int lo = 0; // search starts array
int hi = readers.length - 1 // for first element less
while (hi >= lo) {
int mid = (lo + hi) >> 1;
int midValue = starts[mid];
if (n < midValue)
hi = mid - 1;
... | private final int readerIndex(int n) { // find reader for doc n:
int lo = 0; // search starts array
int hi = readers.length - 1; // for first element less
while (hi >= lo) {
int mid = (lo + hi) >> 1;
int midValue = starts[mid];
if (n < midValue)
hi = mid - 1;
... |
public SSTableReader writeSortedContents(List<DecoratedKey> sortedKeys) throws IOException
{
logger_.info("Writing " + this);
ColumnFamilyStore cfStore = Table.open(table_).getColumnFamilyStore(cfName_);
String path = cfStore.getTempSSTablePath();
SSTableWriter writer = new SSTab... | public SSTableReader writeSortedContents(List<DecoratedKey> sortedKeys) throws IOException
{
logger_.info("Writing " + this);
ColumnFamilyStore cfStore = Table.open(table_).getColumnFamilyStore(cfName_);
String path = cfStore.getTempSSTablePath();
SSTableWriter writer = new SSTab... |
public void testCanopyEuclideanMRJobNoClustering() throws Exception {
Path input = getTestTempDirPath("testdata");
Configuration conf = new Configuration();
FileSystem fs = FileSystem.get(input.toUri(), conf);
Collection<VectorWritable> points = Lists.newArrayList();
for (Vector v : raw) {
p... | public void testCanopyEuclideanMRJobNoClustering() throws Exception {
Path input = getTestTempDirPath("testdata");
Configuration conf = new Configuration();
FileSystem fs = FileSystem.get(input.toUri(), conf);
Collection<VectorWritable> points = Lists.newArrayList();
for (Vector v : raw) {
p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.