buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void run()
{
String diskUtilization = String.valueOf(StorageService.instance.getLoad());
if (logger_.isDebugEnabled())
logger_.debug("Disseminating load info ...");
Gossiper.instance.addApplicationState(LoadDisseminator.loadInfo_, new ApplicationState(diskUtilization));
... | public void run()
{
String diskUtilization = String.valueOf(StorageService.instance.getLoad());
if (logger_.isDebugEnabled())
logger_.debug("Disseminating load info ...");
Gossiper.instance.addLocalApplicationState(LoadDisseminator.loadInfo_, new ApplicationState(diskUtilizatio... |
public int getCurrentGenerationNumber(EndPoint endpoint)
{
return endPointStateMap_.get(endpoint).getHeartBeatState().getGeneration();
}
Message makeGossipDigestSynMessage(List<GossipDigest> gDigests) throws IOException
{
GossipDigestSynMessage gDigestMessage = new GossipDigestSynMessa... | public int getCurrentGenerationNumber(EndPoint endpoint)
{
return endPointStateMap_.get(endpoint).getHeartBeatState().getGeneration();
}
Message makeGossipDigestSynMessage(List<GossipDigest> gDigests) throws IOException
{
GossipDigestSynMessage gDigestMessage = new GossipDigestSynMessa... |
private static Row weakReadLocal(ReadCommand command) throws IOException
{
if (logger.isDebugEnabled())
logger.debug("weakreadlocal reading " + command);
List<EndPoint> endpoints = StorageService.instance().getNLiveStorageEndPoint(command.key);
/* Remove the local storage end... | private static Row weakReadLocal(ReadCommand command) throws IOException
{
if (logger.isDebugEnabled())
logger.debug("weakreadlocal reading " + command);
List<EndPoint> endpoints = StorageService.instance().getNLiveStorageEndPoint(command.key);
/* Remove the local storage end... |
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain, boolean retry) throws IOException, ServletException {
if( abortErrorMessage != null ) {
((HttpServletResponse)response).sendError( 500, abortErrorMessage );
return;
}
if (this.cores == null) {
... | public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain, boolean retry) throws IOException, ServletException {
if( abortErrorMessage != null ) {
((HttpServletResponse)response).sendError( 500, abortErrorMessage );
return;
}
if (this.cores == null) {
... |
private float freq; //phrase frequency in current doc as computed by phraseFreq().
PhraseScorer(Weight weight, TermPositions[] tps, int[] offsets,
Similarity similarity, byte[] norms) {
super(similarity);
this.norms = norms;
this.weight = weight;
this.value = weight.getValue();
// conver... | private float freq; //phrase frequency in current doc as computed by phraseFreq().
PhraseScorer(Weight weight, TermPositions[] tps, int[] offsets,
Similarity similarity, byte[] norms) {
super(similarity);
this.norms = norms;
this.weight = weight;
this.value = weight.getValue();
// conver... |
public void nextTerm(FieldInfo fieldInfo, BlockTermState _termState) throws IOException {
final SepTermState termState = (SepTermState) _termState;
//System.out.println("SepR.nextTerm termCount=" + termState.termCount);
//System.out.println(" docFreq=" + termState.docFreq);
final boolean isFirstTerm ... | public void nextTerm(FieldInfo fieldInfo, BlockTermState _termState) throws IOException {
final SepTermState termState = (SepTermState) _termState;
//System.out.println("SepR.nextTerm termCount=" + termState.termCount);
//System.out.println(" docFreq=" + termState.docFreq);
final boolean isFirstTerm ... |
public CharSequence subSequence(int start, int end) {
// NOTE: must do a real check here to meet the specs of CharSequence
if (start < 0 || end > length || start > end) {
throw new IndexOutOfBoundsException();
}
return new CharsRef(chars, offset + start, offset + end);
}
| public CharSequence subSequence(int start, int end) {
// NOTE: must do a real check here to meet the specs of CharSequence
if (start < 0 || end > length || start > end) {
throw new IndexOutOfBoundsException();
}
return new CharsRef(chars, offset + start, end - start);
}
|
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... |
private static final String LOADBALANCE_STAGE = "LOAD-BALANCER-STAGE";
static
{
stages.put(MUTATION_STAGE, multiThreadedStage(MUTATION_STAGE, getConcurrentWriters()));
stages.put(READ_STAGE, multiThreadedStage(READ_STAGE, getConcurrentReaders()));
stages.put(RESPONSE_STAGE, multiThr... | private static final String LOADBALANCE_STAGE = "LOAD-BALANCER-STAGE";
static
{
stages.put(MUTATION_STAGE, multiThreadedStage(MUTATION_STAGE, getConcurrentWriters()));
stages.put(READ_STAGE, multiThreadedStage(READ_STAGE, getConcurrentReaders()));
stages.put(RESPONSE_STAGE, multiThr... |
private static boolean satisfies(ColumnFamily data, IndexClause clause, IndexExpression first)
{
for (IndexExpression expression : clause.expressions)
{
// (we can skip "first" since we already know it's satisfied)
if (expression == first)
continue;
... | private static boolean satisfies(ColumnFamily data, IndexClause clause, IndexExpression first)
{
for (IndexExpression expression : clause.expressions)
{
// (we can skip "first" since we already know it's satisfied)
if (expression == first)
continue;
... |
public void start(BundleContext context) throws Exception {
jmxWhiteBoard = new JmxWhiteboardSupport();
mbeanServerTracker = new MBeanServerTracker(context);
mbeanServerTracker.open();
mbeanTracker = new MBeanTracker(context);
mbeanTracker.open();
}
| public void start(BundleContext context) throws Exception {
jmxWhiteBoard = new JmxWhiteboardSupport();
mbeanServerTracker = new MBeanServerTracker(context);
mbeanServerTracker.open();
mbeanTracker = new MBeanTracker(context);
mbeanTracker.open(true);
}
|
public void set_keyspace(String keyspace) throws InvalidRequestException, TException {
if (DatabaseDescriptor.getTableDefinition(keyspace) == null)
{
throw new InvalidRequestException("Keyspace does not exist");
}
// If switching, invalidate previous access level... | public void set_keyspace(String keyspace) throws InvalidRequestException, TException {
if (DatabaseDescriptor.getTableDefinition(keyspace) == null)
{
throw new InvalidRequestException("Keyspace does not exist");
}
// If switching, invalidate previous access level... |
public LeaderElector(SolrZkClient zkClient) {
this.zkClient = zkClient;
zkCmdExecutor = new ZkCmdExecutor((int) (zkClient.getZkClientTimeout()/1000.0 + 3000));
}
| public LeaderElector(SolrZkClient zkClient) {
this.zkClient = zkClient;
zkCmdExecutor = new ZkCmdExecutor(zkClient.getZkClientTimeout());
}
|
public DistributedQueue(SolrZkClient zookeeper, String dir, List<ACL> acl) {
this.dir = dir;
ZkCmdExecutor cmdExecutor = new ZkCmdExecutor(30);
try {
cmdExecutor.ensureExists(dir, zookeeper);
} catch (KeeperException e) {
throw new SolrException(ErrorCode.SERVER_ERROR, e);
} catch... | public DistributedQueue(SolrZkClient zookeeper, String dir, List<ACL> acl) {
this.dir = dir;
ZkCmdExecutor cmdExecutor = new ZkCmdExecutor(zookeeper.getZkClientTimeout());
try {
cmdExecutor.ensureExists(dir, zookeeper);
} catch (KeeperException e) {
throw new SolrException(ErrorCode.S... |
private void _testPreStartedMaster()
throws Exception
{
Connection conn = null;
String db = masterDatabasePath +FS+ReplicationRun.masterDbSubPath +FS+ replicatedDb;
String connectionURL = "jdbc:derby:"
+ "//" + masterServerHost + ":" + masterServerPort + "/"
... | private void _testPreStartedMaster()
throws Exception
{
Connection conn = null;
String db = masterDatabasePath +FS+ReplicationRun.masterDbSubPath +FS+ replicatedDb;
String connectionURL = "jdbc:derby:"
+ "//" + masterServerHost + ":" + masterServerPort + "/"
... |
private static void printUsage()
{
HelpFormatter hf = new HelpFormatter();
String header = String.format(
"%nAvailable commands: ring, info, cleanup, compact, cfstats, snapshot [snapshotname], clearsnapshot, " +
"tpstats, flush, drain, repair, decommission, move, ... | private static void printUsage()
{
HelpFormatter hf = new HelpFormatter();
String header = String.format(
"%nAvailable commands: ring, info, cleanup, compact, cfstats, snapshot [snapshotname], clearsnapshot, " +
"tpstats, flush, drain, repair, decommission, move, ... |
public static final String VERSION = "6.0.0";
} | public static final String VERSION = "6.1.0";
} |
public static synchronized void updateToken(InetAddress ep, Token token)
{
if (ep == FBUtilities.getBroadcastAddress())
return;
IPartitioner p = StorageService.getPartitioner();
ColumnFamily cf = ColumnFamily.create(Table.SYSTEM_TABLE, STATUS_CF);
cf.addColumn(new Col... | public static synchronized void updateToken(InetAddress ep, Token token)
{
if (ep == FBUtilities.getLocalAddress())
return;
IPartitioner p = StorageService.getPartitioner();
ColumnFamily cf = ColumnFamily.create(Table.SYSTEM_TABLE, STATUS_CF);
cf.addColumn(new Column(... |
public void addSavedEndpoint(InetAddress ep)
{
if (ep == FBUtilities.getBroadcastAddress())
{
logger.debug("Attempt to add self as saved endpoint");
return;
}
EndpointState epState = new EndpointState(new HeartBeatState(0));
epState.markDead();
... | public void addSavedEndpoint(InetAddress ep)
{
if (ep == FBUtilities.getLocalAddress())
{
logger.debug("Attempt to add self as saved endpoint");
return;
}
EndpointState epState = new EndpointState(new HeartBeatState(0));
epState.markDead();
... |
private static void reverseBytes(BytesRef ref) {
if (ref.length <= 1) return;
int num = ref.length >> 1;
for (int i = ref.offset; i < ( ref.offset + num ); i++) {
byte b = ref.bytes[i];
ref.bytes[i] = ref.bytes[ref.offset * 2 + ref.length - i - 1];
ref.bytes[ref.offset * 2 + ref.length -... | public static Set<State> reverse(Automaton a) {
a.expandSingleton();
// reverse all edges
HashMap<State, HashSet<Transition>> m = new HashMap<State, HashSet<Transition>>();
State[] states = a.getNumberedStates();
Set<State> accept = new HashSet<State>();
for (State s : states)
if (s.isAc... |
protected void testSerializeDeserialize(ColumnDefinition cd) throws Exception
{
ColumnDefinition newCd = ColumnDefinition.deserialize(ColumnDefinition.serialize(cd));
assert cd != newCd;
assert cd.hashCode() == newCd.hashCode();
assert cd.equals(newCd);
}
| protected void testSerializeDeserialize(ColumnDefinition cd) throws Exception
{
ColumnDefinition newCd = ColumnDefinition.inflate(cd.deflate());
assert cd != newCd;
assert cd.hashCode() == newCd.hashCode();
assert cd.equals(newCd);
}
|
public void command() {}
});
if (line.getOptionValue(CMD).equals(BOOTSTRAP)) {
if (!line.hasOption(SOLRHOME)) {
System.out.println("-" + SOLRHOME
+ " is required for " + BOOTSTRAP);
System.exit(1);
}
SolrRes... | public void command() {}
});
if (line.getOptionValue(CMD).equals(BOOTSTRAP)) {
if (!line.hasOption(SOLRHOME)) {
System.out.println("-" + SOLRHOME
+ " is required for " + BOOTSTRAP);
System.exit(1);
}
SolrRes... |
public void testIndexCreate() throws IOException, ConfigurationException, InterruptedException, ExecutionException
{
Table table = Table.open("Keyspace1");
// create a row and update the birthdate value, test that the index query fetches the new version
RowMutation rm;
rm = new ... | public void testIndexCreate() throws IOException, ConfigurationException, InterruptedException, ExecutionException
{
Table table = Table.open("Keyspace1");
// create a row and update the birthdate value, test that the index query fetches the new version
RowMutation rm;
rm = new ... |
public void run() {
while (System.currentTimeMillis() < stopTimeMS) {
try {
final IndexSearcher s = getCurrentSearcher();
try {
if (s.getIndexReader().numDocs() > 0) {
smokeTestSearcher(s);
Fiel... | public void run() {
while (System.currentTimeMillis() < stopTimeMS) {
try {
final IndexSearcher s = getCurrentSearcher();
try {
if (s.getIndexReader().numDocs() > 0) {
smokeTestSearcher(s);
Fiel... |
public Vector solve(Matrix A, Vector b) {
/*
% Initialize.
hdg1 = ' itn x(1) norm r norm A''r';
hdg2 = ' compatible LS norm A cond A';
pfreq = 20; % print frequency (for repeating the heading)
pcount = 0; % print counter
% Determine... | public Vector solve(Matrix A, Vector b) {
/*
% Initialize.
hdg1 = ' itn x(1) norm r norm A''r';
hdg2 = ' compatible LS norm A cond A';
pfreq = 20; % print frequency (for repeating the heading)
pcount = 0; % print counter
% Determine... |
public static Test suite() {
TestSuite suite = new TestSuite("lang");
// DERBY-1315 and DERBY-1735 need to be addressed
// before re-enabling this test as it's memory use is
// different on different vms leading to failures in
// the nightly runs.
// suite.addTest(la... | public static Test suite() {
TestSuite suite = new TestSuite("lang");
// DERBY-1315 and DERBY-1735 need to be addressed
// before re-enabling this test as it's memory use is
// different on different vms leading to failures in
// the nightly runs.
// suite.addTest(la... |
public SolrDispatchFilter() {
try {
adminRequestParser = new SolrRequestParsers(new Config(null,"solr",new ByteArrayInputStream("<root/>".getBytes()),"") );
} catch (Exception e) {
//unlikely
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,e);
}
}
| public SolrDispatchFilter() {
try {
adminRequestParser = new SolrRequestParsers(new Config(null,"solr",new ByteArrayInputStream("<root/>".getBytes("UTF-8")),"") );
} catch (Exception e) {
//unlikely
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,e);
}
}
|
public CoreContainer initialize() throws IOException,
ParserConfigurationException, SAXException {
CoreContainer cores = null;
String solrHome = SolrResourceLoader.locateSolrHome();
File fconf = new File(solrHome, solrConfigFilename == null ? "solr.xml"
: solrConfigFilename);
... | public CoreContainer initialize() throws IOException,
ParserConfigurationException, SAXException {
CoreContainer cores = null;
String solrHome = SolrResourceLoader.locateSolrHome();
File fconf = new File(solrHome, solrConfigFilename == null ? "solr.xml"
: solrConfigFilename);
... |
public static String getFileContents( String path )
{
if( instance != null && instance.hiddenFiles != null ) {
if( instance.hiddenFiles.contains( path ) ) {
return ""; // ignore it...
}
}
try {
SolrCore core = SolrCore.getSolrCore();
InputStream input = core.getResourceLo... | public static String getFileContents( String path )
{
if( instance != null && instance.hiddenFiles != null ) {
if( instance.hiddenFiles.contains( path ) ) {
return ""; // ignore it...
}
}
try {
SolrCore core = SolrCore.getSolrCore();
InputStream input = core.getResourceLo... |
private BundleFramework isolatedInstall(
Collection<BundleSuggestion> bundlesToBeInstalled,
AriesApplication app)
throws BundleException
{
LOGGER.debug(LOG_ENTRY, "isolatedInstall", new Object[] { bundlesToBeInstalled, app });
BundleFramework bundleFramework = null;
BundleContext par... | private BundleFramework isolatedInstall(
Collection<BundleSuggestion> bundlesToBeInstalled,
AriesApplication app)
throws BundleException
{
LOGGER.debug(LOG_ENTRY, "isolatedInstall", new Object[] { bundlesToBeInstalled, app });
BundleFramework bundleFramework = null;
BundleContext par... |
public void processBadNumeric() {
ARFFModel model = new MapBackedARFFModel();
model.addLabel("b1shkt70694difsmmmdv0ikmoh", 77);
model.addType(77, ARFFType.REAL);
assertTrue(0.0 == model.getValue("b1shkt70694difsmmmdv0ikmoh", 77));
}
| public void processBadNumeric() {
ARFFModel model = new MapBackedARFFModel();
model.addLabel("b1shkt70694difsmmmdv0ikmoh", 77);
model.addType(77, ARFFType.REAL);
assertTrue(Double.isNaN(model.getValue("b1shkt70694difsmmmdv0ikmoh", 77)));
}
|
protected static double processNumeric(String data) {
if (isNumeric(data)) {
return Double.parseDouble(data);
}
return 0.0;
}
| protected static double processNumeric(String data) {
if (isNumeric(data)) {
return Double.parseDouble(data);
}
return Double.NaN;
}
|
private void executeDropIndex(Tree statement)
{
if (!CliMain.isConnected() || !hasKeySpace())
return;
// getColumnFamily will check if CF exists for us
String columnFamily = CliCompiler.getColumnFamily(statement, keyspacesMap.get(keySpace).cf_defs);
String rawColumNa... | private void executeDropIndex(Tree statement)
{
if (!CliMain.isConnected() || !hasKeySpace())
return;
// getColumnFamily will check if CF exists for us
String columnFamily = CliCompiler.getColumnFamily(statement, keyspacesMap.get(keySpace).cf_defs);
String rawColumNa... |
private byte[] payloadBuffer;
/* Walk through all unique text tokens (Posting
* instances) found in this field and serialize them
* into a single RAM segment. */
void appendPostings(String fieldName, SegmentWriteState state,
FreqProxTermsWriterPerField[] fields,
... | private byte[] payloadBuffer;
/* Walk through all unique text tokens (Posting
* instances) found in this field and serialize them
* into a single RAM segment. */
void appendPostings(String fieldName, SegmentWriteState state,
FreqProxTermsWriterPerField[] fields,
... |
public IndexStatisticsDaemonImpl(HeaderPrintWriter log, boolean doLog,
String traceLevel, Database db,
String userName, String databaseName) {
// Make sure we can log errors.
if (log == null) {
throw new IllegalArg... | public IndexStatisticsDaemonImpl(HeaderPrintWriter log, boolean doLog,
String traceLevel, Database db,
String userName, String databaseName) {
// Make sure we can log errors.
if (log == null) {
throw new IllegalArg... |
public static Test suite() {
String property = "derby.storage.indexStats.debug.forceOldBehavior";
TestSuite suite = new TestSuite("KeepDisposableStatsPropertyTestSuite");
// Test the default (expected to be false).
suite.addTest(
new KeepDisposableStatsPropertyTest("t... | public static Test suite() {
String property = "derby.storage.indexStats.debug.keepDisposableStats";
TestSuite suite = new TestSuite("KeepDisposableStatsPropertyTestSuite");
// Test the default (expected to be false).
suite.addTest(
new KeepDisposableStatsPropertyTest... |
public void listenToUnitOfWork() {
if (!listenToUnitOfWork_) {
listenToUnitOfWork_ = true;
connection_.CommitAndRollbackListeners_.put(this,null);
}
}
| public void listenToUnitOfWork() {
if (!listenToUnitOfWork_) {
listenToUnitOfWork_ = true;
connection_.CommitAndRollbackListeners_.add(this);
}
}
|
public void listenToUnitOfWork() {
agent_.connection_.CommitAndRollbackListeners_.put(this,null);
}
| public void listenToUnitOfWork() {
agent_.connection_.CommitAndRollbackListeners_.add(this);
}
|
public void testEmptyTerm() throws IOException {
RAMDirectory indexStore = getIndexStore("field", new String[]{"nowildcard", "nowildcardx"});
IndexSearcher searcher = new IndexSearcher(indexStore, true);
MultiTermQuery wq = new WildcardQuery(new Term("field", ""));
wq.setRewriteMethod(MultiTermQuery.... | public void testEmptyTerm() throws IOException {
RAMDirectory indexStore = getIndexStore("field", new String[]{"nowildcard", "nowildcardx"});
IndexSearcher searcher = new IndexSearcher(indexStore, true);
MultiTermQuery wq = new WildcardQuery(new Term("field", ""));
wq.setRewriteMethod(MultiTermQuery.... |
public SimpleBundleInfo(BundleManifest bm, String location) {
_contentName = new ContentImpl(
bm.getSymbolicName(),
ManifestHeaderProcessor.parseBundleSymbolicName(bm.getSymbolicName()).getValue());
_version = bm.getVersion();
_attributes = bm.getRawAttributes();
_location = location... | public SimpleBundleInfo(BundleManifest bm, String location) {
_contentName = new ContentImpl(
bm.getSymbolicName(),
ManifestHeaderProcessor.parseBundleSymbolicName(bm.getSymbolicName()).getAttributes());
_version = bm.getVersion();
_attributes = bm.getRawAttributes();
_location = loc... |
public String getSymbolicName() {
String rawSymName = manifest.getMainAttributes().getValue(Constants.BUNDLE_SYMBOLICNAME);
String result = null;
if (rawSymName != null) {
NameValuePair<String, NameValueMap<String, String>> info = ManifestHeaderProcessor.parseBundleSymbolicName(rawSymName);
r... | public String getSymbolicName() {
String rawSymName = manifest.getMainAttributes().getValue(Constants.BUNDLE_SYMBOLICNAME);
String result = null;
if (rawSymName != null) {
NameValuePair info = ManifestHeaderProcessor.parseBundleSymbolicName(rawSymName);
result = info.getName();
}
... |
public Message handleMessage(Message message);
} | public Message handleMessage(Message message, InetAddress to);
} |
private static LogWatcher createWatcher(LogWatcherConfig config, SolrResourceLoader loader) {
String fname = config.getLoggingClass();
String slf4jImpl;
try {
slf4jImpl = StaticLoggerBinder.getSingleton().getLoggerFactoryClassStr();
log.info("SLF4J impl is " + slf4jImpl);
if (fname == ... | private static LogWatcher createWatcher(LogWatcherConfig config, SolrResourceLoader loader) {
String fname = config.getLoggingClass();
String slf4jImpl;
try {
slf4jImpl = StaticLoggerBinder.getSingleton().getLoggerFactoryClassStr();
log.info("SLF4J impl is " + slf4jImpl);
if (fname == ... |
public int compare(TermStats a, TermStats b) {
if (a.totalTermFreq < b.totalTermFreq) {
return 1;
} else if (a.totalTermFreq > b.totalTermFreq) {
return -1;
} else {
return 0;
}
}
}
/**
* Priority queue for TermStats objects ordered by docFreq
**/
final class TermStatsQueue exte... | public int compare(TermStats a, TermStats b) {
if (a.totalTermFreq < b.totalTermFreq) {
return 1;
} else if (a.totalTermFreq > b.totalTermFreq) {
return -1;
} else {
return 0;
}
}
}
/**
* Priority queue for TermStats objects ordered by docFreq
**/
final class TermStatsQueue exte... |
public FragmentQueue(int size)
{
initialize(size);
}
| public FragmentQueue(int size)
{
super(size);
}
|
public LookupPriorityQueue(int size) {
initialize(size);
}
| public LookupPriorityQueue(int size) {
super(size);
}
|
private void assertMatches(Searcher searcher, Query query, Sort sort,
String expectedResult) throws IOException {
//ScoreDoc[] result = searcher.search (query, null, 1000, sort).scoreDocs;
TopDocs hits = searcher.search (query, null, expectedResult.length(), sort);
ScoreDoc[] result = hits.scoreDocs... | private void assertMatches(Searcher searcher, Query query, Sort sort,
String expectedResult) throws IOException {
//ScoreDoc[] result = searcher.search (query, null, 1000, sort).scoreDocs;
TopDocs hits = searcher.search (query, null, Math.max(1, expectedResult.length()), sort);
ScoreDoc[] result = h... |
public void setParams(String sortField) {
super.setParams(sortField);
String[] fields = sortField.split(",");
SortField[] sortFields = new SortField[fields.length];
int upto = 0;
for (int i = 0; i < fields.length; i++) {
String field = fields[i];
SortField sortField0;
if (field.e... | public void setParams(String sortField) {
super.setParams(sortField);
String[] fields = sortField.split(",");
SortField[] sortFields = new SortField[fields.length];
int upto = 0;
for (int i = 0; i < fields.length; i++) {
String field = fields[i];
SortField sortField0;
if (field.e... |
private static final int[][] OLD_VERSIONS =
{
{10, 0, 2, 1}, // 10.0.2.1 (incubator release)
{10, 1, 1, 0}, // 10.1.1.0 (Aug 3, 2005 / SVN 208786)
{10, 1, 2, 1}, // 10.1.2.1 (Nov 18, 2005 / SVN 330608)
{10, 1, 3, 1}, // 10.1.3.1 (Jun 30, 2006 / SVN 417277)
{10, 2, 1, 6}, ... | private static final int[][] OLD_VERSIONS =
{
{10, 0, 2, 1}, // 10.0.2.1 (incubator release)
{10, 1, 1, 0}, // 10.1.1.0 (Aug 3, 2005 / SVN 208786)
{10, 1, 2, 1}, // 10.1.2.1 (Nov 18, 2005 / SVN 330608)
{10, 1, 3, 1}, // 10.1.3.1 (Jun 30, 2006 / SVN 417277)
{10, 2, 1, 6}, ... |
public String dirtyString()
{
StringBuilder sb = new StringBuilder();
for (Map.Entry<Integer, Integer> entry : cfDirtiedAt.entrySet())
sb.append(entry.getKey()).append(", ");
return sb.toString();
}
static void writeCommitLogHeader(CommitLogHeader header, String head... | public String dirtyString()
{
StringBuilder sb = new StringBuilder();
for (Map.Entry<Integer, Integer> entry : cfDirtiedAt.entrySet())
sb.append(entry.getKey()).append(", ");
return sb.toString();
}
static void writeCommitLogHeader(CommitLogHeader header, String head... |
public void testMiscellaneous() throws SQLException
{
DatabaseMetaData dmd = getDMD();
assertTrue(dmd.allProceduresAreCallable());
assertTrue(dmd.allTablesAreSelectable());
assertFalse(dmd.dataDefinitionCausesTransactionCommit());
assertFalse(dmd.dataDefinitionIg... | public void testMiscellaneous() throws SQLException
{
DatabaseMetaData dmd = getDMD();
assertTrue(dmd.allProceduresAreCallable());
assertTrue(dmd.allTablesAreSelectable());
assertFalse(dmd.dataDefinitionCausesTransactionCommit());
assertFalse(dmd.dataDefinitionIg... |
protected SolrResponse processMessage(ZkNodeProps message, String operation) {
NamedList results = new NamedList();
try {
if (CREATECOLLECTION.equals(operation)) {
createCollection(zkStateReader.getClusterState(), message);
} else if (DELETECOLLECTION.equals(operation)) {
Modi... | protected SolrResponse processMessage(ZkNodeProps message, String operation) {
NamedList results = new NamedList();
try {
if (CREATECOLLECTION.equals(operation)) {
createCollection(zkStateReader.getClusterState(), message);
} else if (DELETECOLLECTION.equals(operation)) {
Modi... |
public int run(String[] args) throws Exception
{
Configuration conf = getConf();
for (int i = 0; i < WordCountSetup.TEST_COUNT; i++)
{
String columnName = "text" + i;
conf.set(CONF_COLUMN_NAME, columnName);
Job job = new Job(conf, "wordcount");
... | public int run(String[] args) throws Exception
{
Configuration conf = getConf();
for (int i = 0; i < WordCountSetup.TEST_COUNT; i++)
{
String columnName = "text" + i;
conf.set(CONF_COLUMN_NAME, columnName);
Job job = new Job(conf, "wordcount");
... |
private void assertOrdinalsExist(String field, IndexReader ir) throws IOException {
for (AtomicReaderContext context : ir.leaves()) {
AtomicReader r = context.reader();
if (r.docValues(field) != null) {
return; // not all segments must have this DocValues
}
}
fail("no ordinals fo... | private void assertOrdinalsExist(String field, IndexReader ir) throws IOException {
for (AtomicReaderContext context : ir.leaves()) {
AtomicReader r = context.reader();
if (r.getBinaryDocValues(field) != null) {
return; // not all segments must have this DocValues
}
}
fail("no or... |
public void testDirectSource() throws Exception {
DirectoryReader indexReader = DirectoryReader.open(indexDir);
TaxonomyReader taxoReader = new DirectoryTaxonomyReader(taxoDir);
IndexSearcher searcher = new IndexSearcher(indexReader);
FacetSearchParams fsp = new FacetSearchParams(new CountFacetRe... | public void testDirectSource() throws Exception {
DirectoryReader indexReader = DirectoryReader.open(indexDir);
TaxonomyReader taxoReader = new DirectoryTaxonomyReader(taxoDir);
IndexSearcher searcher = new IndexSearcher(indexReader);
FacetSearchParams fsp = new FacetSearchParams(new CountFacetRe... |
protected Codec getCodec() {
return new Lucene40Codec();
}
| protected Codec getCodec() {
return new Lucene40RWCodec();
}
|
public void testAddDocument() throws Exception {
Document testDoc = new Document();
DocHelper.setupDoc(testDoc);
IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())));
writer.addDocument(testDoc);
writer.commit();
SegmentInfoPerCommit... | public void testAddDocument() throws Exception {
Document testDoc = new Document();
DocHelper.setupDoc(testDoc);
IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())));
writer.addDocument(testDoc);
writer.commit();
SegmentInfoPerCommit... |
public final void collect(int doc) throws IOException {
//System.out.println("Q1: Doc=" + doc + " score=" + score);
float score = scorer.score();
assertTrue(score==1.0f);
super.collect(doc);
... | public final void collect(int doc) throws IOException {
//System.out.println("Q1: Doc=" + doc + " score=" + score);
float score = scorer.score();
assertTrue("got score=" + score, score==1.0f);
super.col... |
public void add(long v) throws IOException {
assert v >= 0 && v <= PackedInts.maxValue(bitsPerValue);
assert !finished;
if (valueCount != -1 && written >= valueCount) {
throw new EOFException("Writing past end of stream");
}
nextValues[off++] = v;
if (off == nextValues.length) {
fl... | public void add(long v) throws IOException {
assert bitsPerValue == 64 || (v >= 0 && v <= PackedInts.maxValue(bitsPerValue)) : bitsPerValue;
assert !finished;
if (valueCount != -1 && written >= valueCount) {
throw new EOFException("Writing past end of stream");
}
nextValues[off++] = v;
i... |
public PostingsReaderBase postingsReaderBase(SegmentReadState state) throws IOException {
return new Lucene40PostingsReader(state.dir, state.fieldInfos, state.segmentInfo, state.context, state.segmentSuffix);
}
| public PostingsReaderBase postingsReaderBase(SegmentReadState state) throws IOException {
return new Lucene40PostingsReader(state.directory, state.fieldInfos, state.segmentInfo, state.context, state.segmentSuffix);
}
|
public PostingsReaderBase postingsReaderBase(SegmentReadState state) throws IOException {
return new Lucene41PostingsReader(state.dir, state.fieldInfos, state.segmentInfo, state.context, state.segmentSuffix);
}
| public PostingsReaderBase postingsReaderBase(SegmentReadState state) throws IOException {
return new Lucene41PostingsReader(state.directory, state.fieldInfos, state.segmentInfo, state.context, state.segmentSuffix);
}
|
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
The ASF licenses this file to You under the... | <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
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.
The ASF licenses this file to You under the... |
public FieldsProducer fieldsProducer(SegmentReadState state) throws IOException {
PostingsReaderBase docsReader = null;
PostingsReaderBase pulsingReader = null;
boolean success = false;
try {
docsReader = wrappedPostingsBaseFormat.postingsReaderBase(state);
pulsingReader = new PulsingPost... | public FieldsProducer fieldsProducer(SegmentReadState state) throws IOException {
PostingsReaderBase docsReader = null;
PostingsReaderBase pulsingReader = null;
boolean success = false;
try {
docsReader = wrappedPostingsBaseFormat.postingsReaderBase(state);
pulsingReader = new PulsingPost... |
public SimpleTextFieldsReader(SegmentReadState state) throws IOException {
fieldInfos = state.fieldInfos;
in = state.dir.openInput(SimpleTextPostingsFormat.getPostingsFileName(state.segmentInfo.name, state.segmentSuffix), state.context);
boolean success = false;
try {
fields = readFields(in.clon... | public SimpleTextFieldsReader(SegmentReadState state) throws IOException {
fieldInfos = state.fieldInfos;
in = state.directory.openInput(SimpleTextPostingsFormat.getPostingsFileName(state.segmentInfo.name, state.segmentSuffix), state.context);
boolean success = false;
try {
fields = readFields(i... |
public FieldsProducer fieldsProducer(SegmentReadState readState)
throws IOException {
// Load our ID:
final String idFileName = IndexFileNames.segmentFileName(readState.segmentInfo.name, readState.segmentSuffix, ID_EXTENSION);
IndexInput in = readState.dir.openInput(idFileName, readState.context);
... | public FieldsProducer fieldsProducer(SegmentReadState readState)
throws IOException {
// Load our ID:
final String idFileName = IndexFileNames.segmentFileName(readState.segmentInfo.name, readState.segmentSuffix, ID_EXTENSION);
IndexInput in = readState.directory.openInput(idFileName, readState.contex... |
public void testSmallTokenInStream() throws Exception {
input = new WhitespaceTokenizer(Version.LUCENE_CURRENT, new StringReader("abc de fgh"));
NGramTokenFilter filter = new NGramTokenFilter(input, 3, 3);
assertTokenStreamContents(filter, new String[]{"abc","fgh"}, new int[]{0,0}, new int[]{3,3})... | public void testSmallTokenInStream() throws Exception {
input = new WhitespaceTokenizer(Version.LUCENE_CURRENT, new StringReader("abc de fgh"));
NGramTokenFilter filter = new NGramTokenFilter(input, 3, 3);
assertTokenStreamContents(filter, new String[]{"abc","fgh"}, new int[]{0,7}, new int[]{3,10}... |
public void testSmallTokenInStream() throws Exception {
input = new WhitespaceTokenizer(Version.LUCENE_CURRENT, new StringReader("abc de fgh"));
EdgeNGramTokenFilter tokenizer = new EdgeNGramTokenFilter(input, EdgeNGramTokenFilter.Side.FRONT, 3, 3);
assertTokenStreamContents(tokenizer, new String[]{"abc",... | public void testSmallTokenInStream() throws Exception {
input = new WhitespaceTokenizer(Version.LUCENE_CURRENT, new StringReader("abc de fgh"));
EdgeNGramTokenFilter tokenizer = new EdgeNGramTokenFilter(input, EdgeNGramTokenFilter.Side.FRONT, 3, 3);
assertTokenStreamContents(tokenizer, new String[]{"abc",... |
static public void finishStreamRequest(Message msg, InetAddress to)
{
byte[] body = msg.getMessageBody();
ByteArrayInputStream bufIn = new ByteArrayInputStream(body);
try
{
StreamRequestMessage srm = StreamRequestMessage.serializer().deserialize(new DataInputStream(... | static public void finishStreamRequest(Message msg, InetAddress to)
{
byte[] body = msg.getMessageBody();
ByteArrayInputStream bufIn = new ByteArrayInputStream(body);
try
{
StreamRequestMessage srm = StreamRequestMessage.serializer().deserialize(new DataInputStream(... |
public void preprocess(Message message)
{
byte[] body = message.getMessageBody();
ByteArrayInputStream bufIn = new ByteArrayInputStream(body);
try
{
ReadResponse result = ReadResponse.serializer().deserialize(new DataInputStream(bufIn));
if (logger_.isDebu... | public void preprocess(Message message)
{
byte[] body = message.getMessageBody();
ByteArrayInputStream bufIn = new ByteArrayInputStream(body);
try
{
ReadResponse result = ReadResponse.serializer().deserialize(new DataInputStream(bufIn), message.getVersion());
... |
public static Filter defreezeBloomFilter(FileDataInput file, boolean useOldBuffer) throws IOException
{
int size = file.readInt();
ByteBuffer bytes = file.readBytes(size);
DataInputStream stream = new DataInputStream(ByteBufferUtil.inputStream(bytes));
return useOldBuffer
... | public static Filter defreezeBloomFilter(FileDataInput file, boolean useOldBuffer) throws IOException
{
int size = file.readInt();
ByteBuffer bytes = file.readBytes(size);
DataInputStream stream = new DataInputStream(ByteBufferUtil.inputStream(bytes));
return useOldBuffer
... |
public void setTrackedBy(SSTableTracker tracker)
{
if (tracker != null)
{
phantomReference = new SSTableDeletingReference(tracker, this, finalizerQueue);
finalizers.add(phantomReference);
keyCache = tracker.getKeyCache();
}
}
void loadBloomFil... | public void setTrackedBy(SSTableTracker tracker)
{
if (tracker != null)
{
phantomReference = new SSTableDeletingReference(tracker, this, finalizerQueue);
finalizers.add(phantomReference);
keyCache = tracker.getKeyCache();
}
}
void loadBloomFil... |
public void doVerb(Message message)
{
byte[] body = message.getMessageBody();
ByteArrayInputStream buffer = new ByteArrayInputStream(body);
try
{
RowMutation rm = RowMutation.serializer().deserialize(new DataInputStream(buffer));
rm.appl... | public void doVerb(Message message)
{
byte[] body = message.getMessageBody();
ByteArrayInputStream buffer = new ByteArrayInputStream(body);
try
{
RowMutation rm = RowMutation.serializer().deserialize(new DataInputStream(buffer), message.getVersion()... |
public void doVerb(Message message)
{
byte[] bytes = message.getMessageBody();
ByteArrayInputStream buffer = new ByteArrayInputStream(bytes);
try
{
RowMutation rm = RowMutation.serializer().deserialize(new DataInputStream(buffer));
rm.applyBinary();
... | public void doVerb(Message message)
{
byte[] bytes = message.getMessageBody();
ByteArrayInputStream buffer = new ByteArrayInputStream(bytes);
try
{
RowMutation rm = RowMutation.serializer().deserialize(new DataInputStream(buffer), message.getVersion());
... |
public void doVerb(Message message)
{
try
{
RowMutation rm = RowMutation.fromBytes(message.getMessageBody());
if (logger_.isDebugEnabled())
logger_.debug("Applying " + rm);
/* Check if there were any hints in this message */
byte[] h... | public void doVerb(Message message)
{
try
{
RowMutation rm = RowMutation.fromBytes(message.getMessageBody(), message.getVersion());
if (logger_.isDebugEnabled())
logger_.debug("Applying " + rm);
/* Check if there were any hints in this message *... |
public void doVerb(Message message)
{
byte[] bytes = message.getMessageBody();
ByteArrayInputStream buffer = new ByteArrayInputStream(bytes);
try
{
DataInputStream is = new DataInputStream(buffer);
CounterMutation cm = CounterMutation.serializer().deseria... | public void doVerb(Message message)
{
byte[] bytes = message.getMessageBody();
ByteArrayInputStream buffer = new ByteArrayInputStream(bytes);
try
{
DataInputStream is = new DataInputStream(buffer);
CounterMutation cm = CounterMutation.serializer().deseria... |
public void doVerb(Message message)
{
byte[] bytes = message.getMessageBody();
ByteArrayInputStream buffer = new ByteArrayInputStream(bytes);
try
{
Truncation t = Truncation.serializer().deserialize(new DataInputStream(buffer));
logger.debug("Applying {}"... | public void doVerb(Message message)
{
byte[] bytes = message.getMessageBody();
ByteArrayInputStream buffer = new ByteArrayInputStream(bytes);
try
{
Truncation t = Truncation.serializer().deserialize(new DataInputStream(buffer), message.getVersion());
logg... |
public void doVerb(Message message)
{
InetAddress from = message.getFrom();
if (logger_.isTraceEnabled())
logger_.trace("Received a GossipDigestAck2Message from {}", from);
byte[] bytes = message.getMessageBody();
DataInputStream dis = new DataInputStream( new ByteAr... | public void doVerb(Message message)
{
InetAddress from = message.getFrom();
if (logger_.isTraceEnabled())
logger_.trace("Received a GossipDigestAck2Message from {}", from);
byte[] bytes = message.getMessageBody();
DataInputStream dis = new DataInputStream( new ByteAr... |
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 void doVerb(Message message)
{
if (logger.isDebugEnabled())
logger.debug("Received a StreamRequestMessage from {}", message.getFrom());
byte[] body = message.getMessageBody();
ByteArrayInputStream bufIn = new ByteArrayInputStream(body);
try
{
... | public void doVerb(Message message)
{
if (logger.isDebugEnabled())
logger.debug("Received a StreamRequestMessage from {}", message.getFrom());
byte[] body = message.getMessageBody();
ByteArrayInputStream bufIn = new ByteArrayInputStream(body);
try
{
... |
public void doVerb(Message message)
{
byte[] body = message.getMessageBody();
ByteArrayInputStream bufIn = new ByteArrayInputStream(body);
try
{
StreamReply reply = StreamReply.serializer.deserialize(new DataInputStream(bufIn));
logger.debug("Received Str... | public void doVerb(Message message)
{
byte[] body = message.getMessageBody();
ByteArrayInputStream bufIn = new ByteArrayInputStream(body);
try
{
StreamReply reply = StreamReply.serializer.deserialize(new DataInputStream(bufIn), message.getVersion());
logg... |
private SSTableReader writeSortedContents() throws IOException
{
logger.info("Writing " + this);
SSTableWriter writer = new SSTableWriter(cfs.getFlushPath(), columnFamilies.size(), partitioner);
for (Map.Entry<DecoratedKey, ColumnFamily> entry : columnFamilies.entrySet())
wr... | private SSTableReader writeSortedContents() throws IOException
{
logger.info("Writing " + this);
SSTableWriter writer = new SSTableWriter(cfs.getFlushPath(), columnFamilies.size(), cfs.metadata, partitioner);
for (Map.Entry<DecoratedKey, ColumnFamily> entry : columnFamilies.entrySet())
... |
private SSTableReader writeSortedContents(List<DecoratedKey> sortedKeys) throws IOException
{
logger.info("Writing " + this);
String path = cfs.getFlushPath();
SSTableWriter writer = new SSTableWriter(path, sortedKeys.size(), StorageService.getPartitioner());
for (DecoratedKey k... | private SSTableReader writeSortedContents(List<DecoratedKey> sortedKeys) throws IOException
{
logger.info("Writing " + this);
String path = cfs.getFlushPath();
SSTableWriter writer = new SSTableWriter(path, sortedKeys.size(), cfs.metadata, cfs.partitioner_);
for (DecoratedKey ke... |
public static void importJson(String jsonFile, String keyspace, String cf, String ssTablePath)
throws IOException, ParseException
{
ColumnFamily cfamily = ColumnFamily.create(keyspace, cf);
ColumnFamilyType cfType = cfamily.getColumnFamilyType(); // Super or Standard
IPartitioner<... | public static void importJson(String jsonFile, String keyspace, String cf, String ssTablePath)
throws IOException, ParseException
{
ColumnFamily cfamily = ColumnFamily.create(keyspace, cf);
ColumnFamilyType cfType = cfamily.getColumnFamilyType(); // Super or Standard
IPartitioner<... |
public static SSTableReader writeRawSSTable(String tablename, String cfname, Map<byte[], byte[]> entries) throws IOException
{
File datafile = tempSSTableFile(tablename, cfname);
SSTableWriter writer = new SSTableWriter(datafile.getAbsolutePath(), entries.size(), StorageService.getPartitioner())... | public static SSTableReader writeRawSSTable(String tablename, String cfname, Map<byte[], byte[]> entries) throws IOException
{
File datafile = tempSSTableFile(tablename, cfname);
SSTableWriter writer = new SSTableWriter(datafile.getAbsolutePath(), entries.size());
SortedMap<DecoratedKey,... |
public RuleWithSetExceptions(String suffix, int min, String replacement,
String[] exceptions) {
super(suffix, min, replacement);
for (int i = 0; i < exceptions.length; i++) {
if (!exceptions[i].endsWith(suffix))
throw new RuntimeException("useless exception '" + exceptions[i] +... | public RuleWithSetExceptions(String suffix, int min, String replacement,
String[] exceptions) {
super(suffix, min, replacement);
for (int i = 0; i < exceptions.length; i++) {
if (!exceptions[i].endsWith(suffix))
throw new RuntimeException("useless exception '" + exceptions[i] +... |
public void testStopList() throws IOException {
CharArraySet stopWordsSet = new CharArraySet(TEST_VERSION_CURRENT, asSet("good", "test", "analyzer"), false);
StopAnalyzer newStop = new StopAnalyzer(Version.LUCENE_40, stopWordsSet);
try (TokenStream stream = newStop.tokenStream("test", "This is a good test... | public void testStopList() throws IOException {
CharArraySet stopWordsSet = new CharArraySet(TEST_VERSION_CURRENT, asSet("good", "test", "analyzer"), false);
StopAnalyzer newStop = new StopAnalyzer(TEST_VERSION_CURRENT, stopWordsSet);
try (TokenStream stream = newStop.tokenStream("test", "This is a good t... |
private static File convertGLFile(File originalFile, boolean ratings) throws IOException {
// Now translate the file; remove commas, then convert "::" delimiter to comma
File resultFile = new File(new File(System.getProperty("java.io.tmpdir")),
"taste." + (ratings ? "ratin... | private static File convertGLFile(File originalFile, boolean ratings) throws IOException {
// Now translate the file; remove commas, then convert "::" delimiter to comma
File resultFile = new File(new File(System.getProperty("java.io.tmpdir")),
(ratings ? "ratings" : "movi... |
private final Set<CoreClosedListener> coreClosedListeners =
Collections.synchronizedSet(new LinkedHashSet<CoreClosedListener>());
SegmentCoreReaders(SegmentReader owner, Directory dir, SegmentInfoPerCommit si, IOContext context, int termsIndexDivisor) throws IOException {
if (termsIndexDivisor ==... | private final Set<CoreClosedListener> coreClosedListeners =
Collections.synchronizedSet(new LinkedHashSet<CoreClosedListener>());
SegmentCoreReaders(SegmentReader owner, Directory dir, SegmentInfoPerCommit si, IOContext context, int termsIndexDivisor) throws IOException {
if (termsIndexDivisor ==... |
public NumericDocValues getNormValues(String field) throws IOException {
ensureOpen();
return core.getSimpleNormValues(field);
}
| public NumericDocValues getNormValues(String field) throws IOException {
ensureOpen();
return core.getNormValues(field);
}
|
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... |
public static boolean cleanup() {
try {
if (atLeastOneDebug)
dblook.writeVerboseOutput(
"CSLOOK_AtLeastOneDebug", null);
logFile.close();
if (ddlFile != null)
ddlFile.close();
}
catch (Exception e) {
System.out.println("Error releasing resources: " + e);
return false;
}
retu... | public static boolean cleanup() {
try {
if (atLeastOneDebug)
dblook.writeVerboseOutput(
"DBLOOK_AtLeastOneDebug", null);
logFile.close();
if (ddlFile != null)
ddlFile.close();
}
catch (Exception e) {
System.out.println("Error releasing resources: " + e);
return false;
}
retu... |
public static void doSchemas(Connection conn,
boolean tablesOnly) throws SQLException
{
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT SCHEMANAME, SCHEMAID " +
"FROM SYS.SYSSCHEMAS");
boolean firstTime = true;
while (rs.next()) {
String sName = dblook.addQuotes(
... | public static void doSchemas(Connection conn,
boolean tablesOnly) throws SQLException
{
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT SCHEMANAME, SCHEMAID " +
"FROM SYS.SYSSCHEMAS");
boolean firstTime = true;
while (rs.next()) {
String sName = dblook.addQuotes(
... |
public static void doTriggers (Connection conn)
throws SQLException
{
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT TRIGGERNAME, SCHEMAID, " +
"EVENT, FIRINGTIME, TYPE, TABLEID, REFERENCEDCOLUMNS, " +
"TRIGGERDEFINITION, REFERENCINGOLD, REFERENCINGNEW, OLDREFERENCINGN... | public static void doTriggers (Connection conn)
throws SQLException
{
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT TRIGGERNAME, SCHEMAID, " +
"EVENT, FIRINGTIME, TYPE, TABLEID, REFERENCEDCOLUMNS, " +
"TRIGGERDEFINITION, REFERENCINGOLD, REFERENCINGNEW, OLDREFERENCINGN... |
public static void doIndexes(Connection conn)
throws SQLException
{
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT TABLEID, CONGLOMERATENAME, " +
"DESCRIPTOR, SCHEMAID, ISINDEX, ISCONSTRAINT FROM SYS.SYSCONGLOMERATES " +
"ORDER BY TABLEID");
boolean firstTime = true;... | public static void doIndexes(Connection conn)
throws SQLException
{
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT TABLEID, CONGLOMERATENAME, " +
"DESCRIPTOR, SCHEMAID, ISINDEX, ISCONSTRAINT FROM SYS.SYSCONGLOMERATES " +
"ORDER BY TABLEID");
boolean firstTime = true;... |
public static void doTables(Connection conn, HashMap tableIdToNameMap)
throws SQLException
{
// Prepare some statements for general use by this class.
getColumnInfoStmt =
conn.prepareStatement("SELECT C.COLUMNNAME, C.REFERENCEID, " +
"C.COLUMNNUMBER FROM SYS.SYSCOLUMNS C, SYS.SYSTABLES T WHERE T.TABLEID... | public static void doTables(Connection conn, HashMap tableIdToNameMap)
throws SQLException
{
// Prepare some statements for general use by this class.
getColumnInfoStmt =
conn.prepareStatement("SELECT C.COLUMNNAME, C.REFERENCEID, " +
"C.COLUMNNUMBER FROM SYS.SYSCOLUMNS C, SYS.SYSTABLES T WHERE T.TABLEID... |
public static void doStoredProcedures(Connection conn)
throws SQLException {
// Note: it is safe to cast the long varchar column "javaclassname"
// to varchar(128) because it is defined to correspond to the
// 'aliasid' column for a given stored procedure; since the aliasid
// column is varchar(128), javacl... | public static void doStoredProcedures(Connection conn)
throws SQLException {
// Note: it is safe to cast the long varchar column "javaclassname"
// to varchar(128) because it is defined to correspond to the
// 'aliasid' column for a given stored procedure; since the aliasid
// column is varchar(128), javacl... |
public static void doChecks(Connection conn)
throws SQLException
{
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT CS.CONSTRAINTNAME, " +
"CS.TABLEID, CS.SCHEMAID, CK.CHECKDEFINITION FROM SYS.SYSCONSTRAINTS CS, " +
"SYS.SYSCHECKS CK WHERE CS.CONSTRAINTID = " +
"CK.CON... | public static void doChecks(Connection conn)
throws SQLException
{
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT CS.CONSTRAINTNAME, " +
"CS.TABLEID, CS.SCHEMAID, CK.CHECKDEFINITION FROM SYS.SYSCONSTRAINTS CS, " +
"SYS.SYSCHECKS CK WHERE CS.CONSTRAINTID = " +
"CK.CON... |
public void flip(long startIndex, long endIndex) {
if (endIndex <= startIndex) return;
int oldlen = wlen;
ensureCapacity(endIndex);
int startWord = (int)(startIndex>>6);
int endWord = (int)(endIndex>>6);
/*** Grrr, java shifting wraps around so -1L>>64 == -1
long startmask = -1L << (st... | public void flip(long startIndex, long endIndex) {
if (endIndex <= startIndex) return;
int oldlen = wlen;
ensureCapacity(endIndex);
int startWord = (int)(startIndex>>6);
int endWord = (int)(endIndex>>6);
/*** Grrr, java shifting wraps around so -1L>>64 == -1
long startmask = -1L << (st... |
private MultiReader(IndexReader[] subReaders, boolean[] decrefOnClose,
Collection<ReaderFinishedListener> readerFinishedListeners)
throws IOException {
this.subReaders = subReaders.clone();
this.decrefOnClose = decrefOnClose;
this.readerFinishedListeners = read... | private MultiReader(IndexReader[] subReaders, boolean[] decrefOnClose,
Collection<ReaderFinishedListener> readerFinishedListeners)
throws IOException {
this.subReaders = subReaders;
this.decrefOnClose = decrefOnClose;
this.readerFinishedListeners = readerFinish... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.