id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
61,600 | VoltDB/voltdb | src/frontend/org/voltdb/StatsProcProfTable.java | StatsProcProfTable.compareByAvg | public int compareByAvg(ProcProfRow lhs, ProcProfRow rhs)
{
if (lhs.avg * lhs.invocations > rhs.avg * rhs.invocations) {
return 1;
} else if (lhs.avg * lhs.invocations < rhs.avg * rhs.invocations) {
return -1;
} else {
return 0;
}
} | java | public int compareByAvg(ProcProfRow lhs, ProcProfRow rhs)
{
if (lhs.avg * lhs.invocations > rhs.avg * rhs.invocations) {
return 1;
} else if (lhs.avg * lhs.invocations < rhs.avg * rhs.invocations) {
return -1;
} else {
return 0;
}
} | [
"public",
"int",
"compareByAvg",
"(",
"ProcProfRow",
"lhs",
",",
"ProcProfRow",
"rhs",
")",
"{",
"if",
"(",
"lhs",
".",
"avg",
"*",
"lhs",
".",
"invocations",
">",
"rhs",
".",
"avg",
"*",
"rhs",
".",
"invocations",
")",
"{",
"return",
"1",
";",
"}",
... | Sort by average, weighting the sampled average by the real invocation count. | [
"Sort",
"by",
"average",
"weighting",
"the",
"sampled",
"average",
"by",
"the",
"real",
"invocation",
"count",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/StatsProcProfTable.java#L169-L178 |
61,601 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/RejoinProducer.java | RejoinProducer.doInitiation | void doInitiation(RejoinMessage message)
{
m_coordinatorHsId = message.m_sourceHSId;
m_hasPersistentTables = message.schemaHasPersistentTables();
if (m_hasPersistentTables) {
m_streamSnapshotMb = VoltDB.instance().getHostMessenger().createMailbox();
m_rejoinSiteProces... | java | void doInitiation(RejoinMessage message)
{
m_coordinatorHsId = message.m_sourceHSId;
m_hasPersistentTables = message.schemaHasPersistentTables();
if (m_hasPersistentTables) {
m_streamSnapshotMb = VoltDB.instance().getHostMessenger().createMailbox();
m_rejoinSiteProces... | [
"void",
"doInitiation",
"(",
"RejoinMessage",
"message",
")",
"{",
"m_coordinatorHsId",
"=",
"message",
".",
"m_sourceHSId",
";",
"m_hasPersistentTables",
"=",
"message",
".",
"schemaHasPersistentTables",
"(",
")",
";",
"if",
"(",
"m_hasPersistentTables",
")",
"{",
... | Runs when the RejoinCoordinator decides this site should start
rejoin. | [
"Runs",
"when",
"the",
"RejoinCoordinator",
"decides",
"this",
"site",
"should",
"start",
"rejoin",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/RejoinProducer.java#L235-L277 |
61,602 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/persist/DataFileDefrag.java | DataFileDefrag.updateTableIndexRoots | void updateTableIndexRoots() {
HsqlArrayList allTables = database.schemaManager.getAllTables();
for (int i = 0, size = allTables.size(); i < size; i++) {
Table t = (Table) allTables.get(i);
if (t.getTableType() == TableBase.CACHED_TABLE) {
int[] rootsArray = ro... | java | void updateTableIndexRoots() {
HsqlArrayList allTables = database.schemaManager.getAllTables();
for (int i = 0, size = allTables.size(); i < size; i++) {
Table t = (Table) allTables.get(i);
if (t.getTableType() == TableBase.CACHED_TABLE) {
int[] rootsArray = ro... | [
"void",
"updateTableIndexRoots",
"(",
")",
"{",
"HsqlArrayList",
"allTables",
"=",
"database",
".",
"schemaManager",
".",
"getAllTables",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"size",
"=",
"allTables",
".",
"size",
"(",
")",
";",
"i",
"... | called from outside after the complete end of defrag | [
"called",
"from",
"outside",
"after",
"the",
"complete",
"end",
"of",
"defrag"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/DataFileDefrag.java#L184-L197 |
61,603 | VoltDB/voltdb | src/frontend/org/voltdb/InvocationDispatcher.java | InvocationDispatcher.sendSentinel | public final void sendSentinel(long txnId, int partitionId) {
final long initiatorHSId = m_cartographer.getHSIdForSinglePartitionMaster(partitionId);
sendSentinel(txnId, initiatorHSId, -1, -1, true);
} | java | public final void sendSentinel(long txnId, int partitionId) {
final long initiatorHSId = m_cartographer.getHSIdForSinglePartitionMaster(partitionId);
sendSentinel(txnId, initiatorHSId, -1, -1, true);
} | [
"public",
"final",
"void",
"sendSentinel",
"(",
"long",
"txnId",
",",
"int",
"partitionId",
")",
"{",
"final",
"long",
"initiatorHSId",
"=",
"m_cartographer",
".",
"getHSIdForSinglePartitionMaster",
"(",
"partitionId",
")",
";",
"sendSentinel",
"(",
"txnId",
",",
... | Send a command log replay sentinel to the given partition.
@param txnId
@param partitionId | [
"Send",
"a",
"command",
"log",
"replay",
"sentinel",
"to",
"the",
"given",
"partition",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/InvocationDispatcher.java#L898-L901 |
61,604 | VoltDB/voltdb | src/frontend/org/voltdb/InvocationDispatcher.java | InvocationDispatcher.dispatchLoadSinglepartitionTable | private final ClientResponseImpl dispatchLoadSinglepartitionTable(Procedure catProc,
StoredProcedureInvocation task,
InvocationClientHandler handler,
Co... | java | private final ClientResponseImpl dispatchLoadSinglepartitionTable(Procedure catProc,
StoredProcedureInvocation task,
InvocationClientHandler handler,
Co... | [
"private",
"final",
"ClientResponseImpl",
"dispatchLoadSinglepartitionTable",
"(",
"Procedure",
"catProc",
",",
"StoredProcedureInvocation",
"task",
",",
"InvocationClientHandler",
"handler",
",",
"Connection",
"ccxn",
")",
"{",
"int",
"partition",
"=",
"-",
"1",
";",
... | Coward way out of the legacy hashinator hell. LoadSinglepartitionTable gets the
partitioning parameter as a byte array. Legacy hashinator hashes numbers and byte arrays
differently, so have to convert it back to long if it's a number. UGLY!!! | [
"Coward",
"way",
"out",
"of",
"the",
"legacy",
"hashinator",
"hell",
".",
"LoadSinglepartitionTable",
"gets",
"the",
"partitioning",
"parameter",
"as",
"a",
"byte",
"array",
".",
"Legacy",
"hashinator",
"hashes",
"numbers",
"and",
"byte",
"arrays",
"differently",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/InvocationDispatcher.java#L923-L950 |
61,605 | VoltDB/voltdb | src/frontend/org/voltdb/InvocationDispatcher.java | InvocationDispatcher.handleAllHostNTProcedureResponse | public void handleAllHostNTProcedureResponse(ClientResponseImpl clientResponseData) {
long handle = clientResponseData.getClientHandle();
ProcedureRunnerNT runner = m_NTProcedureService.m_outstanding.get(handle);
if (runner == null) {
hostLog.info("Run everywhere NTProcedure early re... | java | public void handleAllHostNTProcedureResponse(ClientResponseImpl clientResponseData) {
long handle = clientResponseData.getClientHandle();
ProcedureRunnerNT runner = m_NTProcedureService.m_outstanding.get(handle);
if (runner == null) {
hostLog.info("Run everywhere NTProcedure early re... | [
"public",
"void",
"handleAllHostNTProcedureResponse",
"(",
"ClientResponseImpl",
"clientResponseData",
")",
"{",
"long",
"handle",
"=",
"clientResponseData",
".",
"getClientHandle",
"(",
")",
";",
"ProcedureRunnerNT",
"runner",
"=",
"m_NTProcedureService",
".",
"m_outstan... | Passes responses to NTProcedureService | [
"Passes",
"responses",
"to",
"NTProcedureService"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/InvocationDispatcher.java#L1480-L1488 |
61,606 | VoltDB/voltdb | src/frontend/org/voltdb/planner/FilterMatcher.java | FilterMatcher.valueConstantsMatch | private static boolean valueConstantsMatch(AbstractExpression e1, AbstractExpression e2) {
return (e1 instanceof ParameterValueExpression && e2 instanceof ConstantValueExpression ||
e1 instanceof ConstantValueExpression && e2 instanceof ParameterValueExpression) &&
equalsAsCVE(e1... | java | private static boolean valueConstantsMatch(AbstractExpression e1, AbstractExpression e2) {
return (e1 instanceof ParameterValueExpression && e2 instanceof ConstantValueExpression ||
e1 instanceof ConstantValueExpression && e2 instanceof ParameterValueExpression) &&
equalsAsCVE(e1... | [
"private",
"static",
"boolean",
"valueConstantsMatch",
"(",
"AbstractExpression",
"e1",
",",
"AbstractExpression",
"e2",
")",
"{",
"return",
"(",
"e1",
"instanceof",
"ParameterValueExpression",
"&&",
"e2",
"instanceof",
"ConstantValueExpression",
"||",
"e1",
"instanceof... | Value comparison between one CVE and one PVE.
@param e1 first expression
@param e2 second expression
@return whether one is CVE, the other is PVE, and their values equal. | [
"Value",
"comparison",
"between",
"one",
"CVE",
"and",
"one",
"PVE",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/FilterMatcher.java#L124-L128 |
61,607 | VoltDB/voltdb | src/frontend/org/voltdb/planner/FilterMatcher.java | FilterMatcher.equalsAsCVE | private static boolean equalsAsCVE(AbstractExpression e1, AbstractExpression e2) {
final ConstantValueExpression ce1 = asCVE(e1), ce2 = asCVE(e2);
return ce1 == null || ce2 == null ? ce1 == ce2 : ce1.equals(ce2);
} | java | private static boolean equalsAsCVE(AbstractExpression e1, AbstractExpression e2) {
final ConstantValueExpression ce1 = asCVE(e1), ce2 = asCVE(e2);
return ce1 == null || ce2 == null ? ce1 == ce2 : ce1.equals(ce2);
} | [
"private",
"static",
"boolean",
"equalsAsCVE",
"(",
"AbstractExpression",
"e1",
",",
"AbstractExpression",
"e2",
")",
"{",
"final",
"ConstantValueExpression",
"ce1",
"=",
"asCVE",
"(",
"e1",
")",
",",
"ce2",
"=",
"asCVE",
"(",
"e2",
")",
";",
"return",
"ce1"... | Check whether two expressions, each either a CVE or PVE, have same content.
\pre both must be either CVE or PVE.
@param e1 first expression
@param e2 second expression
@return whether their contents match. | [
"Check",
"whether",
"two",
"expressions",
"each",
"either",
"a",
"CVE",
"or",
"PVE",
"have",
"same",
"content",
".",
"\\",
"pre",
"both",
"must",
"be",
"either",
"CVE",
"or",
"PVE",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/FilterMatcher.java#L149-L152 |
61,608 | VoltDB/voltdb | src/frontend/org/voltdb/planner/FilterMatcher.java | FilterMatcher.asCVE | private static ConstantValueExpression asCVE(AbstractExpression expr) {
return expr instanceof ConstantValueExpression ? (ConstantValueExpression) expr :
((ParameterValueExpression) expr).getOriginalValue();
} | java | private static ConstantValueExpression asCVE(AbstractExpression expr) {
return expr instanceof ConstantValueExpression ? (ConstantValueExpression) expr :
((ParameterValueExpression) expr).getOriginalValue();
} | [
"private",
"static",
"ConstantValueExpression",
"asCVE",
"(",
"AbstractExpression",
"expr",
")",
"{",
"return",
"expr",
"instanceof",
"ConstantValueExpression",
"?",
"(",
"ConstantValueExpression",
")",
"expr",
":",
"(",
"(",
"ParameterValueExpression",
")",
"expr",
"... | Convert a ConstantValueExpression or ParameterValueExpression into a ConstantValueExpression.
\pre argument must be either of the two.
@param expr expression to be casted
@return casted ConstantValueExpression | [
"Convert",
"a",
"ConstantValueExpression",
"or",
"ParameterValueExpression",
"into",
"a",
"ConstantValueExpression",
".",
"\\",
"pre",
"argument",
"must",
"be",
"either",
"of",
"the",
"two",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/FilterMatcher.java#L159-L162 |
61,609 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/AbstractSubqueryExpression.java | AbstractSubqueryExpression.addCorrelationParameterValueExpression | protected void addCorrelationParameterValueExpression(AbstractExpression expr, List<AbstractExpression> pves) {
int paramIdx = ParameterizationInfo.getNextParamIndex();
m_parameterIdxList.add(paramIdx);
ParameterValueExpression pve = new ParameterValueExpression(paramIdx, expr);
pves.add... | java | protected void addCorrelationParameterValueExpression(AbstractExpression expr, List<AbstractExpression> pves) {
int paramIdx = ParameterizationInfo.getNextParamIndex();
m_parameterIdxList.add(paramIdx);
ParameterValueExpression pve = new ParameterValueExpression(paramIdx, expr);
pves.add... | [
"protected",
"void",
"addCorrelationParameterValueExpression",
"(",
"AbstractExpression",
"expr",
",",
"List",
"<",
"AbstractExpression",
">",
"pves",
")",
"{",
"int",
"paramIdx",
"=",
"ParameterizationInfo",
".",
"getNextParamIndex",
"(",
")",
";",
"m_parameterIdxList"... | to get the original expression value | [
"to",
"get",
"the",
"original",
"expression",
"value"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractSubqueryExpression.java#L91-L96 |
61,610 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/persist/Cache.java | Cache.get | public synchronized CachedObject get(int pos) {
if (accessCount == Integer.MAX_VALUE) {
resetAccessCount();
}
int lookup = getLookup(pos);
if (lookup == -1) {
return null;
}
accessTable[lookup] = accessCount++;
return (CachedObject) ob... | java | public synchronized CachedObject get(int pos) {
if (accessCount == Integer.MAX_VALUE) {
resetAccessCount();
}
int lookup = getLookup(pos);
if (lookup == -1) {
return null;
}
accessTable[lookup] = accessCount++;
return (CachedObject) ob... | [
"public",
"synchronized",
"CachedObject",
"get",
"(",
"int",
"pos",
")",
"{",
"if",
"(",
"accessCount",
"==",
"Integer",
".",
"MAX_VALUE",
")",
"{",
"resetAccessCount",
"(",
")",
";",
"}",
"int",
"lookup",
"=",
"getLookup",
"(",
"pos",
")",
";",
"if",
... | Returns a row if in memory cache. | [
"Returns",
"a",
"row",
"if",
"in",
"memory",
"cache",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Cache.java#L97-L112 |
61,611 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/persist/Cache.java | Cache.put | synchronized void put(int key, CachedObject row) {
int storageSize = row.getStorageSize();
if (size() >= capacity
|| storageSize + cacheBytesLength > bytesCapacity) {
cleanUp();
}
if (accessCount == Integer.MAX_VALUE) {
super.resetAccessCount();... | java | synchronized void put(int key, CachedObject row) {
int storageSize = row.getStorageSize();
if (size() >= capacity
|| storageSize + cacheBytesLength > bytesCapacity) {
cleanUp();
}
if (accessCount == Integer.MAX_VALUE) {
super.resetAccessCount();... | [
"synchronized",
"void",
"put",
"(",
"int",
"key",
",",
"CachedObject",
"row",
")",
"{",
"int",
"storageSize",
"=",
"row",
".",
"getStorageSize",
"(",
")",
";",
"if",
"(",
"size",
"(",
")",
">=",
"capacity",
"||",
"storageSize",
"+",
"cacheBytesLength",
"... | Adds a row to the cache. | [
"Adds",
"a",
"row",
"to",
"the",
"cache",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Cache.java#L117-L134 |
61,612 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/persist/Cache.java | Cache.release | synchronized CachedObject release(int i) {
CachedObject r = (CachedObject) super.addOrRemove(i, null, true);
if (r == null) {
return null;
}
cacheBytesLength -= r.getStorageSize();
r.setInMemory(false);
return r;
} | java | synchronized CachedObject release(int i) {
CachedObject r = (CachedObject) super.addOrRemove(i, null, true);
if (r == null) {
return null;
}
cacheBytesLength -= r.getStorageSize();
r.setInMemory(false);
return r;
} | [
"synchronized",
"CachedObject",
"release",
"(",
"int",
"i",
")",
"{",
"CachedObject",
"r",
"=",
"(",
"CachedObject",
")",
"super",
".",
"addOrRemove",
"(",
"i",
",",
"null",
",",
"true",
")",
";",
"if",
"(",
"r",
"==",
"null",
")",
"{",
"return",
"nu... | Removes an object from memory cache. Does not release the file storage. | [
"Removes",
"an",
"object",
"from",
"memory",
"cache",
".",
"Does",
"not",
"release",
"the",
"file",
"storage",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Cache.java#L139-L152 |
61,613 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/persist/Cache.java | Cache.saveAll | synchronized void saveAll() {
Iterator it = new BaseHashIterator();
int savecount = 0;
for (; it.hasNext(); ) {
CachedObject r = (CachedObject) it.next();
if (r.hasChanged()) {
rowTable[savecount++] = r;
}
}
save... | java | synchronized void saveAll() {
Iterator it = new BaseHashIterator();
int savecount = 0;
for (; it.hasNext(); ) {
CachedObject r = (CachedObject) it.next();
if (r.hasChanged()) {
rowTable[savecount++] = r;
}
}
save... | [
"synchronized",
"void",
"saveAll",
"(",
")",
"{",
"Iterator",
"it",
"=",
"new",
"BaseHashIterator",
"(",
")",
";",
"int",
"savecount",
"=",
"0",
";",
"for",
"(",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"CachedObject",
"r",
"=",
"(",
"Ca... | Writes out all modified cached Rows. | [
"Writes",
"out",
"all",
"modified",
"cached",
"Rows",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Cache.java#L266-L292 |
61,614 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AggregatePlanNode.java | AggregatePlanNode.addAggregate | public void addAggregate(ExpressionType aggType,
boolean isDistinct,
Integer aggOutputColumn,
AbstractExpression aggInputExpr)
{
m_aggregateTypes.add(aggType);
if (isDistinct)
{
m_aggregateDist... | java | public void addAggregate(ExpressionType aggType,
boolean isDistinct,
Integer aggOutputColumn,
AbstractExpression aggInputExpr)
{
m_aggregateTypes.add(aggType);
if (isDistinct)
{
m_aggregateDist... | [
"public",
"void",
"addAggregate",
"(",
"ExpressionType",
"aggType",
",",
"boolean",
"isDistinct",
",",
"Integer",
"aggOutputColumn",
",",
"AbstractExpression",
"aggInputExpr",
")",
"{",
"m_aggregateTypes",
".",
"add",
"(",
"aggType",
")",
";",
"if",
"(",
"isDistin... | Add an aggregate to this plan node.
@param aggType
@param isDistinct Is distinct being applied to the argument of this aggregate?
@param aggOutputColumn Which output column in the output schema this
aggregate should occupy
@param aggInputExpr The input expression which should get aggregated | [
"Add",
"an",
"aggregate",
"to",
"this",
"plan",
"node",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AggregatePlanNode.java#L354-L376 |
61,615 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AggregatePlanNode.java | AggregatePlanNode.convertToSerialAggregatePlanNode | public static AggregatePlanNode convertToSerialAggregatePlanNode(HashAggregatePlanNode hashAggregateNode) {
AggregatePlanNode serialAggr = new AggregatePlanNode();
return setAggregatePlanNode(hashAggregateNode, serialAggr);
} | java | public static AggregatePlanNode convertToSerialAggregatePlanNode(HashAggregatePlanNode hashAggregateNode) {
AggregatePlanNode serialAggr = new AggregatePlanNode();
return setAggregatePlanNode(hashAggregateNode, serialAggr);
} | [
"public",
"static",
"AggregatePlanNode",
"convertToSerialAggregatePlanNode",
"(",
"HashAggregatePlanNode",
"hashAggregateNode",
")",
"{",
"AggregatePlanNode",
"serialAggr",
"=",
"new",
"AggregatePlanNode",
"(",
")",
";",
"return",
"setAggregatePlanNode",
"(",
"hashAggregateNo... | Convert HashAggregate into a Serialized Aggregate
@param hashAggregateNode HashAggregatePlanNode
@return AggregatePlanNode | [
"Convert",
"HashAggregate",
"into",
"a",
"Serialized",
"Aggregate"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AggregatePlanNode.java#L591-L594 |
61,616 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AggregatePlanNode.java | AggregatePlanNode.convertToPartialAggregatePlanNode | public static AggregatePlanNode convertToPartialAggregatePlanNode(HashAggregatePlanNode hashAggregateNode,
List<Integer> aggrColumnIdxs) {
final AggregatePlanNode partialAggr = setAggregatePlanNode(hashAggregateNode, new PartialAggregatePlanNode());
partialAggr.m_partialGroupByColumns = aggr... | java | public static AggregatePlanNode convertToPartialAggregatePlanNode(HashAggregatePlanNode hashAggregateNode,
List<Integer> aggrColumnIdxs) {
final AggregatePlanNode partialAggr = setAggregatePlanNode(hashAggregateNode, new PartialAggregatePlanNode());
partialAggr.m_partialGroupByColumns = aggr... | [
"public",
"static",
"AggregatePlanNode",
"convertToPartialAggregatePlanNode",
"(",
"HashAggregatePlanNode",
"hashAggregateNode",
",",
"List",
"<",
"Integer",
">",
"aggrColumnIdxs",
")",
"{",
"final",
"AggregatePlanNode",
"partialAggr",
"=",
"setAggregatePlanNode",
"(",
"has... | Convert HashAggregate into a Partial Aggregate
@param hashAggregateNode HashAggregatePlanNode
@param aggrColumnIdxs partial aggregate column indexes
@return AggregatePlanNode | [
"Convert",
"HashAggregate",
"into",
"a",
"Partial",
"Aggregate"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AggregatePlanNode.java#L603-L608 |
61,617 | VoltDB/voltdb | src/frontend/org/voltdb/exceptions/SQLException.java | SQLException.getSQLState | public String getSQLState()
{
String state = null;
try {
state = new String(m_sqlState, "UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
return state;
} | java | public String getSQLState()
{
String state = null;
try {
state = new String(m_sqlState, "UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
return state;
} | [
"public",
"String",
"getSQLState",
"(",
")",
"{",
"String",
"state",
"=",
"null",
";",
"try",
"{",
"state",
"=",
"new",
"String",
"(",
"m_sqlState",
",",
"\"UTF-8\"",
")",
";",
"}",
"catch",
"(",
"UnsupportedEncodingException",
"e",
")",
"{",
"throw",
"n... | Retrieve the SQLState code for the error that generated this exception.
@return Five character SQLState code. | [
"Retrieve",
"the",
"SQLState",
"code",
"for",
"the",
"error",
"that",
"generated",
"this",
"exception",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exceptions/SQLException.java#L66-L75 |
61,618 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/CheckUpgradePlanNT.java | CheckUpgradePlanNT.aggregatePerHostResults | private static String[] aggregatePerHostResults(VoltTable vtable) {
String[] ret = new String[2];
vtable.advanceRow();
String kitCheckResult = vtable.getString("KIT_CHECK_RESULT");
String rootCheckResult = vtable.getString("ROOT_CHECK_RESULT");
String xdcrCheckResult = vtable.get... | java | private static String[] aggregatePerHostResults(VoltTable vtable) {
String[] ret = new String[2];
vtable.advanceRow();
String kitCheckResult = vtable.getString("KIT_CHECK_RESULT");
String rootCheckResult = vtable.getString("ROOT_CHECK_RESULT");
String xdcrCheckResult = vtable.get... | [
"private",
"static",
"String",
"[",
"]",
"aggregatePerHostResults",
"(",
"VoltTable",
"vtable",
")",
"{",
"String",
"[",
"]",
"ret",
"=",
"new",
"String",
"[",
"2",
"]",
";",
"vtable",
".",
"advanceRow",
"(",
")",
";",
"String",
"kitCheckResult",
"=",
"v... | Be user-friendly, return reasons of all failed checks. | [
"Be",
"user",
"-",
"friendly",
"return",
"reasons",
"of",
"all",
"failed",
"checks",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/CheckUpgradePlanNT.java#L176-L203 |
61,619 | VoltDB/voltdb | src/frontend/org/voltdb/types/TimestampType.java | TimestampType.millisFromJDBCformat | public static long millisFromJDBCformat(String param) {
java.sql.Timestamp sqlTS = java.sql.Timestamp.valueOf(param);
final long fractionalSecondsInNanos = sqlTS.getNanos();
// Fractional milliseconds would get truncated so flag them as an error.
if ((fractionalSecondsInNanos % 1000000) ... | java | public static long millisFromJDBCformat(String param) {
java.sql.Timestamp sqlTS = java.sql.Timestamp.valueOf(param);
final long fractionalSecondsInNanos = sqlTS.getNanos();
// Fractional milliseconds would get truncated so flag them as an error.
if ((fractionalSecondsInNanos % 1000000) ... | [
"public",
"static",
"long",
"millisFromJDBCformat",
"(",
"String",
"param",
")",
"{",
"java",
".",
"sql",
".",
"Timestamp",
"sqlTS",
"=",
"java",
".",
"sql",
".",
"Timestamp",
".",
"valueOf",
"(",
"param",
")",
";",
"final",
"long",
"fractionalSecondsInNanos... | Given a string parseable by the JDBC Timestamp parser, return the fractional component
in milliseconds.
@param param A timstamp in string format that is parseable by JDBC.
@return The fraction of a second portion of this timestamp expressed in milliseconds.
@throws IllegalArgumentException if the timestamp uses higher... | [
"Given",
"a",
"string",
"parseable",
"by",
"the",
"JDBC",
"Timestamp",
"parser",
"return",
"the",
"fractional",
"component",
"in",
"milliseconds",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/TimestampType.java#L78-L86 |
61,620 | VoltDB/voltdb | src/frontend/org/voltdb/types/TimestampType.java | TimestampType.compareTo | @Override
public int compareTo(TimestampType dateval) {
int comp = m_date.compareTo(dateval.m_date);
if (comp == 0) {
return m_usecs - dateval.m_usecs;
}
else {
return comp;
}
} | java | @Override
public int compareTo(TimestampType dateval) {
int comp = m_date.compareTo(dateval.m_date);
if (comp == 0) {
return m_usecs - dateval.m_usecs;
}
else {
return comp;
}
} | [
"@",
"Override",
"public",
"int",
"compareTo",
"(",
"TimestampType",
"dateval",
")",
"{",
"int",
"comp",
"=",
"m_date",
".",
"compareTo",
"(",
"dateval",
".",
"m_date",
")",
";",
"if",
"(",
"comp",
"==",
"0",
")",
"{",
"return",
"m_usecs",
"-",
"dateva... | CompareTo - to mimic Java Date | [
"CompareTo",
"-",
"to",
"mimic",
"Java",
"Date"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/TimestampType.java#L205-L214 |
61,621 | VoltDB/voltdb | src/frontend/org/voltdb/types/TimestampType.java | TimestampType.asExactJavaSqlDate | public java.sql.Date asExactJavaSqlDate() {
if (m_usecs != 0) {
throw new RuntimeException("Can't convert to sql Date from TimestampType with fractional milliseconds");
}
return new java.sql.Date(m_date.getTime());
} | java | public java.sql.Date asExactJavaSqlDate() {
if (m_usecs != 0) {
throw new RuntimeException("Can't convert to sql Date from TimestampType with fractional milliseconds");
}
return new java.sql.Date(m_date.getTime());
} | [
"public",
"java",
".",
"sql",
".",
"Date",
"asExactJavaSqlDate",
"(",
")",
"{",
"if",
"(",
"m_usecs",
"!=",
"0",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"Can't convert to sql Date from TimestampType with fractional milliseconds\"",
")",
";",
"}",
"retur... | Retrieve a properly typed copy of the Java date for a TimeStamp with millisecond granularity.
The returned date is a copy; this object will not be affected by
modifications of the returned instance.
@return specifically typed copy of underlying Date object. | [
"Retrieve",
"a",
"properly",
"typed",
"copy",
"of",
"the",
"Java",
"date",
"for",
"a",
"TimeStamp",
"with",
"millisecond",
"granularity",
".",
"The",
"returned",
"date",
"is",
"a",
"copy",
";",
"this",
"object",
"will",
"not",
"be",
"affected",
"by",
"modi... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/TimestampType.java#L245-L250 |
61,622 | VoltDB/voltdb | src/frontend/org/voltdb/types/TimestampType.java | TimestampType.asJavaTimestamp | public java.sql.Timestamp asJavaTimestamp() {
java.sql.Timestamp result = new java.sql.Timestamp(m_date.getTime());
result.setNanos(result.getNanos() + m_usecs * 1000);
return result;
} | java | public java.sql.Timestamp asJavaTimestamp() {
java.sql.Timestamp result = new java.sql.Timestamp(m_date.getTime());
result.setNanos(result.getNanos() + m_usecs * 1000);
return result;
} | [
"public",
"java",
".",
"sql",
".",
"Timestamp",
"asJavaTimestamp",
"(",
")",
"{",
"java",
".",
"sql",
".",
"Timestamp",
"result",
"=",
"new",
"java",
".",
"sql",
".",
"Timestamp",
"(",
"m_date",
".",
"getTime",
"(",
")",
")",
";",
"result",
".",
"set... | Retrieve a properly typed copy of the Java Timestamp for the VoltDB TimeStamp.
The returned Timestamp is a copy; this object will not be affected by
modifications of the returned instance.
@return reformatted Timestamp expressed internally as 1000s of nanoseconds. | [
"Retrieve",
"a",
"properly",
"typed",
"copy",
"of",
"the",
"Java",
"Timestamp",
"for",
"the",
"VoltDB",
"TimeStamp",
".",
"The",
"returned",
"Timestamp",
"is",
"a",
"copy",
";",
"this",
"object",
"will",
"not",
"be",
"affected",
"by",
"modifications",
"of",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/TimestampType.java#L258-L262 |
61,623 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlDatabaseProperties.java | HsqlDatabaseProperties.load | public boolean load() {
boolean exists;
if (!DatabaseURL.isFileBasedDatabaseType(database.getType())) {
return true;
}
try {
exists = super.load();
} catch (Exception e) {
throw Error.error(ErrorCode.FILE_IO_ERROR,
... | java | public boolean load() {
boolean exists;
if (!DatabaseURL.isFileBasedDatabaseType(database.getType())) {
return true;
}
try {
exists = super.load();
} catch (Exception e) {
throw Error.error(ErrorCode.FILE_IO_ERROR,
... | [
"public",
"boolean",
"load",
"(",
")",
"{",
"boolean",
"exists",
";",
"if",
"(",
"!",
"DatabaseURL",
".",
"isFileBasedDatabaseType",
"(",
"database",
".",
"getType",
"(",
")",
")",
")",
"{",
"return",
"true",
";",
"}",
"try",
"{",
"exists",
"=",
"super... | Creates file with defaults if it didn't exist.
Returns false if file already existed. | [
"Creates",
"file",
"with",
"defaults",
"if",
"it",
"didn",
"t",
"exist",
".",
"Returns",
"false",
"if",
"file",
"already",
"existed",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlDatabaseProperties.java#L444-L485 |
61,624 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlDatabaseProperties.java | HsqlDatabaseProperties.setDatabaseVariables | public void setDatabaseVariables() {
if (isPropertyTrue(db_readonly)) {
database.setReadOnly();
}
if (isPropertyTrue(hsqldb_files_readonly)) {
database.setFilesReadOnly();
}
database.sqlEnforceStrictSize =
isPropertyTrue(sql_enforce_strict_s... | java | public void setDatabaseVariables() {
if (isPropertyTrue(db_readonly)) {
database.setReadOnly();
}
if (isPropertyTrue(hsqldb_files_readonly)) {
database.setFilesReadOnly();
}
database.sqlEnforceStrictSize =
isPropertyTrue(sql_enforce_strict_s... | [
"public",
"void",
"setDatabaseVariables",
"(",
")",
"{",
"if",
"(",
"isPropertyTrue",
"(",
"db_readonly",
")",
")",
"{",
"database",
".",
"setReadOnly",
"(",
")",
";",
"}",
"if",
"(",
"isPropertyTrue",
"(",
"hsqldb_files_readonly",
")",
")",
"{",
"database",... | Sets the database member variables after creating the properties object,
openning a properties file, or changing a property with a command | [
"Sets",
"the",
"database",
"member",
"variables",
"after",
"creating",
"the",
"properties",
"object",
"openning",
"a",
"properties",
"file",
"or",
"changing",
"a",
"property",
"with",
"a",
"command"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlDatabaseProperties.java#L491-L510 |
61,625 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlDatabaseProperties.java | HsqlDatabaseProperties.setURLProperties | public void setURLProperties(HsqlProperties p) {
if (p != null) {
for (Enumeration e = p.propertyNames(); e.hasMoreElements(); ) {
String propertyName = (String) e.nextElement();
Object[] row = (Object[]) meta.get(propertyName);
if (row !=... | java | public void setURLProperties(HsqlProperties p) {
if (p != null) {
for (Enumeration e = p.propertyNames(); e.hasMoreElements(); ) {
String propertyName = (String) e.nextElement();
Object[] row = (Object[]) meta.get(propertyName);
if (row !=... | [
"public",
"void",
"setURLProperties",
"(",
"HsqlProperties",
"p",
")",
"{",
"if",
"(",
"p",
"!=",
"null",
")",
"{",
"for",
"(",
"Enumeration",
"e",
"=",
"p",
".",
"propertyNames",
"(",
")",
";",
"e",
".",
"hasMoreElements",
"(",
")",
";",
")",
"{",
... | overload file database properties with any passed on URL line
do not store password etc | [
"overload",
"file",
"database",
"properties",
"with",
"any",
"passed",
"on",
"URL",
"line",
"do",
"not",
"store",
"password",
"etc"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlDatabaseProperties.java#L551-L568 |
61,626 | VoltDB/voltdb | src/frontend/org/voltdb/RateLimitedClientNotifier.java | RateLimitedClientNotifier.runSubmissions | private void runSubmissions(boolean block) throws InterruptedException {
if (block) {
Runnable r = m_submissionQueue.take();
do {
r.run();
} while ((r = m_submissionQueue.poll()) != null);
} else {
Runnable r = null;
while ((r =... | java | private void runSubmissions(boolean block) throws InterruptedException {
if (block) {
Runnable r = m_submissionQueue.take();
do {
r.run();
} while ((r = m_submissionQueue.poll()) != null);
} else {
Runnable r = null;
while ((r =... | [
"private",
"void",
"runSubmissions",
"(",
"boolean",
"block",
")",
"throws",
"InterruptedException",
"{",
"if",
"(",
"block",
")",
"{",
"Runnable",
"r",
"=",
"m_submissionQueue",
".",
"take",
"(",
")",
";",
"do",
"{",
"r",
".",
"run",
"(",
")",
";",
"}... | if there is no other work to do | [
"if",
"there",
"is",
"no",
"other",
"work",
"to",
"do"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RateLimitedClientNotifier.java#L178-L190 |
61,627 | VoltDB/voltdb | src/frontend/org/voltdb/RateLimitedClientNotifier.java | RateLimitedClientNotifier.queueNotification | public void queueNotification(
final Collection<ClientInterfaceHandleManager> connections,
final Supplier<DeferredSerialization> notification,
final Predicate<ClientInterfaceHandleManager> wantsNotificationPredicate) {
m_submissionQueue.offer(new Runnable() {
@Ove... | java | public void queueNotification(
final Collection<ClientInterfaceHandleManager> connections,
final Supplier<DeferredSerialization> notification,
final Predicate<ClientInterfaceHandleManager> wantsNotificationPredicate) {
m_submissionQueue.offer(new Runnable() {
@Ove... | [
"public",
"void",
"queueNotification",
"(",
"final",
"Collection",
"<",
"ClientInterfaceHandleManager",
">",
"connections",
",",
"final",
"Supplier",
"<",
"DeferredSerialization",
">",
"notification",
",",
"final",
"Predicate",
"<",
"ClientInterfaceHandleManager",
">",
... | The collection will be filtered to exclude non VoltPort connections | [
"The",
"collection",
"will",
"be",
"filtered",
"to",
"exclude",
"non",
"VoltPort",
"connections"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RateLimitedClientNotifier.java#L199-L256 |
61,628 | VoltDB/voltdb | src/frontend/org/voltdb/client/exampleutils/PerfCounterMap.java | PerfCounterMap.get | public PerfCounter get(String counter)
{
// Admited: could get a little race condition at the very beginning, but all that'll happen is that we'll lose a handful of tracking event, a loss far outweighed by overall reduced contention.
if (!this.Counters.containsKey(counter))
this.Counters... | java | public PerfCounter get(String counter)
{
// Admited: could get a little race condition at the very beginning, but all that'll happen is that we'll lose a handful of tracking event, a loss far outweighed by overall reduced contention.
if (!this.Counters.containsKey(counter))
this.Counters... | [
"public",
"PerfCounter",
"get",
"(",
"String",
"counter",
")",
"{",
"// Admited: could get a little race condition at the very beginning, but all that'll happen is that we'll lose a handful of tracking event, a loss far outweighed by overall reduced contention.",
"if",
"(",
"!",
"this",
".... | Gets a performance counter.
@param counter the name of the counter to retrieve (typically the procedure name). A new counter is created on the fly if none previously existed in the map. | [
"Gets",
"a",
"performance",
"counter",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/exampleutils/PerfCounterMap.java#L39-L45 |
61,629 | VoltDB/voltdb | src/frontend/org/voltdb/client/exampleutils/PerfCounterMap.java | PerfCounterMap.update | public void update(String counter, long executionDuration, boolean success)
{
this.get(counter).update(executionDuration, success);
} | java | public void update(String counter, long executionDuration, boolean success)
{
this.get(counter).update(executionDuration, success);
} | [
"public",
"void",
"update",
"(",
"String",
"counter",
",",
"long",
"executionDuration",
",",
"boolean",
"success",
")",
"{",
"this",
".",
"get",
"(",
"counter",
")",
".",
"update",
"(",
"executionDuration",
",",
"success",
")",
";",
"}"
] | Tracks a generic call execution by reporting the execution duration. This method should be used for successful calls only.
@param counter the name of the counter to update.
@param executionDuration the duration of the execution call to track in this counter.
@param success the flag indicating whether the execution ca... | [
"Tracks",
"a",
"generic",
"call",
"execution",
"by",
"reporting",
"the",
"execution",
"duration",
".",
"This",
"method",
"should",
"be",
"used",
"for",
"successful",
"calls",
"only",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/exampleutils/PerfCounterMap.java#L77-L80 |
61,630 | VoltDB/voltdb | src/frontend/org/voltdb/client/exampleutils/PerfCounterMap.java | PerfCounterMap.toRawString | public String toRawString(char delimiter)
{
StringBuilder result = new StringBuilder();
for (Entry<String, PerfCounter> e : Counters.entrySet()) {
result.append(e.getKey())
.append(delimiter)
.append(e.getValue().toRawString(delimiter))
... | java | public String toRawString(char delimiter)
{
StringBuilder result = new StringBuilder();
for (Entry<String, PerfCounter> e : Counters.entrySet()) {
result.append(e.getKey())
.append(delimiter)
.append(e.getValue().toRawString(delimiter))
... | [
"public",
"String",
"toRawString",
"(",
"char",
"delimiter",
")",
"{",
"StringBuilder",
"result",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"Entry",
"<",
"String",
",",
"PerfCounter",
">",
"e",
":",
"Counters",
".",
"entrySet",
"(",
")",
")... | Gets the statistics as delimiter separated strings. Each line contains
statistics for a single procedure. There might be multiple lines.
@param delimiter Delimiter, e.g. ',' or '\t'
@return | [
"Gets",
"the",
"statistics",
"as",
"delimiter",
"separated",
"strings",
".",
"Each",
"line",
"contains",
"statistics",
"for",
"a",
"single",
"procedure",
".",
"There",
"might",
"be",
"multiple",
"lines",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/exampleutils/PerfCounterMap.java#L122-L132 |
61,631 | VoltDB/voltdb | src/frontend/org/voltdb/SnapshotDaemon.java | SnapshotDaemon.leaderElection | private void leaderElection() {
loggingLog.info("Starting leader election for snapshot truncation daemon");
try {
while (true) {
Stat stat = m_zk.exists(VoltZK.snapshot_truncation_master, new Watcher() {
@Override
public void process(Wa... | java | private void leaderElection() {
loggingLog.info("Starting leader election for snapshot truncation daemon");
try {
while (true) {
Stat stat = m_zk.exists(VoltZK.snapshot_truncation_master, new Watcher() {
@Override
public void process(Wa... | [
"private",
"void",
"leaderElection",
"(",
")",
"{",
"loggingLog",
".",
"info",
"(",
"\"Starting leader election for snapshot truncation daemon\"",
")",
";",
"try",
"{",
"while",
"(",
"true",
")",
"{",
"Stat",
"stat",
"=",
"m_zk",
".",
"exists",
"(",
"VoltZK",
... | Leader election for snapshots.
Leader will watch for truncation and user snapshot requests | [
"Leader",
"election",
"for",
"snapshots",
".",
"Leader",
"will",
"watch",
"for",
"truncation",
"and",
"user",
"snapshot",
"requests"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SnapshotDaemon.java#L545-L586 |
61,632 | VoltDB/voltdb | src/frontend/org/voltdb/SnapshotDaemon.java | SnapshotDaemon.mayGoActiveOrInactive | public ListenableFuture<Void> mayGoActiveOrInactive(final SnapshotSchedule schedule)
{
return m_es.submit(new Callable<Void>() {
@Override
public Void call() throws Exception {
makeActivePrivate(schedule);
return null;
}
});
} | java | public ListenableFuture<Void> mayGoActiveOrInactive(final SnapshotSchedule schedule)
{
return m_es.submit(new Callable<Void>() {
@Override
public Void call() throws Exception {
makeActivePrivate(schedule);
return null;
}
});
} | [
"public",
"ListenableFuture",
"<",
"Void",
">",
"mayGoActiveOrInactive",
"(",
"final",
"SnapshotSchedule",
"schedule",
")",
"{",
"return",
"m_es",
".",
"submit",
"(",
"new",
"Callable",
"<",
"Void",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Void",
"cal... | Make this SnapshotDaemon responsible for generating snapshots | [
"Make",
"this",
"SnapshotDaemon",
"responsible",
"for",
"generating",
"snapshots"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SnapshotDaemon.java#L1197-L1206 |
61,633 | VoltDB/voltdb | src/frontend/org/voltdb/SnapshotDaemon.java | SnapshotDaemon.doPeriodicWork | private void doPeriodicWork(final long now) {
if (m_lastKnownSchedule == null)
{
setState(State.STARTUP);
return;
}
if (m_frequencyUnit == null) {
return;
}
if (m_state == State.STARTUP) {
initiateSnapshotScan();
}... | java | private void doPeriodicWork(final long now) {
if (m_lastKnownSchedule == null)
{
setState(State.STARTUP);
return;
}
if (m_frequencyUnit == null) {
return;
}
if (m_state == State.STARTUP) {
initiateSnapshotScan();
}... | [
"private",
"void",
"doPeriodicWork",
"(",
"final",
"long",
"now",
")",
"{",
"if",
"(",
"m_lastKnownSchedule",
"==",
"null",
")",
"{",
"setState",
"(",
"State",
".",
"STARTUP",
")",
";",
"return",
";",
"}",
"if",
"(",
"m_frequencyUnit",
"==",
"null",
")",... | Invoked by the client interface occasionally. Returns null
if nothing needs to be done or the name of a sysproc along with procedure parameters
if there is work to be done. Responses come back later via invocations
of processClientResponse
@param now Current time
@return null if there is no work to do or a sysproc with... | [
"Invoked",
"by",
"the",
"client",
"interface",
"occasionally",
".",
"Returns",
"null",
"if",
"nothing",
"needs",
"to",
"be",
"done",
"or",
"the",
"name",
"of",
"a",
"sysproc",
"along",
"with",
"procedure",
"parameters",
"if",
"there",
"is",
"work",
"to",
"... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SnapshotDaemon.java#L1303-L1326 |
61,634 | VoltDB/voltdb | src/frontend/org/voltdb/SnapshotDaemon.java | SnapshotDaemon.processWaitingPeriodicWork | private void processWaitingPeriodicWork(long now) {
if (now - m_lastSysprocInvocation < m_minTimeBetweenSysprocs) {
return;
}
if (m_snapshots.size() > m_retain) {
//Quick hack to make sure we don't delete while the snapshot is running.
//Deletes work really b... | java | private void processWaitingPeriodicWork(long now) {
if (now - m_lastSysprocInvocation < m_minTimeBetweenSysprocs) {
return;
}
if (m_snapshots.size() > m_retain) {
//Quick hack to make sure we don't delete while the snapshot is running.
//Deletes work really b... | [
"private",
"void",
"processWaitingPeriodicWork",
"(",
"long",
"now",
")",
"{",
"if",
"(",
"now",
"-",
"m_lastSysprocInvocation",
"<",
"m_minTimeBetweenSysprocs",
")",
"{",
"return",
";",
"}",
"if",
"(",
"m_snapshots",
".",
"size",
"(",
")",
">",
"m_retain",
... | Do periodic work when the daemon is in the waiting state. The
daemon paces out sysproc invocations over time
to avoid disrupting regular work. If the time for the next
snapshot has passed it attempts to initiate a new snapshot.
If there are too many snapshots being retains it attempts to delete
the extras. Then it atte... | [
"Do",
"periodic",
"work",
"when",
"the",
"daemon",
"is",
"in",
"the",
"waiting",
"state",
".",
"The",
"daemon",
"paces",
"out",
"sysproc",
"invocations",
"over",
"time",
"to",
"avoid",
"disrupting",
"regular",
"work",
".",
"If",
"the",
"time",
"for",
"the"... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SnapshotDaemon.java#L1337-L1357 |
61,635 | VoltDB/voltdb | src/frontend/org/voltdb/SnapshotDaemon.java | SnapshotDaemon.processClientResponse | public Future<Void> processClientResponse(final Callable<ClientResponseImpl> response) {
return m_es.submit(new Callable<Void>() {
@Override
public Void call() throws Exception {
try {
ClientResponseImpl resp = response.call();
long... | java | public Future<Void> processClientResponse(final Callable<ClientResponseImpl> response) {
return m_es.submit(new Callable<Void>() {
@Override
public Void call() throws Exception {
try {
ClientResponseImpl resp = response.call();
long... | [
"public",
"Future",
"<",
"Void",
">",
"processClientResponse",
"(",
"final",
"Callable",
"<",
"ClientResponseImpl",
">",
"response",
")",
"{",
"return",
"m_es",
".",
"submit",
"(",
"new",
"Callable",
"<",
"Void",
">",
"(",
")",
"{",
"@",
"Override",
"publi... | Process responses to sysproc invocations generated by this daemon
via processPeriodicWork
@param response
@return | [
"Process",
"responses",
"to",
"sysproc",
"invocations",
"generated",
"by",
"this",
"daemon",
"via",
"processPeriodicWork"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SnapshotDaemon.java#L1424-L1442 |
61,636 | VoltDB/voltdb | src/frontend/org/voltdb/SnapshotDaemon.java | SnapshotDaemon.processSnapshotResponse | private void processSnapshotResponse(ClientResponse response) {
setState(State.WAITING);
final long now = System.currentTimeMillis();
m_nextSnapshotTime += m_frequencyInMillis;
if (m_nextSnapshotTime < now) {
m_nextSnapshotTime = now - 1;
}
if (response.getSt... | java | private void processSnapshotResponse(ClientResponse response) {
setState(State.WAITING);
final long now = System.currentTimeMillis();
m_nextSnapshotTime += m_frequencyInMillis;
if (m_nextSnapshotTime < now) {
m_nextSnapshotTime = now - 1;
}
if (response.getSt... | [
"private",
"void",
"processSnapshotResponse",
"(",
"ClientResponse",
"response",
")",
"{",
"setState",
"(",
"State",
".",
"WAITING",
")",
";",
"final",
"long",
"now",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"m_nextSnapshotTime",
"+=",
"m_frequenc... | Confirm and log that the snapshot was a success
@param response | [
"Confirm",
"and",
"log",
"that",
"the",
"snapshot",
"was",
"a",
"success"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SnapshotDaemon.java#L1466-L1502 |
61,637 | VoltDB/voltdb | src/frontend/org/voltdb/SnapshotDaemon.java | SnapshotDaemon.processDeleteResponse | private void processDeleteResponse(ClientResponse response) {
//Continue snapshotting even if a delete fails.
setState(State.WAITING);
if (response.getStatus() != ClientResponse.SUCCESS){
logFailureResponse("Delete of snapshots failed", response);
return;
}
... | java | private void processDeleteResponse(ClientResponse response) {
//Continue snapshotting even if a delete fails.
setState(State.WAITING);
if (response.getStatus() != ClientResponse.SUCCESS){
logFailureResponse("Delete of snapshots failed", response);
return;
}
... | [
"private",
"void",
"processDeleteResponse",
"(",
"ClientResponse",
"response",
")",
"{",
"//Continue snapshotting even if a delete fails.",
"setState",
"(",
"State",
".",
"WAITING",
")",
";",
"if",
"(",
"response",
".",
"getStatus",
"(",
")",
"!=",
"ClientResponse",
... | Process a response to a request to delete snapshots.
Always transitions to the waiting state even if the delete
fails. This ensures the system will continue to snapshot
until the disk is full in the event that there is an administration
error or a bug.
@param response | [
"Process",
"a",
"response",
"to",
"a",
"request",
"to",
"delete",
"snapshots",
".",
"Always",
"transitions",
"to",
"the",
"waiting",
"state",
"even",
"if",
"the",
"delete",
"fails",
".",
"This",
"ensures",
"the",
"system",
"will",
"continue",
"to",
"snapshot... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SnapshotDaemon.java#L1512-L1526 |
61,638 | VoltDB/voltdb | src/frontend/org/voltdb/SnapshotDaemon.java | SnapshotDaemon.processScanResponse | private void processScanResponse(ClientResponse response) {
setState(State.WAITING);
if (response.getStatus() != ClientResponse.SUCCESS) {
logFailureResponse("Initial snapshot scan failed", response);
return;
}
final VoltTable results[] = response.getResults();
... | java | private void processScanResponse(ClientResponse response) {
setState(State.WAITING);
if (response.getStatus() != ClientResponse.SUCCESS) {
logFailureResponse("Initial snapshot scan failed", response);
return;
}
final VoltTable results[] = response.getResults();
... | [
"private",
"void",
"processScanResponse",
"(",
"ClientResponse",
"response",
")",
"{",
"setState",
"(",
"State",
".",
"WAITING",
")",
";",
"if",
"(",
"response",
".",
"getStatus",
"(",
")",
"!=",
"ClientResponse",
".",
"SUCCESS",
")",
"{",
"logFailureResponse"... | Process the response to a snapshot scan. Find the snapshots
that are managed by this daemon by path and nonce
and add it the list. Initiate a delete of any that should
not be retained
@param response
@return | [
"Process",
"the",
"response",
"to",
"a",
"snapshot",
"scan",
".",
"Find",
"the",
"snapshots",
"that",
"are",
"managed",
"by",
"this",
"daemon",
"by",
"path",
"and",
"nonce",
"and",
"add",
"it",
"the",
"list",
".",
"Initiate",
"a",
"delete",
"of",
"any",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SnapshotDaemon.java#L1536-L1574 |
61,639 | VoltDB/voltdb | src/frontend/org/voltdb/SnapshotDaemon.java | SnapshotDaemon.deleteExtraSnapshots | private void deleteExtraSnapshots() {
if (m_snapshots.size() <= m_retain) {
setState(State.WAITING);
} else {
m_lastSysprocInvocation = System.currentTimeMillis();
setState(State.DELETING);
final int numberToDelete = m_snapshots.size() - m_retain;
... | java | private void deleteExtraSnapshots() {
if (m_snapshots.size() <= m_retain) {
setState(State.WAITING);
} else {
m_lastSysprocInvocation = System.currentTimeMillis();
setState(State.DELETING);
final int numberToDelete = m_snapshots.size() - m_retain;
... | [
"private",
"void",
"deleteExtraSnapshots",
"(",
")",
"{",
"if",
"(",
"m_snapshots",
".",
"size",
"(",
")",
"<=",
"m_retain",
")",
"{",
"setState",
"(",
"State",
".",
"WAITING",
")",
";",
"}",
"else",
"{",
"m_lastSysprocInvocation",
"=",
"System",
".",
"c... | Check if there are extra snapshots and initiate deletion
@return | [
"Check",
"if",
"there",
"are",
"extra",
"snapshots",
"and",
"initiate",
"deletion"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SnapshotDaemon.java#L1580-L1613 |
61,640 | VoltDB/voltdb | src/frontend/org/voltdb/SnapshotDaemon.java | SnapshotDaemon.createAndWatchRequestNode | public void createAndWatchRequestNode(final long clientHandle,
final Connection c,
SnapshotInitiationInfo snapInfo,
boolean notifyChanges) throws ForwardClientException {
boolean request... | java | public void createAndWatchRequestNode(final long clientHandle,
final Connection c,
SnapshotInitiationInfo snapInfo,
boolean notifyChanges) throws ForwardClientException {
boolean request... | [
"public",
"void",
"createAndWatchRequestNode",
"(",
"final",
"long",
"clientHandle",
",",
"final",
"Connection",
"c",
",",
"SnapshotInitiationInfo",
"snapInfo",
",",
"boolean",
"notifyChanges",
")",
"throws",
"ForwardClientException",
"{",
"boolean",
"requestExists",
"=... | Try to create the ZK request node and watch it if created successfully. | [
"Try",
"to",
"create",
"the",
"ZK",
"request",
"node",
"and",
"watch",
"it",
"if",
"created",
"successfully",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SnapshotDaemon.java#L1704-L1750 |
61,641 | VoltDB/voltdb | src/frontend/org/voltdb/SnapshotDaemon.java | SnapshotDaemon.createRequestNode | private String createRequestNode(SnapshotInitiationInfo snapInfo)
{
String requestId = null;
try {
requestId = java.util.UUID.randomUUID().toString();
if (!snapInfo.isTruncationRequest()) {
final JSONObject jsObj = snapInfo.getJSONObjectForZK();
... | java | private String createRequestNode(SnapshotInitiationInfo snapInfo)
{
String requestId = null;
try {
requestId = java.util.UUID.randomUUID().toString();
if (!snapInfo.isTruncationRequest()) {
final JSONObject jsObj = snapInfo.getJSONObjectForZK();
... | [
"private",
"String",
"createRequestNode",
"(",
"SnapshotInitiationInfo",
"snapInfo",
")",
"{",
"String",
"requestId",
"=",
"null",
";",
"try",
"{",
"requestId",
"=",
"java",
".",
"util",
".",
"UUID",
".",
"randomUUID",
"(",
")",
".",
"toString",
"(",
")",
... | Try to create the ZK node to request the snapshot.
@param snapInfo SnapshotInitiationInfo object with the requested snapshot initiation settings
@return The request ID if succeeded, otherwise null. | [
"Try",
"to",
"create",
"the",
"ZK",
"node",
"to",
"request",
"the",
"snapshot",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SnapshotDaemon.java#L1758-L1783 |
61,642 | VoltDB/voltdb | src/frontend/org/voltdb/messaging/FastDeserializer.java | FastDeserializer.deserialize | public final static <T extends FastSerializable> T deserialize(
final byte[] data, final Class<T> expectedType) throws IOException {
final FastDeserializer in = new FastDeserializer(data);
return in.readObject(expectedType);
} | java | public final static <T extends FastSerializable> T deserialize(
final byte[] data, final Class<T> expectedType) throws IOException {
final FastDeserializer in = new FastDeserializer(data);
return in.readObject(expectedType);
} | [
"public",
"final",
"static",
"<",
"T",
"extends",
"FastSerializable",
">",
"T",
"deserialize",
"(",
"final",
"byte",
"[",
"]",
"data",
",",
"final",
"Class",
"<",
"T",
">",
"expectedType",
")",
"throws",
"IOException",
"{",
"final",
"FastDeserializer",
"in",... | Read an object from its byte array representation. This is a shortcut
utility method useful when only a single object needs to be deserialized.
@return The byte array representation for <code>object</code>. | [
"Read",
"an",
"object",
"from",
"its",
"byte",
"array",
"representation",
".",
"This",
"is",
"a",
"shortcut",
"utility",
"method",
"useful",
"when",
"only",
"a",
"single",
"object",
"needs",
"to",
"be",
"deserialized",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/messaging/FastDeserializer.java#L94-L98 |
61,643 | VoltDB/voltdb | src/frontend/org/voltdb/messaging/FastDeserializer.java | FastDeserializer.readObject | public <T extends FastSerializable> T readObject(final Class<T> expectedType) throws IOException {
assert(expectedType != null);
T obj = null;
try {
obj = expectedType.newInstance();
obj.readExternal(this);
} catch (final InstantiationException e) {
e.... | java | public <T extends FastSerializable> T readObject(final Class<T> expectedType) throws IOException {
assert(expectedType != null);
T obj = null;
try {
obj = expectedType.newInstance();
obj.readExternal(this);
} catch (final InstantiationException e) {
e.... | [
"public",
"<",
"T",
"extends",
"FastSerializable",
">",
"T",
"readObject",
"(",
"final",
"Class",
"<",
"T",
">",
"expectedType",
")",
"throws",
"IOException",
"{",
"assert",
"(",
"expectedType",
"!=",
"null",
")",
";",
"T",
"obj",
"=",
"null",
";",
"try"... | Read an object from a a byte array stream assuming you know the expected type.
@param expectedType The class of the type to be deserialized.
@return A derserialized object.
@throws IOException Rethrows any IOExceptions thrown. | [
"Read",
"an",
"object",
"from",
"a",
"a",
"byte",
"array",
"stream",
"assuming",
"you",
"know",
"the",
"expected",
"type",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/messaging/FastDeserializer.java#L107-L119 |
61,644 | VoltDB/voltdb | src/frontend/org/voltdb/messaging/FastDeserializer.java | FastDeserializer.readObject | public FastSerializable readObject(final FastSerializable obj, final DeserializationMonitor monitor) throws IOException {
final int startPosition = buffer.position();
obj.readExternal(this);
final int endPosition = buffer.position();
if (monitor != null) {
monitor.deserialize... | java | public FastSerializable readObject(final FastSerializable obj, final DeserializationMonitor monitor) throws IOException {
final int startPosition = buffer.position();
obj.readExternal(this);
final int endPosition = buffer.position();
if (monitor != null) {
monitor.deserialize... | [
"public",
"FastSerializable",
"readObject",
"(",
"final",
"FastSerializable",
"obj",
",",
"final",
"DeserializationMonitor",
"monitor",
")",
"throws",
"IOException",
"{",
"final",
"int",
"startPosition",
"=",
"buffer",
".",
"position",
"(",
")",
";",
"obj",
".",
... | Read an object from a a byte array stream into th provied instance. Takes in a
deserialization monitor which is notified of how many bytes were deserialized.
@param obj Instance of the class of the type to be deserialized.
@param monitor Monitor that will be notified of how many bytes are deserialized
@return A deseri... | [
"Read",
"an",
"object",
"from",
"a",
"a",
"byte",
"array",
"stream",
"into",
"th",
"provied",
"instance",
".",
"Takes",
"in",
"a",
"deserialization",
"monitor",
"which",
"is",
"notified",
"of",
"how",
"many",
"bytes",
"were",
"deserialized",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/messaging/FastDeserializer.java#L130-L138 |
61,645 | VoltDB/voltdb | src/frontend/org/voltdb/messaging/FastDeserializer.java | FastDeserializer.readString | public static String readString(ByteBuffer buffer) throws IOException {
final int NULL_STRING_INDICATOR = -1;
final int len = buffer.getInt();
// check for null string
if (len == NULL_STRING_INDICATOR)
return null;
assert len >= 0;
if (len > VoltType.MAX_VA... | java | public static String readString(ByteBuffer buffer) throws IOException {
final int NULL_STRING_INDICATOR = -1;
final int len = buffer.getInt();
// check for null string
if (len == NULL_STRING_INDICATOR)
return null;
assert len >= 0;
if (len > VoltType.MAX_VA... | [
"public",
"static",
"String",
"readString",
"(",
"ByteBuffer",
"buffer",
")",
"throws",
"IOException",
"{",
"final",
"int",
"NULL_STRING_INDICATOR",
"=",
"-",
"1",
";",
"final",
"int",
"len",
"=",
"buffer",
".",
"getInt",
"(",
")",
";",
"// check for null stri... | Read a string in the standard VoltDB way without
wrapping the byte buffer[ | [
"Read",
"a",
"string",
"in",
"the",
"standard",
"VoltDB",
"way",
"without",
"wrapping",
"the",
"byte",
"buffer",
"["
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/messaging/FastDeserializer.java#L144-L172 |
61,646 | VoltDB/voltdb | src/frontend/org/voltdb/messaging/FastDeserializer.java | FastDeserializer.readString | public String readString() throws IOException {
final int len = readInt();
// check for null string
if (len == VoltType.NULL_STRING_LENGTH) {
return null;
}
if (len < VoltType.NULL_STRING_LENGTH) {
throw new IOException("String length is negative " + len... | java | public String readString() throws IOException {
final int len = readInt();
// check for null string
if (len == VoltType.NULL_STRING_LENGTH) {
return null;
}
if (len < VoltType.NULL_STRING_LENGTH) {
throw new IOException("String length is negative " + len... | [
"public",
"String",
"readString",
"(",
")",
"throws",
"IOException",
"{",
"final",
"int",
"len",
"=",
"readInt",
"(",
")",
";",
"// check for null string",
"if",
"(",
"len",
"==",
"VoltType",
".",
"NULL_STRING_LENGTH",
")",
"{",
"return",
"null",
";",
"}",
... | Read a string in the standard VoltDB way. That is, four
bytes of length info followed by the bytes of characters
encoded in UTF-8.
@return The String value read from the stream.
@throws IOException Rethrows any IOExceptions. | [
"Read",
"a",
"string",
"in",
"the",
"standard",
"VoltDB",
"way",
".",
"That",
"is",
"four",
"bytes",
"of",
"length",
"info",
"followed",
"by",
"the",
"bytes",
"of",
"characters",
"encoded",
"in",
"UTF",
"-",
"8",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/messaging/FastDeserializer.java#L182-L201 |
61,647 | VoltDB/voltdb | src/frontend/org/voltdb/messaging/FastDeserializer.java | FastDeserializer.readBuffer | public ByteBuffer readBuffer(final int byteLen) {
final byte[] data = new byte[byteLen];
buffer.get(data);
return ByteBuffer.wrap(data);
} | java | public ByteBuffer readBuffer(final int byteLen) {
final byte[] data = new byte[byteLen];
buffer.get(data);
return ByteBuffer.wrap(data);
} | [
"public",
"ByteBuffer",
"readBuffer",
"(",
"final",
"int",
"byteLen",
")",
"{",
"final",
"byte",
"[",
"]",
"data",
"=",
"new",
"byte",
"[",
"byteLen",
"]",
";",
"buffer",
".",
"get",
"(",
"data",
")",
";",
"return",
"ByteBuffer",
".",
"wrap",
"(",
"d... | Create a copy of the first byteLen bytes of the underlying buffer.
@param byteLen Number of bytes to copy
@return ByteBuffer wrapping the copied data | [
"Create",
"a",
"copy",
"of",
"the",
"first",
"byteLen",
"bytes",
"of",
"the",
"underlying",
"buffer",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/messaging/FastDeserializer.java#L352-L356 |
61,648 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/statements/DropFunction.java | DropFunction.removeUDFInSchema | private boolean removeUDFInSchema(String functionName) {
for (int idx = 0; idx < m_schema.children.size(); idx++) {
VoltXMLElement func = m_schema.children.get(idx);
if ("ud_function".equals(func.name)) {
String fnm = func.attributes.get("name");
if (fnm !... | java | private boolean removeUDFInSchema(String functionName) {
for (int idx = 0; idx < m_schema.children.size(); idx++) {
VoltXMLElement func = m_schema.children.get(idx);
if ("ud_function".equals(func.name)) {
String fnm = func.attributes.get("name");
if (fnm !... | [
"private",
"boolean",
"removeUDFInSchema",
"(",
"String",
"functionName",
")",
"{",
"for",
"(",
"int",
"idx",
"=",
"0",
";",
"idx",
"<",
"m_schema",
".",
"children",
".",
"size",
"(",
")",
";",
"idx",
"++",
")",
"{",
"VoltXMLElement",
"func",
"=",
"m_s... | Remove the function with the given name from the VoltXMLElement schema
if it is there already.
@param functionName
@return Return true iff the function is removed.
Return false if the function does not exist in the schema. | [
"Remove",
"the",
"function",
"with",
"the",
"given",
"name",
"from",
"the",
"VoltXMLElement",
"schema",
"if",
"it",
"is",
"there",
"already",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/statements/DropFunction.java#L51-L66 |
61,649 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/VoltXMLElement.java | VoltXMLElement.toXML | public String toXML() {
StringBuilder sb = new StringBuilder();
sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
toXML(sb, 0);
return sb.toString();
} | java | public String toXML() {
StringBuilder sb = new StringBuilder();
sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
toXML(sb, 0);
return sb.toString();
} | [
"public",
"String",
"toXML",
"(",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"sb",
".",
"append",
"(",
"\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" ?>\\n\"",
")",
";",
"toXML",
"(",
"sb",
",",
"0",
")",
";",
"return",
... | Convert VoltXML to more conventional XML.
@return The XML. | [
"Convert",
"VoltXML",
"to",
"more",
"conventional",
"XML",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/VoltXMLElement.java#L97-L102 |
61,650 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/VoltXMLElement.java | VoltXMLElement.findChildrenRecursively | public List<VoltXMLElement> findChildrenRecursively(String name)
{
List<VoltXMLElement> retval = new ArrayList<>();
for (VoltXMLElement vxe : children) {
if (name.equals(vxe.name)) {
retval.add(vxe);
}
retval.addAll(vxe.findChildrenRecursively(name... | java | public List<VoltXMLElement> findChildrenRecursively(String name)
{
List<VoltXMLElement> retval = new ArrayList<>();
for (VoltXMLElement vxe : children) {
if (name.equals(vxe.name)) {
retval.add(vxe);
}
retval.addAll(vxe.findChildrenRecursively(name... | [
"public",
"List",
"<",
"VoltXMLElement",
">",
"findChildrenRecursively",
"(",
"String",
"name",
")",
"{",
"List",
"<",
"VoltXMLElement",
">",
"retval",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"VoltXMLElement",
"vxe",
":",
"children",
")",
... | Given a name, recursively find all the children with matching name, if any. | [
"Given",
"a",
"name",
"recursively",
"find",
"all",
"the",
"children",
"with",
"matching",
"name",
"if",
"any",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/VoltXMLElement.java#L184-L194 |
61,651 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/VoltXMLElement.java | VoltXMLElement.findChildren | public List<VoltXMLElement> findChildren(String name)
{
List<VoltXMLElement> retval = new ArrayList<>();
for (VoltXMLElement vxe : children) {
if (name.equals(vxe.name)) {
retval.add(vxe);
}
}
return retval;
} | java | public List<VoltXMLElement> findChildren(String name)
{
List<VoltXMLElement> retval = new ArrayList<>();
for (VoltXMLElement vxe : children) {
if (name.equals(vxe.name)) {
retval.add(vxe);
}
}
return retval;
} | [
"public",
"List",
"<",
"VoltXMLElement",
">",
"findChildren",
"(",
"String",
"name",
")",
"{",
"List",
"<",
"VoltXMLElement",
">",
"retval",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"VoltXMLElement",
"vxe",
":",
"children",
")",
"{",
"if... | Given a name, find all the immediate children with matching name, if any. | [
"Given",
"a",
"name",
"find",
"all",
"the",
"immediate",
"children",
"with",
"matching",
"name",
"if",
"any",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/VoltXMLElement.java#L199-L208 |
61,652 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/VoltXMLElement.java | VoltXMLElement.findChild | public VoltXMLElement findChild(String uniqueName)
{
for (VoltXMLElement vxe : children) {
if (uniqueName.equals(vxe.getUniqueName())) {
return vxe;
}
}
return null;
} | java | public VoltXMLElement findChild(String uniqueName)
{
for (VoltXMLElement vxe : children) {
if (uniqueName.equals(vxe.getUniqueName())) {
return vxe;
}
}
return null;
} | [
"public",
"VoltXMLElement",
"findChild",
"(",
"String",
"uniqueName",
")",
"{",
"for",
"(",
"VoltXMLElement",
"vxe",
":",
"children",
")",
"{",
"if",
"(",
"uniqueName",
".",
"equals",
"(",
"vxe",
".",
"getUniqueName",
"(",
")",
")",
")",
"{",
"return",
"... | Given an value in the format of that returned by getUniqueName, find the
child element which matches, if any. | [
"Given",
"an",
"value",
"in",
"the",
"format",
"of",
"that",
"returned",
"by",
"getUniqueName",
"find",
"the",
"child",
"element",
"which",
"matches",
"if",
"any",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/VoltXMLElement.java#L214-L222 |
61,653 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/VoltXMLElement.java | VoltXMLElement.computeDiff | static public VoltXMLDiff computeDiff(VoltXMLElement before, VoltXMLElement after)
{
// Top level call needs both names to match (I think this makes sense)
if (!before.getUniqueName().equals(after.getUniqueName())) {
// not sure this is best behavior, ponder as progress is made
... | java | static public VoltXMLDiff computeDiff(VoltXMLElement before, VoltXMLElement after)
{
// Top level call needs both names to match (I think this makes sense)
if (!before.getUniqueName().equals(after.getUniqueName())) {
// not sure this is best behavior, ponder as progress is made
... | [
"static",
"public",
"VoltXMLDiff",
"computeDiff",
"(",
"VoltXMLElement",
"before",
",",
"VoltXMLElement",
"after",
")",
"{",
"// Top level call needs both names to match (I think this makes sense)",
"if",
"(",
"!",
"before",
".",
"getUniqueName",
"(",
")",
".",
"equals",
... | Compute the diff necessary to turn the 'before' tree into the 'after'
tree. | [
"Compute",
"the",
"diff",
"necessary",
"to",
"turn",
"the",
"before",
"tree",
"into",
"the",
"after",
"tree",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/VoltXMLElement.java#L358-L439 |
61,654 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/VoltXMLElement.java | VoltXMLElement.extractSubElements | public List<VoltXMLElement> extractSubElements(String elementName, String attrName, String attrValue) {
assert(elementName != null);
assert((elementName != null && attrValue != null) || attrName == null);
List<VoltXMLElement> elements = new ArrayList<>();
extractSubElements(elementName, ... | java | public List<VoltXMLElement> extractSubElements(String elementName, String attrName, String attrValue) {
assert(elementName != null);
assert((elementName != null && attrValue != null) || attrName == null);
List<VoltXMLElement> elements = new ArrayList<>();
extractSubElements(elementName, ... | [
"public",
"List",
"<",
"VoltXMLElement",
">",
"extractSubElements",
"(",
"String",
"elementName",
",",
"String",
"attrName",
",",
"String",
"attrValue",
")",
"{",
"assert",
"(",
"elementName",
"!=",
"null",
")",
";",
"assert",
"(",
"(",
"elementName",
"!=",
... | Recursively extract sub elements of a given name with matching attribute if it is not null.
@param elementName element name to look for
@param attrName optional attribute name to look for
@param attrValue optional attribute value to look for
@return output collection containing the matching sub elements | [
"Recursively",
"extract",
"sub",
"elements",
"of",
"a",
"given",
"name",
"with",
"matching",
"attribute",
"if",
"it",
"is",
"not",
"null",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/VoltXMLElement.java#L498-L504 |
61,655 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Scanner.java | Scanner.getHexValue | static int getHexValue(int c) {
if (c >= '0' && c <= '9') {
c -= '0';
} else if (c > 'z') {
c = 16;
} else if (c >= 'a') {
c -= ('a' - 10);
} else if (c > 'Z') {
c = 16;
} else if (c >= 'A') {
c -= ('A' - 10);
}... | java | static int getHexValue(int c) {
if (c >= '0' && c <= '9') {
c -= '0';
} else if (c > 'z') {
c = 16;
} else if (c >= 'a') {
c -= ('a' - 10);
} else if (c > 'Z') {
c = 16;
} else if (c >= 'A') {
c -= ('A' - 10);
}... | [
"static",
"int",
"getHexValue",
"(",
"int",
"c",
")",
"{",
"if",
"(",
"c",
">=",
"'",
"'",
"&&",
"c",
"<=",
"'",
"'",
")",
"{",
"c",
"-=",
"'",
"'",
";",
"}",
"else",
"if",
"(",
"c",
">",
"'",
"'",
")",
"{",
"c",
"=",
"16",
";",
"}",
... | returns hex value of a hex character, or 16 if not a hex character | [
"returns",
"hex",
"value",
"of",
"a",
"hex",
"character",
"or",
"16",
"if",
"not",
"a",
"hex",
"character"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Scanner.java#L341-L358 |
61,656 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Scanner.java | Scanner.scanSpecialIdentifier | boolean scanSpecialIdentifier(String identifier) {
int length = identifier.length();
if (limit - currentPosition < length) {
return false;
}
for (int i = 0; i < length; i++) {
int character = identifier.charAt(i);
if (character == sqlString.charAt(... | java | boolean scanSpecialIdentifier(String identifier) {
int length = identifier.length();
if (limit - currentPosition < length) {
return false;
}
for (int i = 0; i < length; i++) {
int character = identifier.charAt(i);
if (character == sqlString.charAt(... | [
"boolean",
"scanSpecialIdentifier",
"(",
"String",
"identifier",
")",
"{",
"int",
"length",
"=",
"identifier",
".",
"length",
"(",
")",
";",
"if",
"(",
"limit",
"-",
"currentPosition",
"<",
"length",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"in... | Only for identifiers that are part of known token sequences | [
"Only",
"for",
"identifiers",
"that",
"are",
"part",
"of",
"known",
"token",
"sequences"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Scanner.java#L614-L641 |
61,657 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Scanner.java | Scanner.scanIntervalType | IntervalType scanIntervalType() {
int precision = -1;
int scale = -1;
int startToken;
int endToken;
final int errorCode = ErrorCode.X_22006;
startToken = endToken = token.tokenType;
scanNext(errorCode);
if (token.tokenType =... | java | IntervalType scanIntervalType() {
int precision = -1;
int scale = -1;
int startToken;
int endToken;
final int errorCode = ErrorCode.X_22006;
startToken = endToken = token.tokenType;
scanNext(errorCode);
if (token.tokenType =... | [
"IntervalType",
"scanIntervalType",
"(",
")",
"{",
"int",
"precision",
"=",
"-",
"1",
";",
"int",
"scale",
"=",
"-",
"1",
";",
"int",
"startToken",
";",
"int",
"endToken",
";",
"final",
"int",
"errorCode",
"=",
"ErrorCode",
".",
"X_22006",
";",
"startTok... | Reads the type part of the INTERVAL | [
"Reads",
"the",
"type",
"part",
"of",
"the",
"INTERVAL"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Scanner.java#L1739-L1825 |
61,658 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Scanner.java | Scanner.convertToDatetimeInterval | public synchronized Object convertToDatetimeInterval(String s,
DTIType type) {
Object value;
IntervalType intervalType = null;
int dateTimeToken = -1;
int errorCode = type.isDateTimeType() ? ErrorCode.X_22007
... | java | public synchronized Object convertToDatetimeInterval(String s,
DTIType type) {
Object value;
IntervalType intervalType = null;
int dateTimeToken = -1;
int errorCode = type.isDateTimeType() ? ErrorCode.X_22007
... | [
"public",
"synchronized",
"Object",
"convertToDatetimeInterval",
"(",
"String",
"s",
",",
"DTIType",
"type",
")",
"{",
"Object",
"value",
";",
"IntervalType",
"intervalType",
"=",
"null",
";",
"int",
"dateTimeToken",
"=",
"-",
"1",
";",
"int",
"errorCode",
"="... | should perform range checks etc. | [
"should",
"perform",
"range",
"checks",
"etc",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Scanner.java#L2367-L2460 |
61,659 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/rowio/RowOutputBase.java | RowOutputBase.writeData | public void writeData(Object[] data, Type[] types) {
writeData(types.length, types, data, null, null);
} | java | public void writeData(Object[] data, Type[] types) {
writeData(types.length, types, data, null, null);
} | [
"public",
"void",
"writeData",
"(",
"Object",
"[",
"]",
"data",
",",
"Type",
"[",
"]",
"types",
")",
"{",
"writeData",
"(",
"types",
".",
"length",
",",
"types",
",",
"data",
",",
"null",
",",
"null",
")",
";",
"}"
] | This method is called to write data for a table row. | [
"This",
"method",
"is",
"called",
"to",
"write",
"data",
"for",
"a",
"table",
"row",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rowio/RowOutputBase.java#L162-L164 |
61,660 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCConnection.java | JDBCConnection.addWarning | void addWarning(SQLWarning w) {
// PRE: w is never null
synchronized (rootWarning_mutex) {
if (rootWarning == null) {
rootWarning = w;
} else {
rootWarning.setNextWarning(w);
}
}
} | java | void addWarning(SQLWarning w) {
// PRE: w is never null
synchronized (rootWarning_mutex) {
if (rootWarning == null) {
rootWarning = w;
} else {
rootWarning.setNextWarning(w);
}
}
} | [
"void",
"addWarning",
"(",
"SQLWarning",
"w",
")",
"{",
"// PRE: w is never null",
"synchronized",
"(",
"rootWarning_mutex",
")",
"{",
"if",
"(",
"rootWarning",
"==",
"null",
")",
"{",
"rootWarning",
"=",
"w",
";",
"}",
"else",
"{",
"rootWarning",
".",
"set... | Adds another SQLWarning to this Connection object's warning chain.
@param w the SQLWarning to add to the chain | [
"Adds",
"another",
"SQLWarning",
"to",
"this",
"Connection",
"object",
"s",
"warning",
"chain",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCConnection.java#L3346-L3356 |
61,661 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCConnection.java | JDBCConnection.reset | public void reset() throws SQLException {
try {
this.sessionProxy.resetSession();
} catch (HsqlException e) {
throw Util.sqlException(ErrorCode.X_08006, e.getMessage(), e);
}
} | java | public void reset() throws SQLException {
try {
this.sessionProxy.resetSession();
} catch (HsqlException e) {
throw Util.sqlException(ErrorCode.X_08006, e.getMessage(), e);
}
} | [
"public",
"void",
"reset",
"(",
")",
"throws",
"SQLException",
"{",
"try",
"{",
"this",
".",
"sessionProxy",
".",
"resetSession",
"(",
")",
";",
"}",
"catch",
"(",
"HsqlException",
"e",
")",
"{",
"throw",
"Util",
".",
"sqlException",
"(",
"ErrorCode",
".... | Resets this connection so it can be used again. Used when connections are
returned to a connection pool.
@throws SQLException if a database access error occurs | [
"Resets",
"this",
"connection",
"so",
"it",
"can",
"be",
"used",
"again",
".",
"Used",
"when",
"connections",
"are",
"returned",
"to",
"a",
"connection",
"pool",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCConnection.java#L3458-L3465 |
61,662 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCConnection.java | JDBCConnection.onStartEscapeSequence | private int onStartEscapeSequence(String sql, StringBuffer sb,
int i) throws SQLException {
sb.setCharAt(i++, ' ');
i = StringUtil.skipSpaces(sql, i);
if (sql.regionMatches(true, i, "fn ", 0, 3)
|| sql.regionMatches(true, i, "oj ", 0, 3)
... | java | private int onStartEscapeSequence(String sql, StringBuffer sb,
int i) throws SQLException {
sb.setCharAt(i++, ' ');
i = StringUtil.skipSpaces(sql, i);
if (sql.regionMatches(true, i, "fn ", 0, 3)
|| sql.regionMatches(true, i, "oj ", 0, 3)
... | [
"private",
"int",
"onStartEscapeSequence",
"(",
"String",
"sql",
",",
"StringBuffer",
"sb",
",",
"int",
"i",
")",
"throws",
"SQLException",
"{",
"sb",
".",
"setCharAt",
"(",
"i",
"++",
",",
"'",
"'",
")",
";",
"i",
"=",
"StringUtil",
".",
"skipSpaces",
... | is called from within nativeSQL when the start of an JDBC escape sequence is encountered | [
"is",
"called",
"from",
"within",
"nativeSQL",
"when",
"the",
"start",
"of",
"an",
"JDBC",
"escape",
"sequence",
"is",
"encountered"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCConnection.java#L3470-L3503 |
61,663 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/NumberSequence.java | NumberSequence.userUpdate | synchronized long userUpdate(long value) {
if (value == currValue) {
currValue += increment;
return value;
}
if (increment > 0) {
if (value > currValue) {
currValue += ((value - currValue + increment) / increment)
... | java | synchronized long userUpdate(long value) {
if (value == currValue) {
currValue += increment;
return value;
}
if (increment > 0) {
if (value > currValue) {
currValue += ((value - currValue + increment) / increment)
... | [
"synchronized",
"long",
"userUpdate",
"(",
"long",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"currValue",
")",
"{",
"currValue",
"+=",
"increment",
";",
"return",
"value",
";",
"}",
"if",
"(",
"increment",
">",
"0",
")",
"{",
"if",
"(",
"value",
"... | getter for a given value | [
"getter",
"for",
"a",
"given",
"value"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/NumberSequence.java#L531-L552 |
61,664 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/NumberSequence.java | NumberSequence.systemUpdate | synchronized long systemUpdate(long value) {
if (value == currValue) {
currValue += increment;
return value;
}
if (increment > 0) {
if (value > currValue) {
currValue = value + increment;
}
} else {
if (value ... | java | synchronized long systemUpdate(long value) {
if (value == currValue) {
currValue += increment;
return value;
}
if (increment > 0) {
if (value > currValue) {
currValue = value + increment;
}
} else {
if (value ... | [
"synchronized",
"long",
"systemUpdate",
"(",
"long",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"currValue",
")",
"{",
"currValue",
"+=",
"increment",
";",
"return",
"value",
";",
"}",
"if",
"(",
"increment",
">",
"0",
")",
"{",
"if",
"(",
"value",
... | Updates are necessary for text tables
For memory tables, the logged and scripted RESTART WITH will override
this.
No checks as values may have overridden the sequnece defaults | [
"Updates",
"are",
"necessary",
"for",
"text",
"tables",
"For",
"memory",
"tables",
"the",
"logged",
"and",
"scripted",
"RESTART",
"WITH",
"will",
"override",
"this",
".",
"No",
"checks",
"as",
"values",
"may",
"have",
"overridden",
"the",
"sequnece",
"defaults... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/NumberSequence.java#L560-L579 |
61,665 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/NumberSequence.java | NumberSequence.getValue | synchronized public long getValue() {
if (limitReached) {
throw Error.error(ErrorCode.X_2200H);
}
long nextValue;
if (increment > 0) {
if (currValue > maxValue - increment) {
if (isCycle) {
nextValue = minValue;
... | java | synchronized public long getValue() {
if (limitReached) {
throw Error.error(ErrorCode.X_2200H);
}
long nextValue;
if (increment > 0) {
if (currValue > maxValue - increment) {
if (isCycle) {
nextValue = minValue;
... | [
"synchronized",
"public",
"long",
"getValue",
"(",
")",
"{",
"if",
"(",
"limitReached",
")",
"{",
"throw",
"Error",
".",
"error",
"(",
"ErrorCode",
".",
"X_2200H",
")",
";",
"}",
"long",
"nextValue",
";",
"if",
"(",
"increment",
">",
"0",
")",
"{",
"... | principal getter for the next sequence value | [
"principal",
"getter",
"for",
"the",
"next",
"sequence",
"value"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/NumberSequence.java#L610-L647 |
61,666 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/NumberSequence.java | NumberSequence.reset | synchronized public void reset(long value) {
if (value < minValue || value > maxValue) {
throw Error.error(ErrorCode.X_42597);
}
startValue = currValue = lastValue = value;
} | java | synchronized public void reset(long value) {
if (value < minValue || value > maxValue) {
throw Error.error(ErrorCode.X_42597);
}
startValue = currValue = lastValue = value;
} | [
"synchronized",
"public",
"void",
"reset",
"(",
"long",
"value",
")",
"{",
"if",
"(",
"value",
"<",
"minValue",
"||",
"value",
">",
"maxValue",
")",
"{",
"throw",
"Error",
".",
"error",
"(",
"ErrorCode",
".",
"X_42597",
")",
";",
"}",
"startValue",
"="... | reset to new initial value | [
"reset",
"to",
"new",
"initial",
"value"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/NumberSequence.java#L680-L687 |
61,667 | VoltDB/voltdb | src/frontend/org/voltdb/jni/Sha1Wrapper.java | Sha1Wrapper.compareTo | @Override
public int compareTo(Sha1Wrapper arg0) {
if (arg0 == null) return 1;
for (int i = 0; i < 20; i++) {
int cmp = hashBytes[i] - arg0.hashBytes[i];
if (cmp != 0) return cmp;
}
return 0;
} | java | @Override
public int compareTo(Sha1Wrapper arg0) {
if (arg0 == null) return 1;
for (int i = 0; i < 20; i++) {
int cmp = hashBytes[i] - arg0.hashBytes[i];
if (cmp != 0) return cmp;
}
return 0;
} | [
"@",
"Override",
"public",
"int",
"compareTo",
"(",
"Sha1Wrapper",
"arg0",
")",
"{",
"if",
"(",
"arg0",
"==",
"null",
")",
"return",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"20",
";",
"i",
"++",
")",
"{",
"int",
"cmp",
"=",
... | Not totally sure if this is a sensible ordering | [
"Not",
"totally",
"sure",
"if",
"this",
"is",
"a",
"sensible",
"ordering"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/Sha1Wrapper.java#L59-L67 |
61,668 | VoltDB/voltdb | third_party/java/src/org/supercsv_voltpatches/tokenizer/Tokenizer.java | Tokenizer.appendSpaces | private static void appendSpaces(final StringBuilder sb, final int spaces) {
for( int i = 0; i < spaces; i++ ) {
sb.append(SPACE);
}
} | java | private static void appendSpaces(final StringBuilder sb, final int spaces) {
for( int i = 0; i < spaces; i++ ) {
sb.append(SPACE);
}
} | [
"private",
"static",
"void",
"appendSpaces",
"(",
"final",
"StringBuilder",
"sb",
",",
"final",
"int",
"spaces",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"spaces",
";",
"i",
"++",
")",
"{",
"sb",
".",
"append",
"(",
"SPACE",
")",
... | Appends the required number of spaces to the StringBuilder.
@param sb
the StringBuilder
@param spaces
the required number of spaces to append | [
"Appends",
"the",
"required",
"number",
"of",
"spaces",
"to",
"the",
"StringBuilder",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/supercsv_voltpatches/tokenizer/Tokenizer.java#L350-L354 |
61,669 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/ProcedureCompiler.java | ProcedureCompiler.setCatalogProcedurePartitionInfo | public static void setCatalogProcedurePartitionInfo(VoltCompiler compiler, Database db,
Procedure procedure, ProcedurePartitionData partitionData) throws VoltCompilerException {
ParititonDataReturnType partitionClauseData = resolvePartitionData(compiler, db, procedure,
partitionData.... | java | public static void setCatalogProcedurePartitionInfo(VoltCompiler compiler, Database db,
Procedure procedure, ProcedurePartitionData partitionData) throws VoltCompilerException {
ParititonDataReturnType partitionClauseData = resolvePartitionData(compiler, db, procedure,
partitionData.... | [
"public",
"static",
"void",
"setCatalogProcedurePartitionInfo",
"(",
"VoltCompiler",
"compiler",
",",
"Database",
"db",
",",
"Procedure",
"procedure",
",",
"ProcedurePartitionData",
"partitionData",
")",
"throws",
"VoltCompilerException",
"{",
"ParititonDataReturnType",
"pa... | Set partition table, column, and parameter index for catalog procedure | [
"Set",
"partition",
"table",
"column",
"and",
"parameter",
"index",
"for",
"catalog",
"procedure"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/ProcedureCompiler.java#L877-L895 |
61,670 | VoltDB/voltdb | src/frontend/org/voltdb/importclient/kafka10/KafkaStreamImporter.java | KafkaStreamImporter.createConsumerRunner | private KafkaInternalConsumerRunner createConsumerRunner(Properties properties) throws Exception {
ClassLoader previous = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
try {
Consumer<ByteBuffer, ByteBuffer... | java | private KafkaInternalConsumerRunner createConsumerRunner(Properties properties) throws Exception {
ClassLoader previous = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
try {
Consumer<ByteBuffer, ByteBuffer... | [
"private",
"KafkaInternalConsumerRunner",
"createConsumerRunner",
"(",
"Properties",
"properties",
")",
"throws",
"Exception",
"{",
"ClassLoader",
"previous",
"=",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getContextClassLoader",
"(",
")",
";",
"Thread",
".",
... | Create a Kafka consumer and runner.
@param properties Kafka consumer properties
@throws Exception on error | [
"Create",
"a",
"Kafka",
"consumer",
"and",
"runner",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importclient/kafka10/KafkaStreamImporter.java#L72-L83 |
61,671 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java | SchemaManager.createSchema | void createSchema(HsqlName name, Grantee owner) {
SqlInvariants.checkSchemaNameNotSystem(name.name);
Schema schema = new Schema(name, owner);
schemaMap.add(name.name, schema);
} | java | void createSchema(HsqlName name, Grantee owner) {
SqlInvariants.checkSchemaNameNotSystem(name.name);
Schema schema = new Schema(name, owner);
schemaMap.add(name.name, schema);
} | [
"void",
"createSchema",
"(",
"HsqlName",
"name",
",",
"Grantee",
"owner",
")",
"{",
"SqlInvariants",
".",
"checkSchemaNameNotSystem",
"(",
"name",
".",
"name",
")",
";",
"Schema",
"schema",
"=",
"new",
"Schema",
"(",
"name",
",",
"owner",
")",
";",
"schema... | Creates a schema belonging to the given grantee. | [
"Creates",
"a",
"schema",
"belonging",
"to",
"the",
"given",
"grantee",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L104-L111 |
61,672 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java | SchemaManager.getSchemaHsqlName | public HsqlName getSchemaHsqlName(String name) {
if (name == null) {
return defaultSchemaHsqlName;
}
if (SqlInvariants.INFORMATION_SCHEMA.equals(name)) {
return SqlInvariants.INFORMATION_SCHEMA_HSQLNAME;
}
Schema schema = ((Schema) schemaMap.get(name));... | java | public HsqlName getSchemaHsqlName(String name) {
if (name == null) {
return defaultSchemaHsqlName;
}
if (SqlInvariants.INFORMATION_SCHEMA.equals(name)) {
return SqlInvariants.INFORMATION_SCHEMA_HSQLNAME;
}
Schema schema = ((Schema) schemaMap.get(name));... | [
"public",
"HsqlName",
"getSchemaHsqlName",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"return",
"defaultSchemaHsqlName",
";",
"}",
"if",
"(",
"SqlInvariants",
".",
"INFORMATION_SCHEMA",
".",
"equals",
"(",
"name",
")",
")",
... | If schemaName is null, return the default schema name, else return
the HsqlName object for the schema. If schemaName does not exist,
throw. | [
"If",
"schemaName",
"is",
"null",
"return",
"the",
"default",
"schema",
"name",
"else",
"return",
"the",
"HsqlName",
"object",
"for",
"the",
"schema",
".",
"If",
"schemaName",
"does",
"not",
"exist",
"throw",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L269-L286 |
61,673 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java | SchemaManager.isSchemaAuthorisation | boolean isSchemaAuthorisation(Grantee grantee) {
Iterator schemas = allSchemaNameIterator();
while (schemas.hasNext()) {
String schemaName = (String) schemas.next();
if (grantee.equals(toSchemaOwner(schemaName))) {
return true;
}
}
... | java | boolean isSchemaAuthorisation(Grantee grantee) {
Iterator schemas = allSchemaNameIterator();
while (schemas.hasNext()) {
String schemaName = (String) schemas.next();
if (grantee.equals(toSchemaOwner(schemaName))) {
return true;
}
}
... | [
"boolean",
"isSchemaAuthorisation",
"(",
"Grantee",
"grantee",
")",
"{",
"Iterator",
"schemas",
"=",
"allSchemaNameIterator",
"(",
")",
";",
"while",
"(",
"schemas",
".",
"hasNext",
"(",
")",
")",
"{",
"String",
"schemaName",
"=",
"(",
"String",
")",
"schema... | is a grantee the authorization of any schema | [
"is",
"a",
"grantee",
"the",
"authorization",
"of",
"any",
"schema"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L316-L329 |
61,674 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java | SchemaManager.dropSchemas | void dropSchemas(Grantee grantee, boolean cascade) {
HsqlArrayList list = getSchemas(grantee);
Iterator it = list.iterator();
while (it.hasNext()) {
Schema schema = (Schema) it.next();
dropSchema(schema.name.name, cascade);
}
} | java | void dropSchemas(Grantee grantee, boolean cascade) {
HsqlArrayList list = getSchemas(grantee);
Iterator it = list.iterator();
while (it.hasNext()) {
Schema schema = (Schema) it.next();
dropSchema(schema.name.name, cascade);
}
} | [
"void",
"dropSchemas",
"(",
"Grantee",
"grantee",
",",
"boolean",
"cascade",
")",
"{",
"HsqlArrayList",
"list",
"=",
"getSchemas",
"(",
"grantee",
")",
";",
"Iterator",
"it",
"=",
"list",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"it",
".",
"hasNext"... | drop all schemas with the given authorisation | [
"drop",
"all",
"schemas",
"with",
"the",
"given",
"authorisation"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L334-L344 |
61,675 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java | SchemaManager.getAllTables | public HsqlArrayList getAllTables() {
Iterator schemas = allSchemaNameIterator();
HsqlArrayList alltables = new HsqlArrayList();
while (schemas.hasNext()) {
String name = (String) schemas.next();
HashMappedList current = getTables(name);
a... | java | public HsqlArrayList getAllTables() {
Iterator schemas = allSchemaNameIterator();
HsqlArrayList alltables = new HsqlArrayList();
while (schemas.hasNext()) {
String name = (String) schemas.next();
HashMappedList current = getTables(name);
a... | [
"public",
"HsqlArrayList",
"getAllTables",
"(",
")",
"{",
"Iterator",
"schemas",
"=",
"allSchemaNameIterator",
"(",
")",
";",
"HsqlArrayList",
"alltables",
"=",
"new",
"HsqlArrayList",
"(",
")",
";",
"while",
"(",
"schemas",
".",
"hasNext",
"(",
")",
")",
"{... | Returns an HsqlArrayList containing references to all non-system
tables and views. This includes all tables and views registered with
this Database. | [
"Returns",
"an",
"HsqlArrayList",
"containing",
"references",
"to",
"all",
"non",
"-",
"system",
"tables",
"and",
"views",
".",
"This",
"includes",
"all",
"tables",
"and",
"views",
"registered",
"with",
"this",
"Database",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L382-L395 |
61,676 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java | SchemaManager.getTable | public Table getTable(Session session, String name, String schema) {
Table t = null;
if (schema == null) {
t = findSessionTable(session, name, schema);
}
if (t == null) {
schema = session.getSchemaName(schema);
t = findUserTable(session, name, ... | java | public Table getTable(Session session, String name, String schema) {
Table t = null;
if (schema == null) {
t = findSessionTable(session, name, schema);
}
if (t == null) {
schema = session.getSchemaName(schema);
t = findUserTable(session, name, ... | [
"public",
"Table",
"getTable",
"(",
"Session",
"session",
",",
"String",
"name",
",",
"String",
"schema",
")",
"{",
"Table",
"t",
"=",
"null",
";",
"if",
"(",
"schema",
"==",
"null",
")",
"{",
"t",
"=",
"findSessionTable",
"(",
"session",
",",
"name",
... | Returns the specified user-defined table or view visible within the
context of the specified Session, or any system table of the given
name. It excludes any temp tables created in other Sessions.
Throws if the table does not exist in the context. | [
"Returns",
"the",
"specified",
"user",
"-",
"defined",
"table",
"or",
"view",
"visible",
"within",
"the",
"context",
"of",
"the",
"specified",
"Session",
"or",
"any",
"system",
"table",
"of",
"the",
"given",
"name",
".",
"It",
"excludes",
"any",
"temp",
"t... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L470-L495 |
61,677 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java | SchemaManager.getUserTable | public Table getUserTable(Session session, String name, String schema) {
Table t = findUserTable(session, name, schema);
if (t == null) {
throw Error.error(ErrorCode.X_42501, name);
}
return t;
} | java | public Table getUserTable(Session session, String name, String schema) {
Table t = findUserTable(session, name, schema);
if (t == null) {
throw Error.error(ErrorCode.X_42501, name);
}
return t;
} | [
"public",
"Table",
"getUserTable",
"(",
"Session",
"session",
",",
"String",
"name",
",",
"String",
"schema",
")",
"{",
"Table",
"t",
"=",
"findUserTable",
"(",
"session",
",",
"name",
",",
"schema",
")",
";",
"if",
"(",
"t",
"==",
"null",
")",
"{",
... | Returns the specified user-defined table or view visible within the
context of the specified Session. It excludes system tables and
any temp tables created in different Sessions.
Throws if the table does not exist in the context. | [
"Returns",
"the",
"specified",
"user",
"-",
"defined",
"table",
"or",
"view",
"visible",
"within",
"the",
"context",
"of",
"the",
"specified",
"Session",
".",
"It",
"excludes",
"system",
"tables",
"and",
"any",
"temp",
"tables",
"created",
"in",
"different",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L507-L516 |
61,678 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java | SchemaManager.findUserTable | public Table findUserTable(Session session, String name,
String schemaName) {
Schema schema = (Schema) schemaMap.get(schemaName);
if (schema == null) {
return null;
}
if (session != null) {
Table table = session.getLocalTable(name... | java | public Table findUserTable(Session session, String name,
String schemaName) {
Schema schema = (Schema) schemaMap.get(schemaName);
if (schema == null) {
return null;
}
if (session != null) {
Table table = session.getLocalTable(name... | [
"public",
"Table",
"findUserTable",
"(",
"Session",
"session",
",",
"String",
"name",
",",
"String",
"schemaName",
")",
"{",
"Schema",
"schema",
"=",
"(",
"Schema",
")",
"schemaMap",
".",
"get",
"(",
"schemaName",
")",
";",
"if",
"(",
"schema",
"==",
"nu... | Returns the specified user-defined table or view visible within the
context of the specified schema. It excludes system tables.
Returns null if the table does not exist in the context. | [
"Returns",
"the",
"specified",
"user",
"-",
"defined",
"table",
"or",
"view",
"visible",
"within",
"the",
"context",
"of",
"the",
"specified",
"schema",
".",
"It",
"excludes",
"system",
"tables",
".",
"Returns",
"null",
"if",
"the",
"table",
"does",
"not",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L523-L546 |
61,679 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java | SchemaManager.findSessionTable | public Table findSessionTable(Session session, String name,
String schemaName) {
return session.findSessionTable(name);
} | java | public Table findSessionTable(Session session, String name,
String schemaName) {
return session.findSessionTable(name);
} | [
"public",
"Table",
"findSessionTable",
"(",
"Session",
"session",
",",
"String",
"name",
",",
"String",
"schemaName",
")",
"{",
"return",
"session",
".",
"findSessionTable",
"(",
"name",
")",
";",
"}"
] | Returns the specified session context table.
Returns null if the table does not exist in the context. | [
"Returns",
"the",
"specified",
"session",
"context",
"table",
".",
"Returns",
"null",
"if",
"the",
"table",
"does",
"not",
"exist",
"in",
"the",
"context",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L552-L555 |
61,680 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java | SchemaManager.dropTableOrView | void dropTableOrView(Session session, Table table, boolean cascade) {
// ft - concurrent
session.commit(false);
if (table.isView()) {
removeSchemaObject(table.getName(), cascade);
} else {
dropTable(session, table, cascade);
}
} | java | void dropTableOrView(Session session, Table table, boolean cascade) {
// ft - concurrent
session.commit(false);
if (table.isView()) {
removeSchemaObject(table.getName(), cascade);
} else {
dropTable(session, table, cascade);
}
} | [
"void",
"dropTableOrView",
"(",
"Session",
"session",
",",
"Table",
"table",
",",
"boolean",
"cascade",
")",
"{",
"// ft - concurrent",
"session",
".",
"commit",
"(",
"false",
")",
";",
"if",
"(",
"table",
".",
"isView",
"(",
")",
")",
"{",
"removeSchemaOb... | Drops the specified user-defined view or table from this Database object.
<p> The process of dropping a table or view includes:
<OL>
<LI> checking that the specified Session's currently connected User has
the right to perform this operation and refusing to proceed if not by
throwing.
<LI> checking for referential cons... | [
"Drops",
"the",
"specified",
"user",
"-",
"defined",
"view",
"or",
"table",
"from",
"this",
"Database",
"object",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L582-L592 |
61,681 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java | SchemaManager.getTableIndex | int getTableIndex(Table table) {
Schema schema = (Schema) schemaMap.get(table.getSchemaName().name);
if (schema == null) {
return -1;
}
HsqlName name = table.getName();
return schema.tableList.getIndex(name.name);
} | java | int getTableIndex(Table table) {
Schema schema = (Schema) schemaMap.get(table.getSchemaName().name);
if (schema == null) {
return -1;
}
HsqlName name = table.getName();
return schema.tableList.getIndex(name.name);
} | [
"int",
"getTableIndex",
"(",
"Table",
"table",
")",
"{",
"Schema",
"schema",
"=",
"(",
"Schema",
")",
"schemaMap",
".",
"get",
"(",
"table",
".",
"getSchemaName",
"(",
")",
".",
"name",
")",
";",
"if",
"(",
"schema",
"==",
"null",
")",
"{",
"return",... | Returns index of a table or view in the HashMappedList that
contains the table objects for this Database.
@param table the Table object
@return the index of the specified table or view, or -1 if not found | [
"Returns",
"index",
"of",
"a",
"table",
"or",
"view",
"in",
"the",
"HashMappedList",
"that",
"contains",
"the",
"table",
"objects",
"for",
"this",
"Database",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L688-L699 |
61,682 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java | SchemaManager.recompileDependentObjects | void recompileDependentObjects(Table table) {
OrderedHashSet set = getReferencingObjects(table.getName());
Session session = database.sessionManager.getSysSession();
for (int i = 0; i < set.size(); i++) {
HsqlName name = (HsqlName) set.get(i);
switch (name.t... | java | void recompileDependentObjects(Table table) {
OrderedHashSet set = getReferencingObjects(table.getName());
Session session = database.sessionManager.getSysSession();
for (int i = 0; i < set.size(); i++) {
HsqlName name = (HsqlName) set.get(i);
switch (name.t... | [
"void",
"recompileDependentObjects",
"(",
"Table",
"table",
")",
"{",
"OrderedHashSet",
"set",
"=",
"getReferencingObjects",
"(",
"table",
".",
"getName",
"(",
")",
")",
";",
"Session",
"session",
"=",
"database",
".",
"sessionManager",
".",
"getSysSession",
"("... | After addition or removal of columns and indexes all views that
reference the table should be recompiled. | [
"After",
"addition",
"or",
"removal",
"of",
"columns",
"and",
"indexes",
"all",
"views",
"that",
"reference",
"the",
"table",
"should",
"be",
"recompiled",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L733-L760 |
61,683 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java | SchemaManager.findUserTableForIndex | Table findUserTableForIndex(Session session, String name,
String schemaName) {
Schema schema = (Schema) schemaMap.get(schemaName);
HsqlName indexName = schema.indexLookup.getName(name);
if (indexName == null) {
return null;
}
re... | java | Table findUserTableForIndex(Session session, String name,
String schemaName) {
Schema schema = (Schema) schemaMap.get(schemaName);
HsqlName indexName = schema.indexLookup.getName(name);
if (indexName == null) {
return null;
}
re... | [
"Table",
"findUserTableForIndex",
"(",
"Session",
"session",
",",
"String",
"name",
",",
"String",
"schemaName",
")",
"{",
"Schema",
"schema",
"=",
"(",
"Schema",
")",
"schemaMap",
".",
"get",
"(",
"schemaName",
")",
";",
"HsqlName",
"indexName",
"=",
"schem... | Returns the table that has an index with the given name and schema. | [
"Returns",
"the",
"table",
"that",
"has",
"an",
"index",
"with",
"the",
"given",
"name",
"and",
"schema",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L957-L968 |
61,684 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java | SchemaManager.getSchemaHsqlNameNoThrow | public HsqlName getSchemaHsqlNameNoThrow(String name, HsqlName defaultName) {
if (name == null) {
return defaultSchemaHsqlName;
}
if (SqlInvariants.INFORMATION_SCHEMA.equals(name)) {
return SqlInvariants.INFORMATION_SCHEMA_HSQLNAME;
}
Schema schema = ((... | java | public HsqlName getSchemaHsqlNameNoThrow(String name, HsqlName defaultName) {
if (name == null) {
return defaultSchemaHsqlName;
}
if (SqlInvariants.INFORMATION_SCHEMA.equals(name)) {
return SqlInvariants.INFORMATION_SCHEMA_HSQLNAME;
}
Schema schema = ((... | [
"public",
"HsqlName",
"getSchemaHsqlNameNoThrow",
"(",
"String",
"name",
",",
"HsqlName",
"defaultName",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"return",
"defaultSchemaHsqlName",
";",
"}",
"if",
"(",
"SqlInvariants",
".",
"INFORMATION_SCHEMA",
".",... | If schemaName is null, return the default schema name, else return
the HsqlName object for the schema. If schemaName does not exist,
return the defaultName provided.
Not throwing the usual exception saves some throw-then-catch nonsense
in the usual session setup. | [
"If",
"schemaName",
"is",
"null",
"return",
"the",
"default",
"schema",
"name",
"else",
"return",
"the",
"HsqlName",
"object",
"for",
"the",
"schema",
".",
"If",
"schemaName",
"does",
"not",
"exist",
"return",
"the",
"defaultName",
"provided",
".",
"Not",
"t... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L1638-L1654 |
61,685 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/ReplaySequencer.java | ReplaySequencer.dedupe | public InitiateResponseMessage dedupe(long inUniqueId, TransactionInfoBaseMessage in)
{
if (in instanceof Iv2InitiateTaskMessage) {
final Iv2InitiateTaskMessage init = (Iv2InitiateTaskMessage) in;
final StoredProcedureInvocation invocation = init.getStoredProcedureInvocation();
... | java | public InitiateResponseMessage dedupe(long inUniqueId, TransactionInfoBaseMessage in)
{
if (in instanceof Iv2InitiateTaskMessage) {
final Iv2InitiateTaskMessage init = (Iv2InitiateTaskMessage) in;
final StoredProcedureInvocation invocation = init.getStoredProcedureInvocation();
... | [
"public",
"InitiateResponseMessage",
"dedupe",
"(",
"long",
"inUniqueId",
",",
"TransactionInfoBaseMessage",
"in",
")",
"{",
"if",
"(",
"in",
"instanceof",
"Iv2InitiateTaskMessage",
")",
"{",
"final",
"Iv2InitiateTaskMessage",
"init",
"=",
"(",
"Iv2InitiateTaskMessage",... | Dedupe initiate task messages. Check if the initiate task message is seen before.
@param inUniqueId The uniqueId of the message
@param in The initiate task message
@return A client response to return if it's a duplicate, otherwise null. | [
"Dedupe",
"initiate",
"task",
"messages",
".",
"Check",
"if",
"the",
"initiate",
"task",
"message",
"is",
"seen",
"before",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/ReplaySequencer.java#L171-L194 |
61,686 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/ReplaySequencer.java | ReplaySequencer.updateLastSeenUniqueId | public void updateLastSeenUniqueId(long inUniqueId, TransactionInfoBaseMessage in)
{
if (in instanceof Iv2InitiateTaskMessage && inUniqueId > m_lastSeenUniqueId) {
m_lastSeenUniqueId = inUniqueId;
}
} | java | public void updateLastSeenUniqueId(long inUniqueId, TransactionInfoBaseMessage in)
{
if (in instanceof Iv2InitiateTaskMessage && inUniqueId > m_lastSeenUniqueId) {
m_lastSeenUniqueId = inUniqueId;
}
} | [
"public",
"void",
"updateLastSeenUniqueId",
"(",
"long",
"inUniqueId",
",",
"TransactionInfoBaseMessage",
"in",
")",
"{",
"if",
"(",
"in",
"instanceof",
"Iv2InitiateTaskMessage",
"&&",
"inUniqueId",
">",
"m_lastSeenUniqueId",
")",
"{",
"m_lastSeenUniqueId",
"=",
"inUn... | Update the last seen uniqueId for this partition if it's an initiate task message.
@param inUniqueId
@param in | [
"Update",
"the",
"last",
"seen",
"uniqueId",
"for",
"this",
"partition",
"if",
"it",
"s",
"an",
"initiate",
"task",
"message",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/ReplaySequencer.java#L202-L207 |
61,687 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/ReplaySequencer.java | ReplaySequencer.poll | public VoltMessage poll()
{
if (m_mustDrain || m_replayEntries.isEmpty()) {
return null;
}
if (m_replayEntries.firstEntry().getValue().isEmpty()) {
m_replayEntries.pollFirstEntry();
}
// All the drain conditions depend on being blocked, which
/... | java | public VoltMessage poll()
{
if (m_mustDrain || m_replayEntries.isEmpty()) {
return null;
}
if (m_replayEntries.firstEntry().getValue().isEmpty()) {
m_replayEntries.pollFirstEntry();
}
// All the drain conditions depend on being blocked, which
/... | [
"public",
"VoltMessage",
"poll",
"(",
")",
"{",
"if",
"(",
"m_mustDrain",
"||",
"m_replayEntries",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"m_replayEntries",
".",
"firstEntry",
"(",
")",
".",
"getValue",
"(",
")",
"."... | Return the next correctly sequenced message or null if none exists. | [
"Return",
"the",
"next",
"correctly",
"sequenced",
"message",
"or",
"null",
"if",
"none",
"exists",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/ReplaySequencer.java#L222-L240 |
61,688 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/ReplaySequencer.java | ReplaySequencer.offer | public boolean offer(long inUniqueId, TransactionInfoBaseMessage in)
{
ReplayEntry found = m_replayEntries.get(inUniqueId);
if (in instanceof Iv2EndOfLogMessage) {
m_mpiEOLReached = true;
return true;
}
if (in instanceof MultiPartitionParticipantMessage) {
... | java | public boolean offer(long inUniqueId, TransactionInfoBaseMessage in)
{
ReplayEntry found = m_replayEntries.get(inUniqueId);
if (in instanceof Iv2EndOfLogMessage) {
m_mpiEOLReached = true;
return true;
}
if (in instanceof MultiPartitionParticipantMessage) {
... | [
"public",
"boolean",
"offer",
"(",
"long",
"inUniqueId",
",",
"TransactionInfoBaseMessage",
"in",
")",
"{",
"ReplayEntry",
"found",
"=",
"m_replayEntries",
".",
"get",
"(",
"inUniqueId",
")",
";",
"if",
"(",
"in",
"instanceof",
"Iv2EndOfLogMessage",
")",
"{",
... | Offer a new message. Return false if the offered message can be run immediately. | [
"Offer",
"a",
"new",
"message",
".",
"Return",
"false",
"if",
"the",
"offered",
"message",
"can",
"be",
"run",
"immediately",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/ReplaySequencer.java#L286-L363 |
61,689 | VoltDB/voltdb | src/frontend/org/voltdb/jni/ExecutionEngineIPC.java | ExecutionEngineIPC.verifyDataCapacity | private void verifyDataCapacity(int size) {
if (size+4 > m_dataNetwork.capacity()) {
m_dataNetworkOrigin.discard();
m_dataNetworkOrigin = org.voltcore.utils.DBBPool.allocateDirect(size+4);
m_dataNetwork = m_dataNetworkOrigin.b();
m_dataNetwork.position(4);
... | java | private void verifyDataCapacity(int size) {
if (size+4 > m_dataNetwork.capacity()) {
m_dataNetworkOrigin.discard();
m_dataNetworkOrigin = org.voltcore.utils.DBBPool.allocateDirect(size+4);
m_dataNetwork = m_dataNetworkOrigin.b();
m_dataNetwork.position(4);
... | [
"private",
"void",
"verifyDataCapacity",
"(",
"int",
"size",
")",
"{",
"if",
"(",
"size",
"+",
"4",
">",
"m_dataNetwork",
".",
"capacity",
"(",
")",
")",
"{",
"m_dataNetworkOrigin",
".",
"discard",
"(",
")",
";",
"m_dataNetworkOrigin",
"=",
"org",
".",
"... | private int m_counter; | [
"private",
"int",
"m_counter",
";"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngineIPC.java#L808-L816 |
61,690 | VoltDB/voltdb | src/frontend/org/voltdb/jni/ExecutionEngineIPC.java | ExecutionEngineIPC.initialize | public void initialize(
final int clusterIndex,
final long siteId,
final int partitionId,
final int sitesPerHost,
final int hostId,
final String hostname,
final int drClusterId,
final int defaultDrBufferSize,
fin... | java | public void initialize(
final int clusterIndex,
final long siteId,
final int partitionId,
final int sitesPerHost,
final int hostId,
final String hostname,
final int drClusterId,
final int defaultDrBufferSize,
fin... | [
"public",
"void",
"initialize",
"(",
"final",
"int",
"clusterIndex",
",",
"final",
"long",
"siteId",
",",
"final",
"int",
"partitionId",
",",
"final",
"int",
"sitesPerHost",
",",
"final",
"int",
"hostId",
",",
"final",
"String",
"hostname",
",",
"final",
"in... | the abstract api assumes construction initializes but here initialization
is just another command. | [
"the",
"abstract",
"api",
"assumes",
"construction",
"initializes",
"but",
"here",
"initialization",
"is",
"just",
"another",
"command",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngineIPC.java#L907-L949 |
61,691 | VoltDB/voltdb | src/frontend/org/voltdb/jni/ExecutionEngineIPC.java | ExecutionEngineIPC.coreLoadCatalog | @Override
protected void coreLoadCatalog(final long timestamp, final byte[] catalogBytes) throws EEException {
int result = ExecutionEngine.ERRORCODE_ERROR;
verifyDataCapacity(catalogBytes.length + 100);
m_data.clear();
m_data.putInt(Commands.LoadCatalog.m_id);
m_data.putLong... | java | @Override
protected void coreLoadCatalog(final long timestamp, final byte[] catalogBytes) throws EEException {
int result = ExecutionEngine.ERRORCODE_ERROR;
verifyDataCapacity(catalogBytes.length + 100);
m_data.clear();
m_data.putInt(Commands.LoadCatalog.m_id);
m_data.putLong... | [
"@",
"Override",
"protected",
"void",
"coreLoadCatalog",
"(",
"final",
"long",
"timestamp",
",",
"final",
"byte",
"[",
"]",
"catalogBytes",
")",
"throws",
"EEException",
"{",
"int",
"result",
"=",
"ExecutionEngine",
".",
"ERRORCODE_ERROR",
";",
"verifyDataCapacity... | write the catalog as a UTF-8 byte string via connection | [
"write",
"the",
"catalog",
"as",
"a",
"UTF",
"-",
"8",
"byte",
"string",
"via",
"connection"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngineIPC.java#L952-L971 |
61,692 | VoltDB/voltdb | src/frontend/org/voltdb/jni/ExecutionEngineIPC.java | ExecutionEngineIPC.coreUpdateCatalog | @Override
public void coreUpdateCatalog(final long timestamp, final boolean isStreamUpdate, final String catalogDiffs) throws EEException {
int result = ExecutionEngine.ERRORCODE_ERROR;
try {
final byte catalogBytes[] = catalogDiffs.getBytes("UTF-8");
verifyDataCapacity(cata... | java | @Override
public void coreUpdateCatalog(final long timestamp, final boolean isStreamUpdate, final String catalogDiffs) throws EEException {
int result = ExecutionEngine.ERRORCODE_ERROR;
try {
final byte catalogBytes[] = catalogDiffs.getBytes("UTF-8");
verifyDataCapacity(cata... | [
"@",
"Override",
"public",
"void",
"coreUpdateCatalog",
"(",
"final",
"long",
"timestamp",
",",
"final",
"boolean",
"isStreamUpdate",
",",
"final",
"String",
"catalogDiffs",
")",
"throws",
"EEException",
"{",
"int",
"result",
"=",
"ExecutionEngine",
".",
"ERRORCOD... | write the diffs as a UTF-8 byte string via connection | [
"write",
"the",
"diffs",
"as",
"a",
"UTF",
"-",
"8",
"byte",
"string",
"via",
"connection"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngineIPC.java#L974-L1001 |
61,693 | VoltDB/voltdb | src/frontend/org/voltdb/jni/ExecutionEngineIPC.java | ExecutionEngineIPC.sendDependencyTable | private void sendDependencyTable(final int dependencyId) throws IOException{
final byte[] dependencyBytes = nextDependencyAsBytes(dependencyId);
if (dependencyBytes == null) {
m_connection.m_socket.getOutputStream().write(Connection.kErrorCode_DependencyNotFound);
return;
... | java | private void sendDependencyTable(final int dependencyId) throws IOException{
final byte[] dependencyBytes = nextDependencyAsBytes(dependencyId);
if (dependencyBytes == null) {
m_connection.m_socket.getOutputStream().write(Connection.kErrorCode_DependencyNotFound);
return;
... | [
"private",
"void",
"sendDependencyTable",
"(",
"final",
"int",
"dependencyId",
")",
"throws",
"IOException",
"{",
"final",
"byte",
"[",
"]",
"dependencyBytes",
"=",
"nextDependencyAsBytes",
"(",
"dependencyId",
")",
";",
"if",
"(",
"dependencyBytes",
"==",
"null",... | Retrieve a dependency table and send it via the connection. If
no table is available send a response code indicating such.
The message is prepended with two lengths. One length is for
the network layer and is the size of the whole message not including
the length prefix.
@param dependencyId ID of the dependency table t... | [
"Retrieve",
"a",
"dependency",
"table",
"and",
"send",
"it",
"via",
"the",
"connection",
".",
"If",
"no",
"table",
"is",
"available",
"send",
"a",
"response",
"code",
"indicating",
"such",
".",
"The",
"message",
"is",
"prepended",
"with",
"two",
"lengths",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngineIPC.java#L1426-L1448 |
61,694 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/TransactionTaskQueue.java | TransactionTaskQueue.enableScoreboard | boolean enableScoreboard() {
assert (s_barrier != null);
try {
s_barrier.await(3L, TimeUnit.MINUTES);
} catch (InterruptedException | BrokenBarrierException |TimeoutException e) {
hostLog.error("Cannot re-enable the scoreboard.");
s_barrier.reset();
... | java | boolean enableScoreboard() {
assert (s_barrier != null);
try {
s_barrier.await(3L, TimeUnit.MINUTES);
} catch (InterruptedException | BrokenBarrierException |TimeoutException e) {
hostLog.error("Cannot re-enable the scoreboard.");
s_barrier.reset();
... | [
"boolean",
"enableScoreboard",
"(",
")",
"{",
"assert",
"(",
"s_barrier",
"!=",
"null",
")",
";",
"try",
"{",
"s_barrier",
".",
"await",
"(",
"3L",
",",
"TimeUnit",
".",
"MINUTES",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"|",
"BrokenBarrierExc... | After all sites has been fully initialized and ready for snapshot, we should enable the scoreboard. | [
"After",
"all",
"sites",
"has",
"been",
"fully",
"initialized",
"and",
"ready",
"for",
"snapshot",
"we",
"should",
"enable",
"the",
"scoreboard",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/TransactionTaskQueue.java#L169-L184 |
61,695 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/TransactionTaskQueue.java | TransactionTaskQueue.offer | synchronized void offer(TransactionTask task)
{
Iv2Trace.logTransactionTaskQueueOffer(task);
TransactionState txnState = task.getTransactionState();
if (!m_backlog.isEmpty()) {
/*
* This branch happens during regular execution when a multi-part is in progress.
... | java | synchronized void offer(TransactionTask task)
{
Iv2Trace.logTransactionTaskQueueOffer(task);
TransactionState txnState = task.getTransactionState();
if (!m_backlog.isEmpty()) {
/*
* This branch happens during regular execution when a multi-part is in progress.
... | [
"synchronized",
"void",
"offer",
"(",
"TransactionTask",
"task",
")",
"{",
"Iv2Trace",
".",
"logTransactionTaskQueueOffer",
"(",
"task",
")",
";",
"TransactionState",
"txnState",
"=",
"task",
".",
"getTransactionState",
"(",
")",
";",
"if",
"(",
"!",
"m_backlog"... | If necessary, stick this task in the backlog.
Many network threads may be racing to reach here, synchronize to
serialize queue order
@param task | [
"If",
"necessary",
"stick",
"this",
"task",
"in",
"the",
"backlog",
".",
"Many",
"network",
"threads",
"may",
"be",
"racing",
"to",
"reach",
"here",
"synchronize",
"to",
"serialize",
"queue",
"order"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/TransactionTaskQueue.java#L210-L267 |
61,696 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/TransactionTaskQueue.java | TransactionTaskQueue.flush | synchronized int flush(long txnId)
{
if (tmLog.isDebugEnabled()) {
tmLog.debug("Flush backlog with txnId:" + TxnEgo.txnIdToString(txnId) +
", backlog head txnId is:" + (m_backlog.isEmpty()? "empty" : TxnEgo.txnIdToString(m_backlog.getFirst().getTxnId()))
)... | java | synchronized int flush(long txnId)
{
if (tmLog.isDebugEnabled()) {
tmLog.debug("Flush backlog with txnId:" + TxnEgo.txnIdToString(txnId) +
", backlog head txnId is:" + (m_backlog.isEmpty()? "empty" : TxnEgo.txnIdToString(m_backlog.getFirst().getTxnId()))
)... | [
"synchronized",
"int",
"flush",
"(",
"long",
"txnId",
")",
"{",
"if",
"(",
"tmLog",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"tmLog",
".",
"debug",
"(",
"\"Flush backlog with txnId:\"",
"+",
"TxnEgo",
".",
"txnIdToString",
"(",
"txnId",
")",
"+",
"\", ba... | Try to offer as many runnable Tasks to the SiteTaskerQueue as possible.
@param txnId The transaction ID of the TransactionTask which is completing and causing the flush
@return the number of TransactionTasks queued to the SiteTaskerQueue | [
"Try",
"to",
"offer",
"as",
"many",
"runnable",
"Tasks",
"to",
"the",
"SiteTaskerQueue",
"as",
"possible",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/TransactionTaskQueue.java#L382-L449 |
61,697 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/TransactionTaskQueue.java | TransactionTaskQueue.getBacklogTasks | public synchronized List<TransactionTask> getBacklogTasks() {
List<TransactionTask> pendingTasks = new ArrayList<>();
Iterator<TransactionTask> iter = m_backlog.iterator();
// skip the first fragments which is streaming snapshot
TransactionTask mpTask = iter.next();
assert (!mpTa... | java | public synchronized List<TransactionTask> getBacklogTasks() {
List<TransactionTask> pendingTasks = new ArrayList<>();
Iterator<TransactionTask> iter = m_backlog.iterator();
// skip the first fragments which is streaming snapshot
TransactionTask mpTask = iter.next();
assert (!mpTa... | [
"public",
"synchronized",
"List",
"<",
"TransactionTask",
">",
"getBacklogTasks",
"(",
")",
"{",
"List",
"<",
"TransactionTask",
">",
"pendingTasks",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"Iterator",
"<",
"TransactionTask",
">",
"iter",
"=",
"m_backlog... | Called from streaming snapshot execution | [
"Called",
"from",
"streaming",
"snapshot",
"execution"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/TransactionTaskQueue.java#L505-L521 |
61,698 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/TransactionTaskQueue.java | TransactionTaskQueue.removeMPReadTransactions | public synchronized void removeMPReadTransactions() {
TransactionTask task = m_backlog.peekFirst();
while (task != null && task.getTransactionState().isReadOnly()) {
task.getTransactionState().setDone();
flush(task.getTxnId());
task = m_backlog.peekFirst();
}... | java | public synchronized void removeMPReadTransactions() {
TransactionTask task = m_backlog.peekFirst();
while (task != null && task.getTransactionState().isReadOnly()) {
task.getTransactionState().setDone();
flush(task.getTxnId());
task = m_backlog.peekFirst();
}... | [
"public",
"synchronized",
"void",
"removeMPReadTransactions",
"(",
")",
"{",
"TransactionTask",
"task",
"=",
"m_backlog",
".",
"peekFirst",
"(",
")",
";",
"while",
"(",
"task",
"!=",
"null",
"&&",
"task",
".",
"getTransactionState",
"(",
")",
".",
"isReadOnly"... | flush mp readonly transactions out of backlog | [
"flush",
"mp",
"readonly",
"transactions",
"out",
"of",
"backlog"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/TransactionTaskQueue.java#L524-L531 |
61,699 | VoltDB/voltdb | src/frontend/org/voltdb/types/GeographyValue.java | GeographyValue.getRings | public List<List<GeographyPointValue>> getRings() {
/*
* Gets the loops that make up the polygon, with the outer loop first.
* Note that we need to convert from XYZPoint to GeographyPointValue.
*
* Include the loop back to the first vertex. Also, since WKT wants
* h... | java | public List<List<GeographyPointValue>> getRings() {
/*
* Gets the loops that make up the polygon, with the outer loop first.
* Note that we need to convert from XYZPoint to GeographyPointValue.
*
* Include the loop back to the first vertex. Also, since WKT wants
* h... | [
"public",
"List",
"<",
"List",
"<",
"GeographyPointValue",
">",
">",
"getRings",
"(",
")",
"{",
"/*\n * Gets the loops that make up the polygon, with the outer loop first.\n * Note that we need to convert from XYZPoint to GeographyPointValue.\n *\n * Include t... | Return the list of rings of a polygon. The list has the same
values as the list of rings used to construct the polygon, or
the sequence of WKT rings used to construct the polygon.
@return A list of rings. | [
"Return",
"the",
"list",
"of",
"rings",
"of",
"a",
"polygon",
".",
"The",
"list",
"has",
"the",
"same",
"values",
"as",
"the",
"list",
"of",
"rings",
"used",
"to",
"construct",
"the",
"polygon",
"or",
"the",
"sequence",
"of",
"WKT",
"rings",
"used",
"t... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/GeographyValue.java#L205-L237 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.