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,200 | VoltDB/voltdb | src/frontend/org/voltcore/agreement/MeshArbiter.java | MeshArbiter.reconfigureOnFault | Map<Long, Long> reconfigureOnFault(Set<Long> hsIds, FaultMessage fm) {
return reconfigureOnFault(hsIds, fm, new HashSet<Long>());
} | java | Map<Long, Long> reconfigureOnFault(Set<Long> hsIds, FaultMessage fm) {
return reconfigureOnFault(hsIds, fm, new HashSet<Long>());
} | [
"Map",
"<",
"Long",
",",
"Long",
">",
"reconfigureOnFault",
"(",
"Set",
"<",
"Long",
">",
"hsIds",
",",
"FaultMessage",
"fm",
")",
"{",
"return",
"reconfigureOnFault",
"(",
"hsIds",
",",
"fm",
",",
"new",
"HashSet",
"<",
"Long",
">",
"(",
")",
")",
"... | Convenience wrapper for tests that don't care about unknown sites | [
"Convenience",
"wrapper",
"for",
"tests",
"that",
"don",
"t",
"care",
"about",
"unknown",
"sites"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/MeshArbiter.java#L259-L261 |
61,201 | VoltDB/voltdb | src/frontend/org/voltcore/agreement/MeshArbiter.java | MeshArbiter.reconfigureOnFault | public Map<Long, Long> reconfigureOnFault(Set<Long> hsIds, FaultMessage fm, Set<Long> unknownFaultedSites) {
boolean proceed = false;
do {
Discard ignoreIt = mayIgnore(hsIds, fm);
if (Discard.DoNot == ignoreIt) {
m_inTrouble.put(fm.failedSite, fm.witnessed || fm.d... | java | public Map<Long, Long> reconfigureOnFault(Set<Long> hsIds, FaultMessage fm, Set<Long> unknownFaultedSites) {
boolean proceed = false;
do {
Discard ignoreIt = mayIgnore(hsIds, fm);
if (Discard.DoNot == ignoreIt) {
m_inTrouble.put(fm.failedSite, fm.witnessed || fm.d... | [
"public",
"Map",
"<",
"Long",
",",
"Long",
">",
"reconfigureOnFault",
"(",
"Set",
"<",
"Long",
">",
"hsIds",
",",
"FaultMessage",
"fm",
",",
"Set",
"<",
"Long",
">",
"unknownFaultedSites",
")",
"{",
"boolean",
"proceed",
"=",
"false",
";",
"do",
"{",
"... | Process the fault message, and if necessary start arbitration.
@param hsIds pre-failure mesh ids
@param fm a {@link FaultMessage}
@param unknownFaultedSites Sites that we don't know about, but are informed
have failed; tracked here so that we can remove the associated hosts
@return a map where the keys are the sites we... | [
"Process",
"the",
"fault",
"message",
"and",
"if",
"necessary",
"start",
"arbitration",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/MeshArbiter.java#L276-L345 |
61,202 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/saverestore/IndexSnapshotWritePlan.java | IndexSnapshotWritePlan.createIndexExpressionForTable | public static AbstractExpression createIndexExpressionForTable(Table table, Map<Integer, Integer> ranges)
{
HashRangeExpression predicate = new HashRangeExpression();
predicate.setRanges(ranges);
predicate.setHashColumnIndex(table.getPartitioncolumn().getIndex());
return predicate;
... | java | public static AbstractExpression createIndexExpressionForTable(Table table, Map<Integer, Integer> ranges)
{
HashRangeExpression predicate = new HashRangeExpression();
predicate.setRanges(ranges);
predicate.setHashColumnIndex(table.getPartitioncolumn().getIndex());
return predicate;
... | [
"public",
"static",
"AbstractExpression",
"createIndexExpressionForTable",
"(",
"Table",
"table",
",",
"Map",
"<",
"Integer",
",",
"Integer",
">",
"ranges",
")",
"{",
"HashRangeExpression",
"predicate",
"=",
"new",
"HashRangeExpression",
"(",
")",
";",
"predicate",
... | Create the expression used to build elastic index for a given table.
@param table The table to build the elastic index on
@param ranges The hash ranges that the index should include | [
"Create",
"the",
"expression",
"used",
"to",
"build",
"elastic",
"index",
"for",
"a",
"given",
"table",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/IndexSnapshotWritePlan.java#L116-L123 |
61,203 | VoltDB/voltdb | examples/bank-offers/client/bankoffers/OfferBenchmark.java | OfferBenchmark.initialize | public void initialize() throws Exception {
List<Long> acctList = new ArrayList<Long>(config.custcount*2);
List<String> stList = new ArrayList<String>(config.custcount*2);
// generate customers
System.out.println("generating " + config.custcount + " customers...");
for (int c=0... | java | public void initialize() throws Exception {
List<Long> acctList = new ArrayList<Long>(config.custcount*2);
List<String> stList = new ArrayList<String>(config.custcount*2);
// generate customers
System.out.println("generating " + config.custcount + " customers...");
for (int c=0... | [
"public",
"void",
"initialize",
"(",
")",
"throws",
"Exception",
"{",
"List",
"<",
"Long",
">",
"acctList",
"=",
"new",
"ArrayList",
"<",
"Long",
">",
"(",
"config",
".",
"custcount",
"*",
"2",
")",
";",
"List",
"<",
"String",
">",
"stList",
"=",
"ne... | this gets run once before the benchmark begins | [
"this",
"gets",
"run",
"once",
"before",
"the",
"benchmark",
"begins"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/bank-offers/client/bankoffers/OfferBenchmark.java#L331-L398 |
61,204 | VoltDB/voltdb | src/frontend/org/voltcore/zk/CoreZK.java | CoreZK.createHierarchy | public static void createHierarchy(ZooKeeper zk) {
LinkedList<ZKUtil.StringCallback> callbacks = new LinkedList<ZKUtil.StringCallback>();
for (String node : CoreZK.ZK_HIERARCHY) {
ZKUtil.StringCallback cb = new ZKUtil.StringCallback();
callbacks.add(cb);
z... | java | public static void createHierarchy(ZooKeeper zk) {
LinkedList<ZKUtil.StringCallback> callbacks = new LinkedList<ZKUtil.StringCallback>();
for (String node : CoreZK.ZK_HIERARCHY) {
ZKUtil.StringCallback cb = new ZKUtil.StringCallback();
callbacks.add(cb);
z... | [
"public",
"static",
"void",
"createHierarchy",
"(",
"ZooKeeper",
"zk",
")",
"{",
"LinkedList",
"<",
"ZKUtil",
".",
"StringCallback",
">",
"callbacks",
"=",
"new",
"LinkedList",
"<",
"ZKUtil",
".",
"StringCallback",
">",
"(",
")",
";",
"for",
"(",
"String",
... | Creates the ZK directory nodes. Only the leader should do this. | [
"Creates",
"the",
"ZK",
"directory",
"nodes",
".",
"Only",
"the",
"leader",
"should",
"do",
"this",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/CoreZK.java#L69-L84 |
61,205 | VoltDB/voltdb | src/frontend/org/voltcore/zk/CoreZK.java | CoreZK.createRejoinNodeIndicator | public static int createRejoinNodeIndicator(ZooKeeper zk, int hostId)
{
try {
zk.create(rejoin_node_blocker,
ByteBuffer.allocate(4).putInt(hostId).array(),
Ids.OPEN_ACL_UNSAFE,
CreateMode.PERSISTENT);
} catch (KeeperExcept... | java | public static int createRejoinNodeIndicator(ZooKeeper zk, int hostId)
{
try {
zk.create(rejoin_node_blocker,
ByteBuffer.allocate(4).putInt(hostId).array(),
Ids.OPEN_ACL_UNSAFE,
CreateMode.PERSISTENT);
} catch (KeeperExcept... | [
"public",
"static",
"int",
"createRejoinNodeIndicator",
"(",
"ZooKeeper",
"zk",
",",
"int",
"hostId",
")",
"{",
"try",
"{",
"zk",
".",
"create",
"(",
"rejoin_node_blocker",
",",
"ByteBuffer",
".",
"allocate",
"(",
"4",
")",
".",
"putInt",
"(",
"hostId",
")... | Creates a rejoin blocker for the given rejoining host.
This prevents other hosts from rejoining at the same time.
@param zk ZooKeeper client
@param hostId The rejoining host ID
@return -1 if the blocker is created successfully, or the host ID
if there is already another host rejoining. | [
"Creates",
"a",
"rejoin",
"blocker",
"for",
"the",
"given",
"rejoining",
"host",
".",
"This",
"prevents",
"other",
"hosts",
"from",
"rejoining",
"at",
"the",
"same",
"time",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/CoreZK.java#L113-L137 |
61,206 | VoltDB/voltdb | src/frontend/org/voltcore/zk/CoreZK.java | CoreZK.removeRejoinNodeIndicatorForHost | public static boolean removeRejoinNodeIndicatorForHost(ZooKeeper zk, int hostId)
{
try {
Stat stat = new Stat();
final int rejoiningHost = ByteBuffer.wrap(zk.getData(rejoin_node_blocker, false, stat)).getInt();
if (hostId == rejoiningHost) {
zk.delete(rejo... | java | public static boolean removeRejoinNodeIndicatorForHost(ZooKeeper zk, int hostId)
{
try {
Stat stat = new Stat();
final int rejoiningHost = ByteBuffer.wrap(zk.getData(rejoin_node_blocker, false, stat)).getInt();
if (hostId == rejoiningHost) {
zk.delete(rejo... | [
"public",
"static",
"boolean",
"removeRejoinNodeIndicatorForHost",
"(",
"ZooKeeper",
"zk",
",",
"int",
"hostId",
")",
"{",
"try",
"{",
"Stat",
"stat",
"=",
"new",
"Stat",
"(",
")",
";",
"final",
"int",
"rejoiningHost",
"=",
"ByteBuffer",
".",
"wrap",
"(",
... | Removes the rejoin blocker if the current rejoin blocker contains the given host ID.
@return true if the blocker is removed successfully, false otherwise. | [
"Removes",
"the",
"rejoin",
"blocker",
"if",
"the",
"current",
"rejoin",
"blocker",
"contains",
"the",
"given",
"host",
"ID",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/CoreZK.java#L143-L162 |
61,207 | VoltDB/voltdb | src/frontend/org/voltcore/zk/CoreZK.java | CoreZK.removeJoinNodeIndicatorForHost | public static boolean removeJoinNodeIndicatorForHost(ZooKeeper zk, int hostId)
{
try {
Stat stat = new Stat();
String path = ZKUtil.joinZKPath(readyjoininghosts, Integer.toString(hostId));
zk.getData(path, false, stat);
zk.delete(path, stat.getVersion());
... | java | public static boolean removeJoinNodeIndicatorForHost(ZooKeeper zk, int hostId)
{
try {
Stat stat = new Stat();
String path = ZKUtil.joinZKPath(readyjoininghosts, Integer.toString(hostId));
zk.getData(path, false, stat);
zk.delete(path, stat.getVersion());
... | [
"public",
"static",
"boolean",
"removeJoinNodeIndicatorForHost",
"(",
"ZooKeeper",
"zk",
",",
"int",
"hostId",
")",
"{",
"try",
"{",
"Stat",
"stat",
"=",
"new",
"Stat",
"(",
")",
";",
"String",
"path",
"=",
"ZKUtil",
".",
"joinZKPath",
"(",
"readyjoininghost... | Removes the join indicator for the given host ID.
@return true if the indicator is removed successfully, false otherwise. | [
"Removes",
"the",
"join",
"indicator",
"for",
"the",
"given",
"host",
"ID",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/CoreZK.java#L168-L186 |
61,208 | VoltDB/voltdb | src/frontend/org/voltcore/zk/CoreZK.java | CoreZK.isPartitionCleanupInProgress | public static boolean isPartitionCleanupInProgress(ZooKeeper zk) throws KeeperException, InterruptedException
{
List<String> children = zk.getChildren(VoltZK.leaders_initiators, null);
List<ZKUtil.ChildrenCallback> childrenCallbacks = Lists.newArrayList();
for (String child : children) {
... | java | public static boolean isPartitionCleanupInProgress(ZooKeeper zk) throws KeeperException, InterruptedException
{
List<String> children = zk.getChildren(VoltZK.leaders_initiators, null);
List<ZKUtil.ChildrenCallback> childrenCallbacks = Lists.newArrayList();
for (String child : children) {
... | [
"public",
"static",
"boolean",
"isPartitionCleanupInProgress",
"(",
"ZooKeeper",
"zk",
")",
"throws",
"KeeperException",
",",
"InterruptedException",
"{",
"List",
"<",
"String",
">",
"children",
"=",
"zk",
".",
"getChildren",
"(",
"VoltZK",
".",
"leaders_initiators"... | Checks if the cluster suffered an aborted join or node shutdown and is still in the process of cleaning up.
@param zk ZooKeeper client
@return true if the cluster is still cleaning up.
@throws KeeperException
@throws InterruptedException | [
"Checks",
"if",
"the",
"cluster",
"suffered",
"an",
"aborted",
"join",
"or",
"node",
"shutdown",
"and",
"is",
"still",
"in",
"the",
"process",
"of",
"cleaning",
"up",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/CoreZK.java#L195-L212 |
61,209 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java | ColumnSchema.isNullable | public boolean isNullable() {
boolean isNullable = super.isNullable();
if (isNullable) {
if (dataType.isDomainType()) {
return dataType.userTypeModifier.isNullable();
}
}
return isNullable;
} | java | public boolean isNullable() {
boolean isNullable = super.isNullable();
if (isNullable) {
if (dataType.isDomainType()) {
return dataType.userTypeModifier.isNullable();
}
}
return isNullable;
} | [
"public",
"boolean",
"isNullable",
"(",
")",
"{",
"boolean",
"isNullable",
"=",
"super",
".",
"isNullable",
"(",
")",
";",
"if",
"(",
"isNullable",
")",
"{",
"if",
"(",
"dataType",
".",
"isDomainType",
"(",
")",
")",
"{",
"return",
"dataType",
".",
"us... | Is column nullable.
@return boolean | [
"Is",
"column",
"nullable",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java#L182-L193 |
61,210 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java | ColumnSchema.getDefaultValue | Object getDefaultValue(Session session) {
return defaultExpression == null ? null
: defaultExpression.getValue(session,
dataType);
} | java | Object getDefaultValue(Session session) {
return defaultExpression == null ? null
: defaultExpression.getValue(session,
dataType);
} | [
"Object",
"getDefaultValue",
"(",
"Session",
"session",
")",
"{",
"return",
"defaultExpression",
"==",
"null",
"?",
"null",
":",
"defaultExpression",
".",
"getValue",
"(",
"session",
",",
"dataType",
")",
";",
"}"
] | Returns default value in the session context. | [
"Returns",
"default",
"value",
"in",
"the",
"session",
"context",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java#L245-L250 |
61,211 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java | ColumnSchema.getGeneratedValue | Object getGeneratedValue(Session session) {
return generatingExpression == null ? null
: generatingExpression.getValue(
session, dataType);
} | java | Object getGeneratedValue(Session session) {
return generatingExpression == null ? null
: generatingExpression.getValue(
session, dataType);
} | [
"Object",
"getGeneratedValue",
"(",
"Session",
"session",
")",
"{",
"return",
"generatingExpression",
"==",
"null",
"?",
"null",
":",
"generatingExpression",
".",
"getValue",
"(",
"session",
",",
"dataType",
")",
";",
"}"
] | Returns generated value in the session context. | [
"Returns",
"generated",
"value",
"in",
"the",
"session",
"context",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java#L255-L260 |
61,212 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java | ColumnSchema.getDefaultSQL | public String getDefaultSQL() {
String ddl = null;
ddl = defaultExpression == null ? null
: defaultExpression.getSQL();
return ddl;
} | java | public String getDefaultSQL() {
String ddl = null;
ddl = defaultExpression == null ? null
: defaultExpression.getSQL();
return ddl;
} | [
"public",
"String",
"getDefaultSQL",
"(",
")",
"{",
"String",
"ddl",
"=",
"null",
";",
"ddl",
"=",
"defaultExpression",
"==",
"null",
"?",
"null",
":",
"defaultExpression",
".",
"getSQL",
"(",
")",
";",
"return",
"ddl",
";",
"}"
] | Returns SQL for default value. | [
"Returns",
"SQL",
"for",
"default",
"value",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java#L265-L273 |
61,213 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java | ColumnSchema.getDefaultExpression | Expression getDefaultExpression() {
if (defaultExpression == null) {
if (dataType.isDomainType()) {
return dataType.userTypeModifier.getDefaultClause();
}
return null;
} else {
return defaultExpression;
}
} | java | Expression getDefaultExpression() {
if (defaultExpression == null) {
if (dataType.isDomainType()) {
return dataType.userTypeModifier.getDefaultClause();
}
return null;
} else {
return defaultExpression;
}
} | [
"Expression",
"getDefaultExpression",
"(",
")",
"{",
"if",
"(",
"defaultExpression",
"==",
"null",
")",
"{",
"if",
"(",
"dataType",
".",
"isDomainType",
"(",
")",
")",
"{",
"return",
"dataType",
".",
"userTypeModifier",
".",
"getDefaultClause",
"(",
")",
";"... | Returns default expression for the column. | [
"Returns",
"default",
"expression",
"for",
"the",
"column",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ColumnSchema.java#L278-L289 |
61,214 | VoltDB/voltdb | src/frontend/org/voltdb/SnapshotSaveAPI.java | SnapshotSaveAPI.createSnapshotCompletionNode | public static ZKUtil.StringCallback createSnapshotCompletionNode(String path,
String pathType,
String nonce,
long... | java | public static ZKUtil.StringCallback createSnapshotCompletionNode(String path,
String pathType,
String nonce,
long... | [
"public",
"static",
"ZKUtil",
".",
"StringCallback",
"createSnapshotCompletionNode",
"(",
"String",
"path",
",",
"String",
"pathType",
",",
"String",
"nonce",
",",
"long",
"txnId",
",",
"boolean",
"isTruncation",
",",
"String",
"truncReqId",
")",
"{",
"if",
"(",... | Create the completion node for the snapshot identified by the txnId. It
assumes that all hosts will race to call this, so it doesn't fail if the
node already exists.
@param nonce Nonce of the snapshot
@param txnId
@param hostId The local host ID
@param isTruncation Whether or not this is a truncation snapshot
@param t... | [
"Create",
"the",
"completion",
"node",
"for",
"the",
"snapshot",
"identified",
"by",
"the",
"txnId",
".",
"It",
"assumes",
"that",
"all",
"hosts",
"will",
"race",
"to",
"call",
"this",
"so",
"it",
"doesn",
"t",
"fail",
"if",
"the",
"node",
"already",
"ex... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SnapshotSaveAPI.java#L394-L431 |
61,215 | VoltDB/voltdb | src/frontend/org/voltdb/SnapshotSaveAPI.java | SnapshotSaveAPI.logParticipatingHostCount | public static void logParticipatingHostCount(long txnId, int participantCount) {
ZooKeeper zk = VoltDB.instance().getHostMessenger().getZK();
final String snapshotPath = VoltZK.completed_snapshots + "/" + txnId;
boolean success = false;
while (!success) {
Stat stat = new Sta... | java | public static void logParticipatingHostCount(long txnId, int participantCount) {
ZooKeeper zk = VoltDB.instance().getHostMessenger().getZK();
final String snapshotPath = VoltZK.completed_snapshots + "/" + txnId;
boolean success = false;
while (!success) {
Stat stat = new Sta... | [
"public",
"static",
"void",
"logParticipatingHostCount",
"(",
"long",
"txnId",
",",
"int",
"participantCount",
")",
"{",
"ZooKeeper",
"zk",
"=",
"VoltDB",
".",
"instance",
"(",
")",
".",
"getHostMessenger",
"(",
")",
".",
"getZK",
"(",
")",
";",
"final",
"... | Once participating host count is set, SnapshotCompletionMonitor can check this ZK node to
determine whether the snapshot has finished or not.
This should only be called when all participants have responded. It is possible that some
hosts finish taking snapshot before the coordinator logs the participating host count. ... | [
"Once",
"participating",
"host",
"count",
"is",
"set",
"SnapshotCompletionMonitor",
"can",
"check",
"this",
"ZK",
"node",
"to",
"determine",
"whether",
"the",
"snapshot",
"has",
"finished",
"or",
"not",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SnapshotSaveAPI.java#L446-L488 |
61,216 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/ManagedPoolDataSource.java | ManagedPoolDataSource.close | public synchronized void close() {
this.isPoolClosed = true;
while (this.connectionsInactive.size() > 0) {
PooledConnection connection = dequeueFirstIfAny();
if (connection != null) {
closePhysically(
connection,
"closing... | java | public synchronized void close() {
this.isPoolClosed = true;
while (this.connectionsInactive.size() > 0) {
PooledConnection connection = dequeueFirstIfAny();
if (connection != null) {
closePhysically(
connection,
"closing... | [
"public",
"synchronized",
"void",
"close",
"(",
")",
"{",
"this",
".",
"isPoolClosed",
"=",
"true",
";",
"while",
"(",
"this",
".",
"connectionsInactive",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"PooledConnection",
"connection",
"=",
"dequeueFirstIfAny",
... | Closes this connection pool. No further connections can be obtained from it after this.
All inactive connections are physically closed before the call returns.
Active connections are not closed.
There may still be active connections in use after this method returns.
When these connections are closed and returned to the... | [
"Closes",
"this",
"connection",
"pool",
".",
"No",
"further",
"connections",
"can",
"be",
"obtained",
"from",
"it",
"after",
"this",
".",
"All",
"inactive",
"connections",
"are",
"physically",
"closed",
"before",
"the",
"call",
"returns",
".",
"Active",
"conne... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/ManagedPoolDataSource.java#L798-L811 |
61,217 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/ManagedPoolDataSource.java | ManagedPoolDataSource.closeImmediatedly | public synchronized void closeImmediatedly() {
close();
Iterator iterator = this.connectionsInUse.iterator();
while (iterator.hasNext()) {
PooledConnection connection = (PooledConnection) iterator.next();
SessionConnectionWrapper sessionWrapper =
(Sessi... | java | public synchronized void closeImmediatedly() {
close();
Iterator iterator = this.connectionsInUse.iterator();
while (iterator.hasNext()) {
PooledConnection connection = (PooledConnection) iterator.next();
SessionConnectionWrapper sessionWrapper =
(Sessi... | [
"public",
"synchronized",
"void",
"closeImmediatedly",
"(",
")",
"{",
"close",
"(",
")",
";",
"Iterator",
"iterator",
"=",
"this",
".",
"connectionsInUse",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"Poo... | Closes this connection | [
"Closes",
"this",
"connection"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/ManagedPoolDataSource.java#L831-L847 |
61,218 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/ManagedPoolDataSource.java | ManagedPoolDataSource.setDriverClassName | public void setDriverClassName(String driverClassName) {
if (driverClassName.equals(JDBCConnectionPoolDataSource.driver)) {
return;
}
/** @todo: Use a HSQLDB RuntimeException subclass */
throw new RuntimeException("This class only supports JDBC driver '"
... | java | public void setDriverClassName(String driverClassName) {
if (driverClassName.equals(JDBCConnectionPoolDataSource.driver)) {
return;
}
/** @todo: Use a HSQLDB RuntimeException subclass */
throw new RuntimeException("This class only supports JDBC driver '"
... | [
"public",
"void",
"setDriverClassName",
"(",
"String",
"driverClassName",
")",
"{",
"if",
"(",
"driverClassName",
".",
"equals",
"(",
"JDBCConnectionPoolDataSource",
".",
"driver",
")",
")",
"{",
"return",
";",
"}",
"/** @todo: Use a HSQLDB RuntimeException subclass */"... | For compatibility.
@param driverClassName must be the main JDBC driver class name. | [
"For",
"compatibility",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/ManagedPoolDataSource.java#L976-L986 |
61,219 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/WindowFunctionPlanNode.java | WindowFunctionPlanNode.toJSONString | @Override
public void toJSONString(JSONStringer stringer) throws JSONException {
super.toJSONString(stringer);
stringer.key("AGGREGATE_COLUMNS")
.array();
for (int ii = 0; ii < m_aggregateTypes.size(); ii++) {
stringer.object();
stringer.keySymbolValue... | java | @Override
public void toJSONString(JSONStringer stringer) throws JSONException {
super.toJSONString(stringer);
stringer.key("AGGREGATE_COLUMNS")
.array();
for (int ii = 0; ii < m_aggregateTypes.size(); ii++) {
stringer.object();
stringer.keySymbolValue... | [
"@",
"Override",
"public",
"void",
"toJSONString",
"(",
"JSONStringer",
"stringer",
")",
"throws",
"JSONException",
"{",
"super",
".",
"toJSONString",
"(",
"stringer",
")",
";",
"stringer",
".",
"key",
"(",
"\"AGGREGATE_COLUMNS\"",
")",
".",
"array",
"(",
")",... | Serialize to JSON. We only serialize the expressions, and not the
directions. We won't need them in the executor. The directions will
be in the order by plan node in any case. | [
"Serialize",
"to",
"JSON",
".",
"We",
"only",
"serialize",
"the",
"expressions",
"and",
"not",
"the",
"directions",
".",
"We",
"won",
"t",
"need",
"them",
"in",
"the",
"executor",
".",
"The",
"directions",
"will",
"be",
"in",
"the",
"order",
"by",
"plan"... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/WindowFunctionPlanNode.java#L125-L146 |
61,220 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/WindowFunctionPlanNode.java | WindowFunctionPlanNode.loadFromJSONObject | @Override
public void loadFromJSONObject(JSONObject jobj, Database db)
throws JSONException {
helpLoadFromJSONObject(jobj, db);
JSONArray jarray = jobj.getJSONArray( Members.AGGREGATE_COLUMNS.name() );
int size = jarray.length();
for (int i = 0; i < size; i++) {
... | java | @Override
public void loadFromJSONObject(JSONObject jobj, Database db)
throws JSONException {
helpLoadFromJSONObject(jobj, db);
JSONArray jarray = jobj.getJSONArray( Members.AGGREGATE_COLUMNS.name() );
int size = jarray.length();
for (int i = 0; i < size; i++) {
... | [
"@",
"Override",
"public",
"void",
"loadFromJSONObject",
"(",
"JSONObject",
"jobj",
",",
"Database",
"db",
")",
"throws",
"JSONException",
"{",
"helpLoadFromJSONObject",
"(",
"jobj",
",",
"db",
")",
";",
"JSONArray",
"jarray",
"=",
"jobj",
".",
"getJSONArray",
... | Deserialize a PartitionByPlanNode from JSON. Since we don't need the
sort directions, and we don't serialize them in toJSONString, then we
can't in general get them here. | [
"Deserialize",
"a",
"PartitionByPlanNode",
"from",
"JSON",
".",
"Since",
"we",
"don",
"t",
"need",
"the",
"sort",
"directions",
"and",
"we",
"don",
"t",
"serialize",
"them",
"in",
"toJSONString",
"then",
"we",
"can",
"t",
"in",
"general",
"get",
"them",
"h... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/WindowFunctionPlanNode.java#L153-L180 |
61,221 | VoltDB/voltdb | src/frontend/org/voltcore/utils/LatencyWatchdog.java | LatencyWatchdog.run | @Override
public void run() {
Thread.currentThread().setName("Latency Watchdog");
LOG.info(String.format("Latency Watchdog enabled -- threshold:%d(ms) " +
"wakeup_interval:%d(ms) min_log_interval:%d(ms)\n",
WATCHDOG_THRESHOLD, WAKEUP_INTE... | java | @Override
public void run() {
Thread.currentThread().setName("Latency Watchdog");
LOG.info(String.format("Latency Watchdog enabled -- threshold:%d(ms) " +
"wakeup_interval:%d(ms) min_log_interval:%d(ms)\n",
WATCHDOG_THRESHOLD, WAKEUP_INTE... | [
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"Thread",
".",
"currentThread",
"(",
")",
".",
"setName",
"(",
"\"Latency Watchdog\"",
")",
";",
"LOG",
".",
"info",
"(",
"String",
".",
"format",
"(",
"\"Latency Watchdog enabled -- threshold:%d(ms) \"",
... | The watchdog thread will be invoked every WAKEUP_INTERVAL time, to check if any thread that be monitored
has not updated its time stamp more than WATCHDOG_THRESHOLD millisecond. Same stack trace messages are
rate limited by MIN_LOG_INTERVAL. | [
"The",
"watchdog",
"thread",
"will",
"be",
"invoked",
"every",
"WAKEUP_INTERVAL",
"time",
"to",
"check",
"if",
"any",
"thread",
"that",
"be",
"monitored",
"has",
"not",
"updated",
"its",
"time",
"stamp",
"more",
"than",
"WATCHDOG_THRESHOLD",
"millisecond",
".",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/utils/LatencyWatchdog.java#L80-L107 |
61,222 | VoltDB/voltdb | src/frontend/org/voltdb/ProcedurePartitionData.java | ProcedurePartitionData.fromPartitionInfoString | public static ProcedurePartitionData fromPartitionInfoString(String partitionInfoString) {
if (partitionInfoString == null || partitionInfoString.trim().isEmpty()) {
return new ProcedurePartitionData();
}
String[] partitionInfoParts = new String[0];
partitionInfoParts = part... | java | public static ProcedurePartitionData fromPartitionInfoString(String partitionInfoString) {
if (partitionInfoString == null || partitionInfoString.trim().isEmpty()) {
return new ProcedurePartitionData();
}
String[] partitionInfoParts = new String[0];
partitionInfoParts = part... | [
"public",
"static",
"ProcedurePartitionData",
"fromPartitionInfoString",
"(",
"String",
"partitionInfoString",
")",
"{",
"if",
"(",
"partitionInfoString",
"==",
"null",
"||",
"partitionInfoString",
".",
"trim",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"return... | For Testing usage ONLY.
From a partition information string to @ProcedurePartitionData
string format:
1) String.format("%s.%s: %s", tableName, columnName, parameterNo)
1) String.format("%s.%s: %s, %s.%s: %s", tableName, columnName, parameterNo, tableName2, columnName2, parameterNo2)
@return | [
"For",
"Testing",
"usage",
"ONLY",
".",
"From",
"a",
"partition",
"information",
"string",
"to"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ProcedurePartitionData.java#L107-L141 |
61,223 | VoltDB/voltdb | src/frontend/org/voltdb/PostGISBackend.java | PostGISBackend.runDDL | @Override
public void runDDL(String ddl) {
String modifiedDdl = transformDDL(ddl);
printTransformedSql(ddl, modifiedDdl);
super.runDDL(modifiedDdl, false);
} | java | @Override
public void runDDL(String ddl) {
String modifiedDdl = transformDDL(ddl);
printTransformedSql(ddl, modifiedDdl);
super.runDDL(modifiedDdl, false);
} | [
"@",
"Override",
"public",
"void",
"runDDL",
"(",
"String",
"ddl",
")",
"{",
"String",
"modifiedDdl",
"=",
"transformDDL",
"(",
"ddl",
")",
";",
"printTransformedSql",
"(",
"ddl",
",",
"modifiedDdl",
")",
";",
"super",
".",
"runDDL",
"(",
"modifiedDdl",
",... | Modifies DDL statements in such a way that PostGIS results will match
VoltDB results, and then passes the remaining work to the base class
version. | [
"Modifies",
"DDL",
"statements",
"in",
"such",
"a",
"way",
"that",
"PostGIS",
"results",
"will",
"match",
"VoltDB",
"results",
"and",
"then",
"passes",
"the",
"remaining",
"work",
"to",
"the",
"base",
"class",
"version",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/PostGISBackend.java#L325-L330 |
61,224 | VoltDB/voltdb | src/frontend/org/voltdb/ProcedureRunnerNT.java | ProcedureRunnerNT.allHostNTProcedureCallback | public void allHostNTProcedureCallback(ClientResponse clientResponse) {
synchronized(m_allHostCallbackLock) {
int hostId = Integer.parseInt(clientResponse.getAppStatusString());
boolean removed = m_outstandingAllHostProcedureHostIds.remove(hostId);
// log this for now... I do... | java | public void allHostNTProcedureCallback(ClientResponse clientResponse) {
synchronized(m_allHostCallbackLock) {
int hostId = Integer.parseInt(clientResponse.getAppStatusString());
boolean removed = m_outstandingAllHostProcedureHostIds.remove(hostId);
// log this for now... I do... | [
"public",
"void",
"allHostNTProcedureCallback",
"(",
"ClientResponse",
"clientResponse",
")",
"{",
"synchronized",
"(",
"m_allHostCallbackLock",
")",
"{",
"int",
"hostId",
"=",
"Integer",
".",
"parseInt",
"(",
"clientResponse",
".",
"getAppStatusString",
"(",
")",
"... | This is called when an all-host proc responds from a particular node.
It completes the future when all of the
It uses a dumb hack that the hostid is stored in the appStatusString.
Since this is just for sysprocs, VoltDB devs making sysprocs should know
that string app status doesn't work. | [
"This",
"is",
"called",
"when",
"an",
"all",
"-",
"host",
"proc",
"responds",
"from",
"a",
"particular",
"node",
".",
"It",
"completes",
"the",
"future",
"when",
"all",
"of",
"the"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ProcedureRunnerNT.java#L164-L183 |
61,225 | VoltDB/voltdb | src/frontend/org/voltdb/ProcedureRunnerNT.java | ProcedureRunnerNT.callAllNodeNTProcedure | protected CompletableFuture<Map<Integer,ClientResponse>> callAllNodeNTProcedure(String procName, Object... params) {
// only one of these at a time
if (!m_outstandingAllHostProc.compareAndSet(false, true)) {
throw new VoltAbortException(new IllegalStateException("Only one AllNodeNTProcedure ... | java | protected CompletableFuture<Map<Integer,ClientResponse>> callAllNodeNTProcedure(String procName, Object... params) {
// only one of these at a time
if (!m_outstandingAllHostProc.compareAndSet(false, true)) {
throw new VoltAbortException(new IllegalStateException("Only one AllNodeNTProcedure ... | [
"protected",
"CompletableFuture",
"<",
"Map",
"<",
"Integer",
",",
"ClientResponse",
">",
">",
"callAllNodeNTProcedure",
"(",
"String",
"procName",
",",
"Object",
"...",
"params",
")",
"{",
"// only one of these at a time",
"if",
"(",
"!",
"m_outstandingAllHostProc",
... | Send an invocation directly to each host's CI mailbox.
This ONLY works for NT procedures.
Track responses and complete the returned future when they're all accounted for. | [
"Send",
"an",
"invocation",
"directly",
"to",
"each",
"host",
"s",
"CI",
"mailbox",
".",
"This",
"ONLY",
"works",
"for",
"NT",
"procedures",
".",
"Track",
"responses",
"and",
"complete",
"the",
"returned",
"future",
"when",
"they",
"re",
"all",
"accounted",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ProcedureRunnerNT.java#L261-L308 |
61,226 | VoltDB/voltdb | src/frontend/org/voltdb/ProcedureRunnerNT.java | ProcedureRunnerNT.completeCall | private void completeCall(ClientResponseImpl response) {
// if we're keeping track, calculate result size
if (m_perCallStats.samplingProcedure()) {
m_perCallStats.setResultSize(response.getResults());
}
m_statsCollector.endProcedure(response.getStatus() == ClientResponse.USER... | java | private void completeCall(ClientResponseImpl response) {
// if we're keeping track, calculate result size
if (m_perCallStats.samplingProcedure()) {
m_perCallStats.setResultSize(response.getResults());
}
m_statsCollector.endProcedure(response.getStatus() == ClientResponse.USER... | [
"private",
"void",
"completeCall",
"(",
"ClientResponseImpl",
"response",
")",
"{",
"// if we're keeping track, calculate result size",
"if",
"(",
"m_perCallStats",
".",
"samplingProcedure",
"(",
")",
")",
"{",
"m_perCallStats",
".",
"setResultSize",
"(",
"response",
".... | Send a response back to the proc caller. Refactored out of coreCall for both
regular and exceptional paths. | [
"Send",
"a",
"response",
"back",
"to",
"the",
"proc",
"caller",
".",
"Refactored",
"out",
"of",
"coreCall",
"for",
"both",
"regular",
"and",
"exceptional",
"paths",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ProcedureRunnerNT.java#L366-L387 |
61,227 | VoltDB/voltdb | src/frontend/org/voltdb/ProcedureRunnerNT.java | ProcedureRunnerNT.processAnyCallbacksFromFailedHosts | public void processAnyCallbacksFromFailedHosts(Set<Integer> failedHosts) {
synchronized(m_allHostCallbackLock) {
failedHosts.stream()
.forEach(i -> {
if (m_outstandingAllHostProcedureHostIds.contains(i)) {
ClientResponseImpl cri = new Clien... | java | public void processAnyCallbacksFromFailedHosts(Set<Integer> failedHosts) {
synchronized(m_allHostCallbackLock) {
failedHosts.stream()
.forEach(i -> {
if (m_outstandingAllHostProcedureHostIds.contains(i)) {
ClientResponseImpl cri = new Clien... | [
"public",
"void",
"processAnyCallbacksFromFailedHosts",
"(",
"Set",
"<",
"Integer",
">",
"failedHosts",
")",
"{",
"synchronized",
"(",
"m_allHostCallbackLock",
")",
"{",
"failedHosts",
".",
"stream",
"(",
")",
".",
"forEach",
"(",
"i",
"->",
"{",
"if",
"(",
... | For all-host NT procedures, use site failures to call callbacks for hosts
that will obviously never respond.
ICH and the other plumbing should handle regular, txn procs. | [
"For",
"all",
"-",
"host",
"NT",
"procedures",
"use",
"site",
"failures",
"to",
"call",
"callbacks",
"for",
"hosts",
"that",
"will",
"obviously",
"never",
"respond",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ProcedureRunnerNT.java#L549-L566 |
61,228 | VoltDB/voltdb | src/frontend/org/voltdb/jni/EELoggers.java | EELoggers.log | public final static void log(int logger, int level, String statement) {
if (logger < loggers.length) {
switch (level) {
case trace:
loggers[logger].trace(statement);
break;
case debug:
loggers[logger].debug(statement);
... | java | public final static void log(int logger, int level, String statement) {
if (logger < loggers.length) {
switch (level) {
case trace:
loggers[logger].trace(statement);
break;
case debug:
loggers[logger].debug(statement);
... | [
"public",
"final",
"static",
"void",
"log",
"(",
"int",
"logger",
",",
"int",
"level",
",",
"String",
"statement",
")",
"{",
"if",
"(",
"logger",
"<",
"loggers",
".",
"length",
")",
"{",
"switch",
"(",
"level",
")",
"{",
"case",
"trace",
":",
"logger... | All EE loggers will call this static method from C and specify the logger and level
they want to log to. The level will be checked again in Java.
@param logger index of the logger in the loggers array this statement should be logged to
@param level Level of the statement
@param statement Statement to log | [
"All",
"EE",
"loggers",
"will",
"call",
"this",
"static",
"method",
"from",
"C",
"and",
"specify",
"the",
"logger",
"and",
"level",
"they",
"want",
"to",
"log",
"to",
".",
"The",
"level",
"will",
"be",
"checked",
"again",
"in",
"Java",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/EELoggers.java#L67-L94 |
61,229 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/persist/RAShadowFile.java | RAShadowFile.restoreFile | public static void restoreFile(String sourceName,
String destName) throws IOException {
RandomAccessFile source = new RandomAccessFile(sourceName, "r");
RandomAccessFile dest = new RandomAccessFile(destName, "rw");
while (source.getFilePointer() != source.l... | java | public static void restoreFile(String sourceName,
String destName) throws IOException {
RandomAccessFile source = new RandomAccessFile(sourceName, "r");
RandomAccessFile dest = new RandomAccessFile(destName, "rw");
while (source.getFilePointer() != source.l... | [
"public",
"static",
"void",
"restoreFile",
"(",
"String",
"sourceName",
",",
"String",
"destName",
")",
"throws",
"IOException",
"{",
"RandomAccessFile",
"source",
"=",
"new",
"RandomAccessFile",
"(",
"sourceName",
",",
"\"r\"",
")",
";",
"RandomAccessFile",
"dest... | buggy database files had size == position == 0 at the end | [
"buggy",
"database",
"files",
"had",
"size",
"==",
"position",
"==",
"0",
"at",
"the",
"end"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/RAShadowFile.java#L172-L195 |
61,230 | VoltDB/voltdb | src/frontend/org/voltdb/utils/HTTPAdminListener.java | HTTPAdminListener.getHTMLForAdminPage | String getHTMLForAdminPage(Map<String,String> params) {
try {
String template = m_htmlTemplates.get("admintemplate.html");
for (Entry<String, String> e : params.entrySet()) {
String key = e.getKey().toUpperCase();
String value = e.getValue();
... | java | String getHTMLForAdminPage(Map<String,String> params) {
try {
String template = m_htmlTemplates.get("admintemplate.html");
for (Entry<String, String> e : params.entrySet()) {
String key = e.getKey().toUpperCase();
String value = e.getValue();
... | [
"String",
"getHTMLForAdminPage",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"params",
")",
"{",
"try",
"{",
"String",
"template",
"=",
"m_htmlTemplates",
".",
"get",
"(",
"\"admintemplate.html\"",
")",
";",
"for",
"(",
"Entry",
"<",
"String",
",",
"Str... | Load a template for the admin page, fill it out and return the value.
@param params The key-value set of variables to replace in the template.
@return The completed template. | [
"Load",
"a",
"template",
"for",
"the",
"admin",
"page",
"fill",
"it",
"out",
"and",
"return",
"the",
"value",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/HTTPAdminListener.java#L139-L155 |
61,231 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/InitiatorLeaderMonitor.java | InitiatorLeaderMonitor.start | public void start() throws InterruptedException, ExecutionException {
Future<?> task = es.submit(handlePartitionChange);
task.get();
} | java | public void start() throws InterruptedException, ExecutionException {
Future<?> task = es.submit(handlePartitionChange);
task.get();
} | [
"public",
"void",
"start",
"(",
")",
"throws",
"InterruptedException",
",",
"ExecutionException",
"{",
"Future",
"<",
"?",
">",
"task",
"=",
"es",
".",
"submit",
"(",
"handlePartitionChange",
")",
";",
"task",
".",
"get",
"(",
")",
";",
"}"
] | Start monitoring the leaders. This is a blocking operation.
@throws InterruptedException
@throws ExecutionException | [
"Start",
"monitoring",
"the",
"leaders",
".",
"This",
"is",
"a",
"blocking",
"operation",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/InitiatorLeaderMonitor.java#L123-L126 |
61,232 | VoltDB/voltdb | src/frontend/org/voltcore/utils/EstTimeUpdater.java | EstTimeUpdater.update | public static Long update(final long now) {
final long estNow = EstTime.m_now;
if (estNow == now) {
return null;
}
EstTime.m_now = now;
/*
* Check if updating the estimated time was especially tardy.
* I am concerned that the thread responsible for... | java | public static Long update(final long now) {
final long estNow = EstTime.m_now;
if (estNow == now) {
return null;
}
EstTime.m_now = now;
/*
* Check if updating the estimated time was especially tardy.
* I am concerned that the thread responsible for... | [
"public",
"static",
"Long",
"update",
"(",
"final",
"long",
"now",
")",
"{",
"final",
"long",
"estNow",
"=",
"EstTime",
".",
"m_now",
";",
"if",
"(",
"estNow",
"==",
"now",
")",
"{",
"return",
"null",
";",
"}",
"EstTime",
".",
"m_now",
"=",
"now",
... | Don't call this unless you have paused the updater and intend to update yourself
@param now
@return | [
"Don",
"t",
"call",
"this",
"unless",
"you",
"have",
"paused",
"the",
"updater",
"and",
"intend",
"to",
"update",
"yourself"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/utils/EstTimeUpdater.java#L88-L116 |
61,233 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java | ParserDML.compileMigrateStatement | StatementDMQL compileMigrateStatement(RangeVariable[] outerRanges) {
final Expression condition;
assert token.tokenType == Tokens.MIGRATE;
read();
readThis(Tokens.FROM);
RangeVariable[] rangeVariables = { readSimpleRangeVariable(StatementTypes.MIGRATE_WHERE) };
Table ta... | java | StatementDMQL compileMigrateStatement(RangeVariable[] outerRanges) {
final Expression condition;
assert token.tokenType == Tokens.MIGRATE;
read();
readThis(Tokens.FROM);
RangeVariable[] rangeVariables = { readSimpleRangeVariable(StatementTypes.MIGRATE_WHERE) };
Table ta... | [
"StatementDMQL",
"compileMigrateStatement",
"(",
"RangeVariable",
"[",
"]",
"outerRanges",
")",
"{",
"final",
"Expression",
"condition",
";",
"assert",
"token",
".",
"tokenType",
"==",
"Tokens",
".",
"MIGRATE",
";",
"read",
"(",
")",
";",
"readThis",
"(",
"Tok... | Creates a MIGRATE-type statement from this parser context (i.e.
MIGRATE FROM tbl WHERE ...
@param outerRanges
@return compiled statement | [
"Creates",
"a",
"MIGRATE",
"-",
"type",
"statement",
"from",
"this",
"parser",
"context",
"(",
"i",
".",
"e",
".",
"MIGRATE",
"FROM",
"tbl",
"WHERE",
"..."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java#L334-L377 |
61,234 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java | ParserDML.compileDeleteStatement | StatementDMQL compileDeleteStatement(RangeVariable[] outerRanges) {
Expression condition = null;
boolean truncate = false;
boolean restartIdentity = false;
switch (token.tokenType) {
case Tokens.TRUNCATE : {
read();
readTh... | java | StatementDMQL compileDeleteStatement(RangeVariable[] outerRanges) {
Expression condition = null;
boolean truncate = false;
boolean restartIdentity = false;
switch (token.tokenType) {
case Tokens.TRUNCATE : {
read();
readTh... | [
"StatementDMQL",
"compileDeleteStatement",
"(",
"RangeVariable",
"[",
"]",
"outerRanges",
")",
"{",
"Expression",
"condition",
"=",
"null",
";",
"boolean",
"truncate",
"=",
"false",
";",
"boolean",
"restartIdentity",
"=",
"false",
";",
"switch",
"(",
"token",
".... | Creates a DELETE-type Statement from this parse context. | [
"Creates",
"a",
"DELETE",
"-",
"type",
"Statement",
"from",
"this",
"parse",
"context",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java#L382-L514 |
61,235 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java | ParserDML.compileUpdateStatement | StatementDMQL compileUpdateStatement(RangeVariable[] outerRanges) {
read();
Expression[] updateExpressions;
int[] columnMap;
boolean[] columnCheckList;
OrderedHashSet colNames = new OrderedHashSet();
HsqlArrayList exprList = new HsqlArrayList();
... | java | StatementDMQL compileUpdateStatement(RangeVariable[] outerRanges) {
read();
Expression[] updateExpressions;
int[] columnMap;
boolean[] columnCheckList;
OrderedHashSet colNames = new OrderedHashSet();
HsqlArrayList exprList = new HsqlArrayList();
... | [
"StatementDMQL",
"compileUpdateStatement",
"(",
"RangeVariable",
"[",
"]",
"outerRanges",
")",
"{",
"read",
"(",
")",
";",
"Expression",
"[",
"]",
"updateExpressions",
";",
"int",
"[",
"]",
"columnMap",
";",
"boolean",
"[",
"]",
"columnCheckList",
";",
"Ordere... | Creates an UPDATE-type Statement from this parse context. | [
"Creates",
"an",
"UPDATE",
"-",
"type",
"Statement",
"from",
"this",
"parse",
"context",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java#L519-L607 |
61,236 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java | ParserDML.readMergeWhen | private void readMergeWhen(OrderedHashSet insertColumnNames,
OrderedHashSet updateColumnNames,
HsqlArrayList insertExpressions,
HsqlArrayList updateExpressions,
RangeVariable[] targetRangeVars,
... | java | private void readMergeWhen(OrderedHashSet insertColumnNames,
OrderedHashSet updateColumnNames,
HsqlArrayList insertExpressions,
HsqlArrayList updateExpressions,
RangeVariable[] targetRangeVars,
... | [
"private",
"void",
"readMergeWhen",
"(",
"OrderedHashSet",
"insertColumnNames",
",",
"OrderedHashSet",
"updateColumnNames",
",",
"HsqlArrayList",
"insertExpressions",
",",
"HsqlArrayList",
"updateExpressions",
",",
"RangeVariable",
"[",
"]",
"targetRangeVars",
",",
"RangeVa... | Parses a WHEN clause from a MERGE statement. This can be either a
WHEN MATCHED or WHEN NOT MATCHED clause, or both, and the appropriate
values will be updated.
If the var that is to hold the data is not null, then we already
encountered this type of clause, which is only allowed once, and at least
one is required. | [
"Parses",
"a",
"WHEN",
"clause",
"from",
"a",
"MERGE",
"statement",
".",
"This",
"can",
"be",
"either",
"a",
"WHEN",
"MATCHED",
"or",
"WHEN",
"NOT",
"MATCHED",
"clause",
"or",
"both",
"and",
"the",
"appropriate",
"values",
"will",
"be",
"updated",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java#L955-L1017 |
61,237 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java | ParserDML.compileCallStatement | StatementDMQL compileCallStatement(RangeVariable[] outerRanges,
boolean isStrictlyProcedure) {
read();
if (isIdentifier()) {
checkValidCatalogName(token.namePrePrefix);
RoutineSchema routineSchema =
(RoutineSchema) databas... | java | StatementDMQL compileCallStatement(RangeVariable[] outerRanges,
boolean isStrictlyProcedure) {
read();
if (isIdentifier()) {
checkValidCatalogName(token.namePrePrefix);
RoutineSchema routineSchema =
(RoutineSchema) databas... | [
"StatementDMQL",
"compileCallStatement",
"(",
"RangeVariable",
"[",
"]",
"outerRanges",
",",
"boolean",
"isStrictlyProcedure",
")",
"{",
"read",
"(",
")",
";",
"if",
"(",
"isIdentifier",
"(",
")",
")",
"{",
"checkValidCatalogName",
"(",
"token",
".",
"namePrePre... | to do call argument name and type resolution | [
"to",
"do",
"call",
"argument",
"name",
"and",
"type",
"resolution"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java#L1024-L1124 |
61,238 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java | ParserDML.voltGetSortAndSliceForDelete | private SortAndSlice voltGetSortAndSliceForDelete(RangeVariable[] rangeVariables) {
SortAndSlice sas = XreadOrderByExpression();
if (sas == null || sas == SortAndSlice.noSort)
return SortAndSlice.noSort;
// Resolve columns in the ORDER BY clause. This code modified
// from ... | java | private SortAndSlice voltGetSortAndSliceForDelete(RangeVariable[] rangeVariables) {
SortAndSlice sas = XreadOrderByExpression();
if (sas == null || sas == SortAndSlice.noSort)
return SortAndSlice.noSort;
// Resolve columns in the ORDER BY clause. This code modified
// from ... | [
"private",
"SortAndSlice",
"voltGetSortAndSliceForDelete",
"(",
"RangeVariable",
"[",
"]",
"rangeVariables",
")",
"{",
"SortAndSlice",
"sas",
"=",
"XreadOrderByExpression",
"(",
")",
";",
"if",
"(",
"sas",
"==",
"null",
"||",
"sas",
"==",
"SortAndSlice",
".",
"n... | This is a Volt extension to allow
DELETE FROM tab ORDER BY c LIMIT 1
Adds a SortAndSlice object to the statement if the next tokens
are ORDER BY, LIMIT or OFFSET.
@param deleteStmt | [
"This",
"is",
"a",
"Volt",
"extension",
"to",
"allow",
"DELETE",
"FROM",
"tab",
"ORDER",
"BY",
"c",
"LIMIT",
"1",
"Adds",
"a",
"SortAndSlice",
"object",
"to",
"the",
"statement",
"if",
"the",
"next",
"tokens",
"are",
"ORDER",
"BY",
"LIMIT",
"or",
"OFFSET... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDML.java#L1135-L1155 |
61,239 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/ClassMatcher.java | ClassMatcher.addPattern | public ClassNameMatchStatus addPattern(String classNamePattern) {
boolean matchFound = false;
if (m_classList == null) {
m_classList = getClasspathClassFileNames();
}
String preppedName = classNamePattern.trim();
// include only full classes
// for nested cl... | java | public ClassNameMatchStatus addPattern(String classNamePattern) {
boolean matchFound = false;
if (m_classList == null) {
m_classList = getClasspathClassFileNames();
}
String preppedName = classNamePattern.trim();
// include only full classes
// for nested cl... | [
"public",
"ClassNameMatchStatus",
"addPattern",
"(",
"String",
"classNamePattern",
")",
"{",
"boolean",
"matchFound",
"=",
"false",
";",
"if",
"(",
"m_classList",
"==",
"null",
")",
"{",
"m_classList",
"=",
"getClasspathClassFileNames",
"(",
")",
";",
"}",
"Stri... | Add a pattern that matches classes from the classpath
and add any matching classnames to m_classNameMatches.
The pattern is of the form "org.voltdb.Foo" but can
contain single and double asterisks in the style
of ant wildcards, such as "org.voltdb.**" or
"org.voltdb.*bar" or "org.volt**.Foo" | [
"Add",
"a",
"pattern",
"that",
"matches",
"classes",
"from",
"the",
"classpath",
"and",
"add",
"any",
"matching",
"classnames",
"to",
"m_classNameMatches",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/ClassMatcher.java#L55-L108 |
61,240 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/ClassMatcher.java | ClassMatcher.processPathPart | private static void processPathPart(String path, Set<String> classes) {
File rootFile = new File(path);
if (rootFile.isDirectory() == false) {
return;
}
File[] files = rootFile.listFiles();
for (File f : files) {
// classes in the anonymous package
... | java | private static void processPathPart(String path, Set<String> classes) {
File rootFile = new File(path);
if (rootFile.isDirectory() == false) {
return;
}
File[] files = rootFile.listFiles();
for (File f : files) {
// classes in the anonymous package
... | [
"private",
"static",
"void",
"processPathPart",
"(",
"String",
"path",
",",
"Set",
"<",
"String",
">",
"classes",
")",
"{",
"File",
"rootFile",
"=",
"new",
"File",
"(",
"path",
")",
";",
"if",
"(",
"rootFile",
".",
"isDirectory",
"(",
")",
"==",
"false... | For a given classpath root, scan it for packages and classes,
adding all found classnames to the given "classes" param. | [
"For",
"a",
"given",
"classpath",
"root",
"scan",
"it",
"for",
"packages",
"and",
"classes",
"adding",
"all",
"found",
"classnames",
"to",
"the",
"given",
"classes",
"param",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/ClassMatcher.java#L177-L197 |
61,241 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/ClassMatcher.java | ClassMatcher.getClasspathClassFileNames | static String getClasspathClassFileNames() {
String classpath = System.getProperty("java.class.path");
String[] pathParts = classpath.split(File.pathSeparator);
Set<String> classes = new TreeSet<String>();
for (String part : pathParts) {
processPathPart(part, classes);
... | java | static String getClasspathClassFileNames() {
String classpath = System.getProperty("java.class.path");
String[] pathParts = classpath.split(File.pathSeparator);
Set<String> classes = new TreeSet<String>();
for (String part : pathParts) {
processPathPart(part, classes);
... | [
"static",
"String",
"getClasspathClassFileNames",
"(",
")",
"{",
"String",
"classpath",
"=",
"System",
".",
"getProperty",
"(",
"\"java.class.path\"",
")",
";",
"String",
"[",
"]",
"pathParts",
"=",
"classpath",
".",
"split",
"(",
"File",
".",
"pathSeparator",
... | Get a single string that contains all of the non-jar
classfiles in the current classpath, separated by
newlines. Classfiles are represented by their Java
"dot" names, not filenames. | [
"Get",
"a",
"single",
"string",
"that",
"contains",
"all",
"of",
"the",
"non",
"-",
"jar",
"classfiles",
"in",
"the",
"current",
"classpath",
"separated",
"by",
"newlines",
".",
"Classfiles",
"are",
"represented",
"by",
"their",
"Java",
"dot",
"names",
"not"... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/ClassMatcher.java#L205-L221 |
61,242 | VoltDB/voltdb | src/frontend/org/voltdb/HealthMonitor.java | HealthMonitor.getMemoryLimitSize | double getMemoryLimitSize(String sizeStr)
{
if (sizeStr==null || sizeStr.length()==0) {
return 0;
}
try {
if (sizeStr.charAt(sizeStr.length()-1)=='%') { // size as a percentage of total available memory
int perc = Integer.parseInt(sizeStr.substring(0,... | java | double getMemoryLimitSize(String sizeStr)
{
if (sizeStr==null || sizeStr.length()==0) {
return 0;
}
try {
if (sizeStr.charAt(sizeStr.length()-1)=='%') { // size as a percentage of total available memory
int perc = Integer.parseInt(sizeStr.substring(0,... | [
"double",
"getMemoryLimitSize",
"(",
"String",
"sizeStr",
")",
"{",
"if",
"(",
"sizeStr",
"==",
"null",
"||",
"sizeStr",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"0",
";",
"}",
"try",
"{",
"if",
"(",
"sizeStr",
".",
"charAt",
"(",
"s... | package-private for junit | [
"package",
"-",
"private",
"for",
"junit"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/HealthMonitor.java#L282-L306 |
61,243 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/common/PathUtils.java | PathUtils.validatePath | public static void validatePath(String path)
throws IllegalArgumentException {
if (path == null) {
throw new IllegalArgumentException("Path cannot be null");
}
if (path.length() == 0) {
throw new IllegalArgumentException("Path length must be > 0");
}
... | java | public static void validatePath(String path)
throws IllegalArgumentException {
if (path == null) {
throw new IllegalArgumentException("Path cannot be null");
}
if (path.length() == 0) {
throw new IllegalArgumentException("Path length must be > 0");
}
... | [
"public",
"static",
"void",
"validatePath",
"(",
"String",
"path",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"path",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Path cannot be null\"",
")",
";",
"}",
"if",
"(",
... | Validate the provided znode path string
@param path
znode path string
@throws IllegalArgumentException
if the path is invalid | [
"Validate",
"the",
"provided",
"znode",
"path",
"string"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/common/PathUtils.java#L49-L106 |
61,244 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AbstractPlanNode.java | AbstractPlanNode.produceCopyForTransformation | protected void produceCopyForTransformation(AbstractPlanNode copy) {
copy.m_outputSchema = m_outputSchema;
copy.m_hasSignificantOutputSchema = m_hasSignificantOutputSchema;
copy.m_outputColumnHints = m_outputColumnHints;
copy.m_estimatedOutputTupleCount = m_estimatedOutputTupleCount;
... | java | protected void produceCopyForTransformation(AbstractPlanNode copy) {
copy.m_outputSchema = m_outputSchema;
copy.m_hasSignificantOutputSchema = m_hasSignificantOutputSchema;
copy.m_outputColumnHints = m_outputColumnHints;
copy.m_estimatedOutputTupleCount = m_estimatedOutputTupleCount;
... | [
"protected",
"void",
"produceCopyForTransformation",
"(",
"AbstractPlanNode",
"copy",
")",
"{",
"copy",
".",
"m_outputSchema",
"=",
"m_outputSchema",
";",
"copy",
".",
"m_hasSignificantOutputSchema",
"=",
"m_hasSignificantOutputSchema",
";",
"copy",
".",
"m_outputColumnHi... | Create a PlanNode that clones the configuration information but
is not inserted in the plan graph and has a unique plan node id. | [
"Create",
"a",
"PlanNode",
"that",
"clones",
"the",
"configuration",
"information",
"but",
"is",
"not",
"inserted",
"in",
"the",
"plan",
"graph",
"and",
"has",
"a",
"unique",
"plan",
"node",
"id",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L179-L193 |
61,245 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AbstractPlanNode.java | AbstractPlanNode.generateOutputSchema | public void generateOutputSchema(Database db)
{
// default behavior: just copy the input schema
// to the output schema
assert(m_children.size() == 1);
AbstractPlanNode childNode = m_children.get(0);
childNode.generateOutputSchema(db);
// Replace the expressions in ou... | java | public void generateOutputSchema(Database db)
{
// default behavior: just copy the input schema
// to the output schema
assert(m_children.size() == 1);
AbstractPlanNode childNode = m_children.get(0);
childNode.generateOutputSchema(db);
// Replace the expressions in ou... | [
"public",
"void",
"generateOutputSchema",
"(",
"Database",
"db",
")",
"{",
"// default behavior: just copy the input schema",
"// to the output schema",
"assert",
"(",
"m_children",
".",
"size",
"(",
")",
"==",
"1",
")",
";",
"AbstractPlanNode",
"childNode",
"=",
"m_c... | Generate the output schema for this node based on the
output schemas of its children. The generated schema consists of
the complete set of columns but is not yet ordered.
Right now it's best to call this on every node after it gets added
and linked to the top of the current plan graph.
FIXME: "it's best to call this"... | [
"Generate",
"the",
"output",
"schema",
"for",
"this",
"node",
"based",
"on",
"the",
"output",
"schemas",
"of",
"its",
"children",
".",
"The",
"generated",
"schema",
"consists",
"of",
"the",
"complete",
"set",
"of",
"columns",
"but",
"is",
"not",
"yet",
"or... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L223-L240 |
61,246 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AbstractPlanNode.java | AbstractPlanNode.getTablesAndIndexes | public void getTablesAndIndexes(Map<String, StmtTargetTableScan> tablesRead,
Collection<String> indexes)
{
for (AbstractPlanNode node : m_inlineNodes.values()) {
node.getTablesAndIndexes(tablesRead, indexes);
}
for (AbstractPlanNode node : m_children) {
no... | java | public void getTablesAndIndexes(Map<String, StmtTargetTableScan> tablesRead,
Collection<String> indexes)
{
for (AbstractPlanNode node : m_inlineNodes.values()) {
node.getTablesAndIndexes(tablesRead, indexes);
}
for (AbstractPlanNode node : m_children) {
no... | [
"public",
"void",
"getTablesAndIndexes",
"(",
"Map",
"<",
"String",
",",
"StmtTargetTableScan",
">",
"tablesRead",
",",
"Collection",
"<",
"String",
">",
"indexes",
")",
"{",
"for",
"(",
"AbstractPlanNode",
"node",
":",
"m_inlineNodes",
".",
"values",
"(",
")"... | Recursively build sets of tables read and index names used.
@param tablesRead Set of table aliases read potentially added to at each recursive level.
@param indexes Set of index names used in the plan tree
Only the current fragment is of interest. | [
"Recursively",
"build",
"sets",
"of",
"tables",
"read",
"and",
"index",
"names",
"used",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L317-L327 |
61,247 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AbstractPlanNode.java | AbstractPlanNode.getTablesAndIndexesFromSubqueries | protected void getTablesAndIndexesFromSubqueries(Map<String, StmtTargetTableScan> tablesRead,
Collection<String> indexes) {
for(AbstractExpression expr : findAllSubquerySubexpressions()) {
assert(expr instanceof AbstractSubqueryExpression);
AbstractSubqueryExpression subquery... | java | protected void getTablesAndIndexesFromSubqueries(Map<String, StmtTargetTableScan> tablesRead,
Collection<String> indexes) {
for(AbstractExpression expr : findAllSubquerySubexpressions()) {
assert(expr instanceof AbstractSubqueryExpression);
AbstractSubqueryExpression subquery... | [
"protected",
"void",
"getTablesAndIndexesFromSubqueries",
"(",
"Map",
"<",
"String",
",",
"StmtTargetTableScan",
">",
"tablesRead",
",",
"Collection",
"<",
"String",
">",
"indexes",
")",
"{",
"for",
"(",
"AbstractExpression",
"expr",
":",
"findAllSubquerySubexpression... | Collect read tables read and index names used in the current node subquery expressions.
@param tablesRead Set of table aliases read potentially added to at each recursive level.
@param indexes Set of index names used in the plan tree
Only the current node is of interest. | [
"Collect",
"read",
"tables",
"read",
"and",
"index",
"names",
"used",
"in",
"the",
"current",
"node",
"subquery",
"expressions",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L336-L345 |
61,248 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AbstractPlanNode.java | AbstractPlanNode.isOutputOrdered | public boolean isOutputOrdered (List<AbstractExpression> sortExpressions, List<SortDirectionType> sortDirections) {
assert(sortExpressions.size() == sortDirections.size());
if (m_children.size() == 1) {
return m_children.get(0).isOutputOrdered(sortExpressions, sortDirections);
}
... | java | public boolean isOutputOrdered (List<AbstractExpression> sortExpressions, List<SortDirectionType> sortDirections) {
assert(sortExpressions.size() == sortDirections.size());
if (m_children.size() == 1) {
return m_children.get(0).isOutputOrdered(sortExpressions, sortDirections);
}
... | [
"public",
"boolean",
"isOutputOrdered",
"(",
"List",
"<",
"AbstractExpression",
">",
"sortExpressions",
",",
"List",
"<",
"SortDirectionType",
">",
"sortDirections",
")",
"{",
"assert",
"(",
"sortExpressions",
".",
"size",
"(",
")",
"==",
"sortDirections",
".",
... | Does the plan guarantee a result sorted according to the required sort order.
The default implementation delegates the question to its child if there is only one child.
@param sortExpressions list of ordering columns expressions
@param sortDirections list of corresponding sort orders
@return TRUE if the node's output... | [
"Does",
"the",
"plan",
"guarantee",
"a",
"result",
"sorted",
"according",
"to",
"the",
"required",
"sort",
"order",
".",
"The",
"default",
"implementation",
"delegates",
"the",
"question",
"to",
"its",
"child",
"if",
"there",
"is",
"only",
"one",
"child",
".... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L385-L391 |
61,249 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AbstractPlanNode.java | AbstractPlanNode.getTrueOutputSchema | public final NodeSchema getTrueOutputSchema(boolean resetBack) throws PlanningErrorException {
AbstractPlanNode child;
NodeSchema answer = null;
//
// Note: This code is translated from the C++ code in
// AbstractPlanNode::getOutputSchema. It's considerably
// ... | java | public final NodeSchema getTrueOutputSchema(boolean resetBack) throws PlanningErrorException {
AbstractPlanNode child;
NodeSchema answer = null;
//
// Note: This code is translated from the C++ code in
// AbstractPlanNode::getOutputSchema. It's considerably
// ... | [
"public",
"final",
"NodeSchema",
"getTrueOutputSchema",
"(",
"boolean",
"resetBack",
")",
"throws",
"PlanningErrorException",
"{",
"AbstractPlanNode",
"child",
";",
"NodeSchema",
"answer",
"=",
"null",
";",
"//",
"// Note: This code is translated from the C++ code in",
"// ... | Find the true output schema. This may be in some child
node. This seems to be the search order when constructing
a plan node in the EE.
There are several cases.
1.) If the child has an output schema, and if it is
not a copy of one of its children's schemas,
that's the one we want. We know it's a copy
if m_hasSignif... | [
"Find",
"the",
"true",
"output",
"schema",
".",
"This",
"may",
"be",
"in",
"some",
"child",
"node",
".",
"This",
"seems",
"to",
"be",
"the",
"search",
"order",
"when",
"constructing",
"a",
"plan",
"node",
"in",
"the",
"EE",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L546-L620 |
61,250 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AbstractPlanNode.java | AbstractPlanNode.addAndLinkChild | public void addAndLinkChild(AbstractPlanNode child) {
assert(child != null);
m_children.add(child);
child.m_parents.add(this);
} | java | public void addAndLinkChild(AbstractPlanNode child) {
assert(child != null);
m_children.add(child);
child.m_parents.add(this);
} | [
"public",
"void",
"addAndLinkChild",
"(",
"AbstractPlanNode",
"child",
")",
"{",
"assert",
"(",
"child",
"!=",
"null",
")",
";",
"m_children",
".",
"add",
"(",
"child",
")",
";",
"child",
".",
"m_parents",
".",
"add",
"(",
"this",
")",
";",
"}"
] | Add a child and link this node child's parent.
@param child The node to add. | [
"Add",
"a",
"child",
"and",
"link",
"this",
"node",
"child",
"s",
"parent",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L626-L630 |
61,251 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AbstractPlanNode.java | AbstractPlanNode.setAndLinkChild | public void setAndLinkChild(int index, AbstractPlanNode child) {
assert(child != null);
m_children.set(index, child);
child.m_parents.add(this);
} | java | public void setAndLinkChild(int index, AbstractPlanNode child) {
assert(child != null);
m_children.set(index, child);
child.m_parents.add(this);
} | [
"public",
"void",
"setAndLinkChild",
"(",
"int",
"index",
",",
"AbstractPlanNode",
"child",
")",
"{",
"assert",
"(",
"child",
"!=",
"null",
")",
";",
"m_children",
".",
"set",
"(",
"index",
",",
"child",
")",
";",
"child",
".",
"m_parents",
".",
"add",
... | Used to re-link the child without changing the order.
This is called by PushDownLimit and RemoveUnnecessaryProjectNodes.
@param index
@param child | [
"Used",
"to",
"re",
"-",
"link",
"the",
"child",
"without",
"changing",
"the",
"order",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L639-L643 |
61,252 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AbstractPlanNode.java | AbstractPlanNode.unlinkChild | public void unlinkChild(AbstractPlanNode child) {
assert(child != null);
m_children.remove(child);
child.m_parents.remove(this);
} | java | public void unlinkChild(AbstractPlanNode child) {
assert(child != null);
m_children.remove(child);
child.m_parents.remove(this);
} | [
"public",
"void",
"unlinkChild",
"(",
"AbstractPlanNode",
"child",
")",
"{",
"assert",
"(",
"child",
"!=",
"null",
")",
";",
"m_children",
".",
"remove",
"(",
"child",
")",
";",
"child",
".",
"m_parents",
".",
"remove",
"(",
"this",
")",
";",
"}"
] | Remove child from this node.
@param child to remove. | [
"Remove",
"child",
"from",
"this",
"node",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L648-L652 |
61,253 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AbstractPlanNode.java | AbstractPlanNode.replaceChild | public boolean replaceChild(AbstractPlanNode oldChild, AbstractPlanNode newChild) {
assert(oldChild != null);
assert(newChild != null);
int idx = 0;
for (AbstractPlanNode child : m_children) {
if (child.equals(oldChild)) {
oldChild.m_parents.clear();
... | java | public boolean replaceChild(AbstractPlanNode oldChild, AbstractPlanNode newChild) {
assert(oldChild != null);
assert(newChild != null);
int idx = 0;
for (AbstractPlanNode child : m_children) {
if (child.equals(oldChild)) {
oldChild.m_parents.clear();
... | [
"public",
"boolean",
"replaceChild",
"(",
"AbstractPlanNode",
"oldChild",
",",
"AbstractPlanNode",
"newChild",
")",
"{",
"assert",
"(",
"oldChild",
"!=",
"null",
")",
";",
"assert",
"(",
"newChild",
"!=",
"null",
")",
";",
"int",
"idx",
"=",
"0",
";",
"for... | Replace an existing child with a new one preserving the child's position.
@param oldChild The node to replace.
@param newChild The new node.
@return true if the child was replaced | [
"Replace",
"an",
"existing",
"child",
"with",
"a",
"new",
"one",
"preserving",
"the",
"child",
"s",
"position",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L660-L673 |
61,254 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AbstractPlanNode.java | AbstractPlanNode.addIntermediary | public void addIntermediary(AbstractPlanNode node) {
// transfer this node's children to node
Iterator<AbstractPlanNode> it = m_children.iterator();
while (it.hasNext()) {
AbstractPlanNode child = it.next();
it.remove(); // remove this.child from... | java | public void addIntermediary(AbstractPlanNode node) {
// transfer this node's children to node
Iterator<AbstractPlanNode> it = m_children.iterator();
while (it.hasNext()) {
AbstractPlanNode child = it.next();
it.remove(); // remove this.child from... | [
"public",
"void",
"addIntermediary",
"(",
"AbstractPlanNode",
"node",
")",
"{",
"// transfer this node's children to node",
"Iterator",
"<",
"AbstractPlanNode",
">",
"it",
"=",
"m_children",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"it",
".",
"hasNext",
"(",
... | Interject the provided node between this node and this node's current children | [
"Interject",
"the",
"provided",
"node",
"between",
"this",
"node",
"and",
"this",
"node",
"s",
"current",
"children"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L743-L758 |
61,255 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AbstractPlanNode.java | AbstractPlanNode.hasInlinedIndexScanOfTable | public boolean hasInlinedIndexScanOfTable(String tableName) {
for (int i = 0; i < getChildCount(); i++) {
AbstractPlanNode child = getChild(i);
if (child.hasInlinedIndexScanOfTable(tableName) == true) {
return true;
}
}
return false;
} | java | public boolean hasInlinedIndexScanOfTable(String tableName) {
for (int i = 0; i < getChildCount(); i++) {
AbstractPlanNode child = getChild(i);
if (child.hasInlinedIndexScanOfTable(tableName) == true) {
return true;
}
}
return false;
} | [
"public",
"boolean",
"hasInlinedIndexScanOfTable",
"(",
"String",
"tableName",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"getChildCount",
"(",
")",
";",
"i",
"++",
")",
"{",
"AbstractPlanNode",
"child",
"=",
"getChild",
"(",
"i",
")",
... | Refer to the override implementation on NestLoopIndexJoin node.
@param tableName
@return whether this node has an inlined index scan node or not. | [
"Refer",
"to",
"the",
"override",
"implementation",
"on",
"NestLoopIndexJoin",
"node",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L831-L840 |
61,256 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AbstractPlanNode.java | AbstractPlanNode.findAllExpressionsOfClass | protected void findAllExpressionsOfClass(Class< ? extends AbstractExpression> aeClass,
Set<AbstractExpression> collected) {
// Check the inlined plan nodes
for (AbstractPlanNode inlineNode: getInlinePlanNodes().values()) {
// For inline node we MUST go recursive to its children!!... | java | protected void findAllExpressionsOfClass(Class< ? extends AbstractExpression> aeClass,
Set<AbstractExpression> collected) {
// Check the inlined plan nodes
for (AbstractPlanNode inlineNode: getInlinePlanNodes().values()) {
// For inline node we MUST go recursive to its children!!... | [
"protected",
"void",
"findAllExpressionsOfClass",
"(",
"Class",
"<",
"?",
"extends",
"AbstractExpression",
">",
"aeClass",
",",
"Set",
"<",
"AbstractExpression",
">",
"collected",
")",
"{",
"// Check the inlined plan nodes",
"for",
"(",
"AbstractPlanNode",
"inlineNode",... | Collect a unique list of expressions of a given type that this node has including its inlined nodes
@param aeClass AbstractExpression class to search for
@param collection set to populate with expressions that this node has | [
"Collect",
"a",
"unique",
"list",
"of",
"expressions",
"of",
"a",
"given",
"type",
"that",
"this",
"node",
"has",
"including",
"its",
"inlined",
"nodes"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L945-L958 |
61,257 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AbstractPlanNode.java | AbstractPlanNode.toDOTString | public String toDOTString() {
StringBuilder sb = new StringBuilder();
// id [label=id: value-type <value-type-attributes>];
// id -> child_id;
// id -> child_id;
sb.append(m_id).append(" [label=\"").append(m_id).append(": ").append(getPlanNodeType()).append("\" ");
sb.a... | java | public String toDOTString() {
StringBuilder sb = new StringBuilder();
// id [label=id: value-type <value-type-attributes>];
// id -> child_id;
// id -> child_id;
sb.append(m_id).append(" [label=\"").append(m_id).append(": ").append(getPlanNodeType()).append("\" ");
sb.a... | [
"public",
"String",
"toDOTString",
"(",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"// id [label=id: value-type <value-type-attributes>];",
"// id -> child_id;",
"// id -> child_id;",
"sb",
".",
"append",
"(",
"m_id",
")",
".",
"appen... | produce a file that can imported into graphviz for easier visualization | [
"produce",
"a",
"file",
"that",
"can",
"imported",
"into",
"graphviz",
"for",
"easier",
"visualization"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L1040-L1059 |
61,258 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AbstractPlanNode.java | AbstractPlanNode.getValueTypeDotString | private String getValueTypeDotString() {
PlanNodeType pnt = getPlanNodeType();
if (isInline()) {
return "fontcolor=\"white\" style=\"filled\" fillcolor=\"red\"";
}
if (pnt == PlanNodeType.SEND || pnt == PlanNodeType.RECEIVE || pnt == PlanNodeType.MERGERECEIVE) {
r... | java | private String getValueTypeDotString() {
PlanNodeType pnt = getPlanNodeType();
if (isInline()) {
return "fontcolor=\"white\" style=\"filled\" fillcolor=\"red\"";
}
if (pnt == PlanNodeType.SEND || pnt == PlanNodeType.RECEIVE || pnt == PlanNodeType.MERGERECEIVE) {
r... | [
"private",
"String",
"getValueTypeDotString",
"(",
")",
"{",
"PlanNodeType",
"pnt",
"=",
"getPlanNodeType",
"(",
")",
";",
"if",
"(",
"isInline",
"(",
")",
")",
"{",
"return",
"\"fontcolor=\\\"white\\\" style=\\\"filled\\\" fillcolor=\\\"red\\\"\"",
";",
"}",
"if",
... | maybe not worth polluting | [
"maybe",
"not",
"worth",
"polluting"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L1062-L1071 |
61,259 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AbstractPlanNode.java | AbstractPlanNode.getScanNodeList_recurse | public void getScanNodeList_recurse(ArrayList<AbstractScanPlanNode> collected,
HashSet<AbstractPlanNode> visited) {
if (visited.contains(this)) {
assert(false): "do not expect loops in plangraph.";
return;
}
visited.add(this);
for (AbstractPlanNode n :... | java | public void getScanNodeList_recurse(ArrayList<AbstractScanPlanNode> collected,
HashSet<AbstractPlanNode> visited) {
if (visited.contains(this)) {
assert(false): "do not expect loops in plangraph.";
return;
}
visited.add(this);
for (AbstractPlanNode n :... | [
"public",
"void",
"getScanNodeList_recurse",
"(",
"ArrayList",
"<",
"AbstractScanPlanNode",
">",
"collected",
",",
"HashSet",
"<",
"AbstractPlanNode",
">",
"visited",
")",
"{",
"if",
"(",
"visited",
".",
"contains",
"(",
"this",
")",
")",
"{",
"assert",
"(",
... | postorder adding scan nodes | [
"postorder",
"adding",
"scan",
"nodes"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L1256-L1270 |
61,260 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/AbstractPlanNode.java | AbstractPlanNode.getPlanNodeList_recurse | public void getPlanNodeList_recurse(ArrayList<AbstractPlanNode> collected,
HashSet<AbstractPlanNode> visited) {
if (visited.contains(this)) {
assert(false): "do not expect loops in plangraph.";
return;
}
visited.add(this);
for (AbstractPlanNode n : m_... | java | public void getPlanNodeList_recurse(ArrayList<AbstractPlanNode> collected,
HashSet<AbstractPlanNode> visited) {
if (visited.contains(this)) {
assert(false): "do not expect loops in plangraph.";
return;
}
visited.add(this);
for (AbstractPlanNode n : m_... | [
"public",
"void",
"getPlanNodeList_recurse",
"(",
"ArrayList",
"<",
"AbstractPlanNode",
">",
"collected",
",",
"HashSet",
"<",
"AbstractPlanNode",
">",
"visited",
")",
"{",
"if",
"(",
"visited",
".",
"contains",
"(",
"this",
")",
")",
"{",
"assert",
"(",
"fa... | postorder add nodes | [
"postorder",
"add",
"nodes"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L1280-L1292 |
61,261 | VoltDB/voltdb | src/frontend/org/voltdb/ParameterConverter.java | ParameterConverter.nullValueForType | private static Object nullValueForType(final Class<?> expectedClz)
{
if (expectedClz == long.class) {
return VoltType.NULL_BIGINT;
}
else if (expectedClz == int.class) {
return VoltType.NULL_INTEGER;
}
else if (expectedClz == short.class) {
... | java | private static Object nullValueForType(final Class<?> expectedClz)
{
if (expectedClz == long.class) {
return VoltType.NULL_BIGINT;
}
else if (expectedClz == int.class) {
return VoltType.NULL_INTEGER;
}
else if (expectedClz == short.class) {
... | [
"private",
"static",
"Object",
"nullValueForType",
"(",
"final",
"Class",
"<",
"?",
">",
"expectedClz",
")",
"{",
"if",
"(",
"expectedClz",
"==",
"long",
".",
"class",
")",
"{",
"return",
"VoltType",
".",
"NULL_BIGINT",
";",
"}",
"else",
"if",
"(",
"expe... | Get the appropriate and compatible null value for a given
parameter type. | [
"Get",
"the",
"appropriate",
"and",
"compatible",
"null",
"value",
"for",
"a",
"given",
"parameter",
"type",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ParameterConverter.java#L57-L77 |
61,262 | VoltDB/voltdb | src/frontend/org/voltdb/ParameterConverter.java | ParameterConverter.convertStringToPrimitiveOrPrimitiveWrapper | private static Object convertStringToPrimitiveOrPrimitiveWrapper(String value, final Class<?> expectedClz)
throws VoltTypeException
{
value = value.trim();
// detect CSV null
if (value.equals(Constants.CSV_NULL)) return nullValueForType(expectedClz);
// Remove commas. Doing thi... | java | private static Object convertStringToPrimitiveOrPrimitiveWrapper(String value, final Class<?> expectedClz)
throws VoltTypeException
{
value = value.trim();
// detect CSV null
if (value.equals(Constants.CSV_NULL)) return nullValueForType(expectedClz);
// Remove commas. Doing thi... | [
"private",
"static",
"Object",
"convertStringToPrimitiveOrPrimitiveWrapper",
"(",
"String",
"value",
",",
"final",
"Class",
"<",
"?",
">",
"expectedClz",
")",
"throws",
"VoltTypeException",
"{",
"value",
"=",
"value",
".",
"trim",
"(",
")",
";",
"// detect CSV nul... | Given a string, covert it to a primitive type or boxed type of the primitive type or return null.
If the string value is a VARBINARY constant of the form X'00ABCD', and the
expected class is one of byte, short, int or long, then we interpret the
string as specifying bits of a 64-bit signed integer (padded with zeroes ... | [
"Given",
"a",
"string",
"covert",
"it",
"to",
"a",
"primitive",
"type",
"or",
"boxed",
"type",
"of",
"the",
"primitive",
"type",
"or",
"return",
"null",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ParameterConverter.java#L136-L190 |
61,263 | VoltDB/voltdb | src/frontend/org/voltdb/ParameterConverter.java | ParameterConverter.tryToMakeCompatibleArray | private static Object tryToMakeCompatibleArray(
final Class<?> expectedComponentClz,
final Class<?> inputComponentClz,
Object param)
throws VoltTypeException
{
int inputLength = Array.getLength(param);
if (inputComponentClz == expectedComponentClz) {
... | java | private static Object tryToMakeCompatibleArray(
final Class<?> expectedComponentClz,
final Class<?> inputComponentClz,
Object param)
throws VoltTypeException
{
int inputLength = Array.getLength(param);
if (inputComponentClz == expectedComponentClz) {
... | [
"private",
"static",
"Object",
"tryToMakeCompatibleArray",
"(",
"final",
"Class",
"<",
"?",
">",
"expectedComponentClz",
",",
"final",
"Class",
"<",
"?",
">",
"inputComponentClz",
",",
"Object",
"param",
")",
"throws",
"VoltTypeException",
"{",
"int",
"inputLength... | Factored out code to handle array parameter types.
@throws Exception with a message describing why the types are incompatible. | [
"Factored",
"out",
"code",
"to",
"handle",
"array",
"parameter",
"types",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ParameterConverter.java#L197-L257 |
61,264 | VoltDB/voltdb | src/frontend/org/voltdb/ParameterConverter.java | ParameterConverter.getResultsFromRawResults | final static public VoltTable[] getResultsFromRawResults(String procedureName, Object result) throws InvocationTargetException {
if (result == null) {
return new VoltTable[0];
}
if (result instanceof VoltTable[]) {
VoltTable[] retval = (VoltTable[]) result;
fo... | java | final static public VoltTable[] getResultsFromRawResults(String procedureName, Object result) throws InvocationTargetException {
if (result == null) {
return new VoltTable[0];
}
if (result instanceof VoltTable[]) {
VoltTable[] retval = (VoltTable[]) result;
fo... | [
"final",
"static",
"public",
"VoltTable",
"[",
"]",
"getResultsFromRawResults",
"(",
"String",
"procedureName",
",",
"Object",
"result",
")",
"throws",
"InvocationTargetException",
"{",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"return",
"new",
"VoltTable",
"... | Given the results of a procedure, convert it into a sensible array of VoltTables.
@throws InvocationTargetException | [
"Given",
"the",
"results",
"of",
"a",
"procedure",
"convert",
"it",
"into",
"a",
"sensible",
"array",
"of",
"VoltTables",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ParameterConverter.java#L643-L673 |
61,265 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/Version.java | Version.main | public static void main(String[] args) {
if (args.length > 1) {
printUsage();
}
if (args.length == 0 || (args.length == 1 && args[0].equals("--full"))) {
System.out.println(getFullVersion());
System.exit(0);
}
if (args[0].equals("--short"))
... | java | public static void main(String[] args) {
if (args.length > 1) {
printUsage();
}
if (args.length == 0 || (args.length == 1 && args[0].equals("--full"))) {
System.out.println(getFullVersion());
System.exit(0);
}
if (args[0].equals("--short"))
... | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"if",
"(",
"args",
".",
"length",
">",
"1",
")",
"{",
"printUsage",
"(",
")",
";",
"}",
"if",
"(",
"args",
".",
"length",
"==",
"0",
"||",
"(",
"args",
".",
"length"... | Prints the current version, revision and build date to the standard out.
@param args
<ul>
<li>--short - prints a short version string "1.2.3"
<li>--revision - prints a short version string with the SVN
repository revision "1.2.3-94"
<li>--full - prints the revision and the build date
</ul> | [
"Prints",
"the",
"current",
"version",
"revision",
"and",
"build",
"date",
"to",
"the",
"standard",
"out",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/Version.java#L62-L77 |
61,266 | VoltDB/voltdb | src/frontend/org/voltdb/utils/PBDRegularSegment.java | PBDRegularSegment.setFinal | void setFinal(boolean isFinal) throws IOException {
if (isFinal != m_isFinal) {
if (PBDSegment.setFinal(m_file, isFinal)) {
if (!isFinal) {
// It is dangerous to leave final on a segment so make sure the metadata is flushed
m_fc.force(true);
... | java | void setFinal(boolean isFinal) throws IOException {
if (isFinal != m_isFinal) {
if (PBDSegment.setFinal(m_file, isFinal)) {
if (!isFinal) {
// It is dangerous to leave final on a segment so make sure the metadata is flushed
m_fc.force(true);
... | [
"void",
"setFinal",
"(",
"boolean",
"isFinal",
")",
"throws",
"IOException",
"{",
"if",
"(",
"isFinal",
"!=",
"m_isFinal",
")",
"{",
"if",
"(",
"PBDSegment",
".",
"setFinal",
"(",
"m_file",
",",
"isFinal",
")",
")",
"{",
"if",
"(",
"!",
"isFinal",
")",... | Set or clear segment as 'final', i.e. whether segment is complete and logically immutable.
NOTES:
This is a best-effort feature: On any kind of I/O failure, the exception is swallowed and the operation is a
no-op: this will be the case on filesystems that do no support extended file attributes. Also note that the
{@c... | [
"Set",
"or",
"clear",
"segment",
"as",
"final",
"i",
".",
"e",
".",
"whether",
"segment",
"is",
"complete",
"and",
"logically",
"immutable",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/PBDRegularSegment.java#L472-L485 |
61,267 | VoltDB/voltdb | src/frontend/org/voltcore/zk/LeaderElector.java | LeaderElector.createParticipantNode | public static String createParticipantNode(ZooKeeper zk, String dir, String prefix, byte[] data)
throws KeeperException, InterruptedException
{
createRootIfNotExist(zk, dir);
String node = zk.create(ZKUtil.joinZKPath(dir, prefix + "_"), data,
Ids.OPEN_ACL_UNS... | java | public static String createParticipantNode(ZooKeeper zk, String dir, String prefix, byte[] data)
throws KeeperException, InterruptedException
{
createRootIfNotExist(zk, dir);
String node = zk.create(ZKUtil.joinZKPath(dir, prefix + "_"), data,
Ids.OPEN_ACL_UNS... | [
"public",
"static",
"String",
"createParticipantNode",
"(",
"ZooKeeper",
"zk",
",",
"String",
"dir",
",",
"String",
"prefix",
",",
"byte",
"[",
"]",
"data",
")",
"throws",
"KeeperException",
",",
"InterruptedException",
"{",
"createRootIfNotExist",
"(",
"zk",
",... | Provide a way for clients to create nodes which comply with the leader election
format without participating in a leader election
@throws InterruptedException
@throws KeeperException | [
"Provide",
"a",
"way",
"for",
"clients",
"to",
"create",
"nodes",
"which",
"comply",
"with",
"the",
"leader",
"election",
"format",
"without",
"participating",
"in",
"a",
"leader",
"election"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/LeaderElector.java#L113-L125 |
61,268 | VoltDB/voltdb | src/frontend/org/voltcore/zk/LeaderElector.java | LeaderElector.shutdown | synchronized public void shutdown() throws InterruptedException, KeeperException {
m_shutdown = true;
es.shutdown();
es.awaitTermination(365, TimeUnit.DAYS);
} | java | synchronized public void shutdown() throws InterruptedException, KeeperException {
m_shutdown = true;
es.shutdown();
es.awaitTermination(365, TimeUnit.DAYS);
} | [
"synchronized",
"public",
"void",
"shutdown",
"(",
")",
"throws",
"InterruptedException",
",",
"KeeperException",
"{",
"m_shutdown",
"=",
"true",
";",
"es",
".",
"shutdown",
"(",
")",
";",
"es",
".",
"awaitTermination",
"(",
"365",
",",
"TimeUnit",
".",
"DAY... | Deletes the ephemeral node. Make sure that no future watches will fire.
@throws InterruptedException
@throws KeeperException | [
"Deletes",
"the",
"ephemeral",
"node",
".",
"Make",
"sure",
"that",
"no",
"future",
"watches",
"will",
"fire",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/LeaderElector.java#L174-L178 |
61,269 | VoltDB/voltdb | src/frontend/org/voltcore/zk/LeaderElector.java | LeaderElector.watchNextLowerNode | private boolean watchNextLowerNode() throws KeeperException, InterruptedException {
/*
* Iterate through the sorted list of children and find the given node,
* then setup a electionWatcher on the previous node if it exists, otherwise the
* previous of the previous...until we reach the... | java | private boolean watchNextLowerNode() throws KeeperException, InterruptedException {
/*
* Iterate through the sorted list of children and find the given node,
* then setup a electionWatcher on the previous node if it exists, otherwise the
* previous of the previous...until we reach the... | [
"private",
"boolean",
"watchNextLowerNode",
"(",
")",
"throws",
"KeeperException",
",",
"InterruptedException",
"{",
"/*\n * Iterate through the sorted list of children and find the given node,\n * then setup a electionWatcher on the previous node if it exists, otherwise the\n ... | Set a watch on the node that comes before the specified node in the directory.
@return {@code true} if this node is the lowest node and therefore leader
@throws Exception | [
"Set",
"a",
"watch",
"on",
"the",
"node",
"that",
"comes",
"before",
"the",
"specified",
"node",
"in",
"the",
"directory",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/LeaderElector.java#L186-L216 |
61,270 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/escape/CharEscaperBuilder.java | CharEscaperBuilder.addEscape | @CanIgnoreReturnValue
public CharEscaperBuilder addEscape(char c, String r) {
map.put(c, checkNotNull(r));
if (c > max) {
max = c;
}
return this;
} | java | @CanIgnoreReturnValue
public CharEscaperBuilder addEscape(char c, String r) {
map.put(c, checkNotNull(r));
if (c > max) {
max = c;
}
return this;
} | [
"@",
"CanIgnoreReturnValue",
"public",
"CharEscaperBuilder",
"addEscape",
"(",
"char",
"c",
",",
"String",
"r",
")",
"{",
"map",
".",
"put",
"(",
"c",
",",
"checkNotNull",
"(",
"r",
")",
")",
";",
"if",
"(",
"c",
">",
"max",
")",
"{",
"max",
"=",
"... | Add a new mapping from an index to an object to the escaping. | [
"Add",
"a",
"new",
"mapping",
"from",
"an",
"index",
"to",
"an",
"object",
"to",
"the",
"escaping",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/escape/CharEscaperBuilder.java#L88-L95 |
61,271 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/escape/CharEscaperBuilder.java | CharEscaperBuilder.addEscapes | @CanIgnoreReturnValue
public CharEscaperBuilder addEscapes(char[] cs, String r) {
checkNotNull(r);
for (char c : cs) {
addEscape(c, r);
}
return this;
} | java | @CanIgnoreReturnValue
public CharEscaperBuilder addEscapes(char[] cs, String r) {
checkNotNull(r);
for (char c : cs) {
addEscape(c, r);
}
return this;
} | [
"@",
"CanIgnoreReturnValue",
"public",
"CharEscaperBuilder",
"addEscapes",
"(",
"char",
"[",
"]",
"cs",
",",
"String",
"r",
")",
"{",
"checkNotNull",
"(",
"r",
")",
";",
"for",
"(",
"char",
"c",
":",
"cs",
")",
"{",
"addEscape",
"(",
"c",
",",
"r",
"... | Add multiple mappings at once for a particular index. | [
"Add",
"multiple",
"mappings",
"at",
"once",
"for",
"a",
"particular",
"index",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/escape/CharEscaperBuilder.java#L100-L107 |
61,272 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/SpScheduler.java | SpScheduler.deliverReadyTxns | private void deliverReadyTxns() {
// First, pull all the sequenced messages, if any.
VoltMessage m = m_replaySequencer.poll();
while(m != null) {
deliver(m);
m = m_replaySequencer.poll();
}
// Then, try to pull all the drainable messages, if any.
m... | java | private void deliverReadyTxns() {
// First, pull all the sequenced messages, if any.
VoltMessage m = m_replaySequencer.poll();
while(m != null) {
deliver(m);
m = m_replaySequencer.poll();
}
// Then, try to pull all the drainable messages, if any.
m... | [
"private",
"void",
"deliverReadyTxns",
"(",
")",
"{",
"// First, pull all the sequenced messages, if any.",
"VoltMessage",
"m",
"=",
"m_replaySequencer",
".",
"poll",
"(",
")",
";",
"while",
"(",
"m",
"!=",
"null",
")",
"{",
"deliver",
"(",
"m",
")",
";",
"m",... | Poll the replay sequencer and process the messages until it returns null | [
"Poll",
"the",
"replay",
"sequencer",
"and",
"process",
"the",
"messages",
"until",
"it",
"returns",
"null"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L361-L382 |
61,273 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/SpScheduler.java | SpScheduler.sequenceForReplay | @Override
public boolean sequenceForReplay(VoltMessage message)
{
boolean canDeliver = false;
long sequenceWithUniqueId = Long.MIN_VALUE;
boolean commandLog = (message instanceof TransactionInfoBaseMessage &&
(((TransactionInfoBaseMessage)message).isForReplay()));
... | java | @Override
public boolean sequenceForReplay(VoltMessage message)
{
boolean canDeliver = false;
long sequenceWithUniqueId = Long.MIN_VALUE;
boolean commandLog = (message instanceof TransactionInfoBaseMessage &&
(((TransactionInfoBaseMessage)message).isForReplay()));
... | [
"@",
"Override",
"public",
"boolean",
"sequenceForReplay",
"(",
"VoltMessage",
"message",
")",
"{",
"boolean",
"canDeliver",
"=",
"false",
";",
"long",
"sequenceWithUniqueId",
"=",
"Long",
".",
"MIN_VALUE",
";",
"boolean",
"commandLog",
"=",
"(",
"message",
"ins... | Sequence the message for replay if it's for CL or DR.
@param message
@return true if the message can be delivered directly to the scheduler,
false if the message is queued | [
"Sequence",
"the",
"message",
"for",
"replay",
"if",
"it",
"s",
"for",
"CL",
"or",
"DR",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L391-L447 |
61,274 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/SpScheduler.java | SpScheduler.doLocalInitiateOffer | private void doLocalInitiateOffer(Iv2InitiateTaskMessage msg)
{
final VoltTrace.TraceEventBatch traceLog = VoltTrace.log(VoltTrace.Category.SPI);
if (traceLog != null) {
final String threadName = Thread.currentThread().getName(); // Thread name has to be materialized here
tra... | java | private void doLocalInitiateOffer(Iv2InitiateTaskMessage msg)
{
final VoltTrace.TraceEventBatch traceLog = VoltTrace.log(VoltTrace.Category.SPI);
if (traceLog != null) {
final String threadName = Thread.currentThread().getName(); // Thread name has to be materialized here
tra... | [
"private",
"void",
"doLocalInitiateOffer",
"(",
"Iv2InitiateTaskMessage",
"msg",
")",
"{",
"final",
"VoltTrace",
".",
"TraceEventBatch",
"traceLog",
"=",
"VoltTrace",
".",
"log",
"(",
"VoltTrace",
".",
"Category",
".",
"SPI",
")",
";",
"if",
"(",
"traceLog",
"... | Do the work necessary to turn the Iv2InitiateTaskMessage into a
TransactionTask which can be queued to the TransactionTaskQueue.
This is reused by both the normal message handling path and the repair
path, and assumes that the caller has dealt with or ensured that the
necessary ID, SpHandles, and replication issues are... | [
"Do",
"the",
"work",
"necessary",
"to",
"turn",
"the",
"Iv2InitiateTaskMessage",
"into",
"a",
"TransactionTask",
"which",
"can",
"be",
"queued",
"to",
"the",
"TransactionTaskQueue",
".",
"This",
"is",
"reused",
"by",
"both",
"the",
"normal",
"message",
"handling... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L650-L688 |
61,275 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/SpScheduler.java | SpScheduler.handleBorrowTaskMessage | private void handleBorrowTaskMessage(BorrowTaskMessage message) {
// borrows do not advance the sp handle. The handle would
// move backwards anyway once the next message is received
// from the SP leader.
long newSpHandle = getMaxScheduledTxnSpHandle();
Iv2Trace.logFragmentTaskM... | java | private void handleBorrowTaskMessage(BorrowTaskMessage message) {
// borrows do not advance the sp handle. The handle would
// move backwards anyway once the next message is received
// from the SP leader.
long newSpHandle = getMaxScheduledTxnSpHandle();
Iv2Trace.logFragmentTaskM... | [
"private",
"void",
"handleBorrowTaskMessage",
"(",
"BorrowTaskMessage",
"message",
")",
"{",
"// borrows do not advance the sp handle. The handle would",
"// move backwards anyway once the next message is received",
"// from the SP leader.",
"long",
"newSpHandle",
"=",
"getMaxScheduledTx... | to perform replicated reads or aggregation fragment work. | [
"to",
"perform",
"replicated",
"reads",
"or",
"aggregation",
"fragment",
"work",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L895-L941 |
61,276 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/SpScheduler.java | SpScheduler.handleFragmentTaskMessage | void handleFragmentTaskMessage(FragmentTaskMessage message)
{
FragmentTaskMessage msg = message;
long newSpHandle;
//The site has been marked as non-leader. The follow-up batches or fragments are processed here
if (!message.isForReplica() && (m_isLeader || message.isExecutedOnPreviou... | java | void handleFragmentTaskMessage(FragmentTaskMessage message)
{
FragmentTaskMessage msg = message;
long newSpHandle;
//The site has been marked as non-leader. The follow-up batches or fragments are processed here
if (!message.isForReplica() && (m_isLeader || message.isExecutedOnPreviou... | [
"void",
"handleFragmentTaskMessage",
"(",
"FragmentTaskMessage",
"message",
")",
"{",
"FragmentTaskMessage",
"msg",
"=",
"message",
";",
"long",
"newSpHandle",
";",
"//The site has been marked as non-leader. The follow-up batches or fragments are processed here",
"if",
"(",
"!",
... | doesn't matter, it isn't going to be used for anything. | [
"doesn",
"t",
"matter",
"it",
"isn",
"t",
"going",
"to",
"be",
"used",
"for",
"anything",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L952-L1046 |
61,277 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/SpScheduler.java | SpScheduler.offerPendingMPTasks | public void offerPendingMPTasks(long txnId)
{
Queue<TransactionTask> pendingTasks = m_mpsPendingDurability.get(txnId);
if (pendingTasks != null) {
for (TransactionTask task : pendingTasks) {
if (task instanceof SpProcedureTask) {
final VoltTrace.TraceE... | java | public void offerPendingMPTasks(long txnId)
{
Queue<TransactionTask> pendingTasks = m_mpsPendingDurability.get(txnId);
if (pendingTasks != null) {
for (TransactionTask task : pendingTasks) {
if (task instanceof SpProcedureTask) {
final VoltTrace.TraceE... | [
"public",
"void",
"offerPendingMPTasks",
"(",
"long",
"txnId",
")",
"{",
"Queue",
"<",
"TransactionTask",
">",
"pendingTasks",
"=",
"m_mpsPendingDurability",
".",
"get",
"(",
"txnId",
")",
";",
"if",
"(",
"pendingTasks",
"!=",
"null",
")",
"{",
"for",
"(",
... | Offer all fragment tasks and complete transaction tasks queued for durability for the given
MP transaction, and remove the entry from the pending map so that future ones won't be
queued.
@param txnId The MP transaction ID. | [
"Offer",
"all",
"fragment",
"tasks",
"and",
"complete",
"transaction",
"tasks",
"queued",
"for",
"durability",
"for",
"the",
"given",
"MP",
"transaction",
"and",
"remove",
"the",
"entry",
"from",
"the",
"pending",
"map",
"so",
"that",
"future",
"ones",
"won",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L1149-L1172 |
61,278 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/SpScheduler.java | SpScheduler.queueOrOfferMPTask | private void queueOrOfferMPTask(TransactionTask task)
{
// The pending map will only have an entry for the transaction if the first fragment is
// still pending durability.
Queue<TransactionTask> pendingTasks = m_mpsPendingDurability.get(task.getTxnId());
if (pendingTasks != null) {
... | java | private void queueOrOfferMPTask(TransactionTask task)
{
// The pending map will only have an entry for the transaction if the first fragment is
// still pending durability.
Queue<TransactionTask> pendingTasks = m_mpsPendingDurability.get(task.getTxnId());
if (pendingTasks != null) {
... | [
"private",
"void",
"queueOrOfferMPTask",
"(",
"TransactionTask",
"task",
")",
"{",
"// The pending map will only have an entry for the transaction if the first fragment is",
"// still pending durability.",
"Queue",
"<",
"TransactionTask",
">",
"pendingTasks",
"=",
"m_mpsPendingDurabi... | Check if the MP task has to be queued because the first fragment is still being logged
synchronously to the command log. If not, offer it to the transaction task queue.
@param task A fragment task or a complete transaction task | [
"Check",
"if",
"the",
"MP",
"task",
"has",
"to",
"be",
"queued",
"because",
"the",
"first",
"fragment",
"is",
"still",
"being",
"logged",
"synchronously",
"to",
"the",
"command",
"log",
".",
"If",
"not",
"offer",
"it",
"to",
"the",
"transaction",
"task",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L1180-L1190 |
61,279 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/SpScheduler.java | SpScheduler.handleIv2LogFaultMessage | private void handleIv2LogFaultMessage(Iv2LogFaultMessage message)
{
//call the internal log write with the provided SP handle and wait for the fault log IO to complete
SettableFuture<Boolean> written = writeIv2ViableReplayEntryInternal(message.getSpHandle());
// Get the Fault Log Status her... | java | private void handleIv2LogFaultMessage(Iv2LogFaultMessage message)
{
//call the internal log write with the provided SP handle and wait for the fault log IO to complete
SettableFuture<Boolean> written = writeIv2ViableReplayEntryInternal(message.getSpHandle());
// Get the Fault Log Status her... | [
"private",
"void",
"handleIv2LogFaultMessage",
"(",
"Iv2LogFaultMessage",
"message",
")",
"{",
"//call the internal log write with the provided SP handle and wait for the fault log IO to complete",
"SettableFuture",
"<",
"Boolean",
">",
"written",
"=",
"writeIv2ViableReplayEntryInterna... | Should only receive these messages at replicas, when told by the leader | [
"Should",
"only",
"receive",
"these",
"messages",
"at",
"replicas",
"when",
"told",
"by",
"the",
"leader"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L1396-L1411 |
61,280 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/SpScheduler.java | SpScheduler.blockFaultLogWriteStatus | private void blockFaultLogWriteStatus(SettableFuture<Boolean> written) {
boolean logWritten = false;
if (written != null) {
try {
logWritten = written.get();
} catch (InterruptedException e) {
} catch (ExecutionException e) {
if (tmLog... | java | private void blockFaultLogWriteStatus(SettableFuture<Boolean> written) {
boolean logWritten = false;
if (written != null) {
try {
logWritten = written.get();
} catch (InterruptedException e) {
} catch (ExecutionException e) {
if (tmLog... | [
"private",
"void",
"blockFaultLogWriteStatus",
"(",
"SettableFuture",
"<",
"Boolean",
">",
"written",
")",
"{",
"boolean",
"logWritten",
"=",
"false",
";",
"if",
"(",
"written",
"!=",
"null",
")",
"{",
"try",
"{",
"logWritten",
"=",
"written",
".",
"get",
... | Wait to get the status of a fault log write | [
"Wait",
"to",
"get",
"the",
"status",
"of",
"a",
"fault",
"log",
"write"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L1416-L1432 |
61,281 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/SpScheduler.java | SpScheduler.writeIv2ViableReplayEntryInternal | SettableFuture<Boolean> writeIv2ViableReplayEntryInternal(long spHandle)
{
SettableFuture<Boolean> written = null;
if (m_replayComplete) {
written = m_cl.logIv2Fault(m_mailbox.getHSId(),
new HashSet<Long>(m_replicaHSIds), m_partitionId, spHandle);
}
return... | java | SettableFuture<Boolean> writeIv2ViableReplayEntryInternal(long spHandle)
{
SettableFuture<Boolean> written = null;
if (m_replayComplete) {
written = m_cl.logIv2Fault(m_mailbox.getHSId(),
new HashSet<Long>(m_replicaHSIds), m_partitionId, spHandle);
}
return... | [
"SettableFuture",
"<",
"Boolean",
">",
"writeIv2ViableReplayEntryInternal",
"(",
"long",
"spHandle",
")",
"{",
"SettableFuture",
"<",
"Boolean",
">",
"written",
"=",
"null",
";",
"if",
"(",
"m_replayComplete",
")",
"{",
"written",
"=",
"m_cl",
".",
"logIv2Fault"... | Write the viable replay set to the command log with the provided SP Handle.
Pass back the future that is set after the fault log is written to disk. | [
"Write",
"the",
"viable",
"replay",
"set",
"to",
"the",
"command",
"log",
"with",
"the",
"provided",
"SP",
"Handle",
".",
"Pass",
"back",
"the",
"future",
"that",
"is",
"set",
"after",
"the",
"fault",
"log",
"is",
"written",
"to",
"disk",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L1590-L1598 |
61,282 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/SpScheduler.java | SpScheduler.updateReplicasFromMigrationLeaderFailedHost | public void updateReplicasFromMigrationLeaderFailedHost(int failedHostId) {
List<Long> replicas = new ArrayList<>();
for (long hsid : m_replicaHSIds) {
if (failedHostId != CoreUtils.getHostIdFromHSId(hsid)) {
replicas.add(hsid);
}
}
((InitiatorMail... | java | public void updateReplicasFromMigrationLeaderFailedHost(int failedHostId) {
List<Long> replicas = new ArrayList<>();
for (long hsid : m_replicaHSIds) {
if (failedHostId != CoreUtils.getHostIdFromHSId(hsid)) {
replicas.add(hsid);
}
}
((InitiatorMail... | [
"public",
"void",
"updateReplicasFromMigrationLeaderFailedHost",
"(",
"int",
"failedHostId",
")",
"{",
"List",
"<",
"Long",
">",
"replicas",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"long",
"hsid",
":",
"m_replicaHSIds",
")",
"{",
"if",
"(",... | update the duplicated counters after the host failure. | [
"update",
"the",
"duplicated",
"counters",
"after",
"the",
"host",
"failure",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L1790-L1798 |
61,283 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/SpScheduler.java | SpScheduler.forwardPendingTaskToRejoinNode | public void forwardPendingTaskToRejoinNode(long[] replicasAdded, long snapshotSpHandle) {
if (tmLog.isDebugEnabled()) {
tmLog.debug("Forward pending tasks in backlog to rejoin node: " + Arrays.toString(replicasAdded));
}
if (replicasAdded.length == 0) {
return;
}
... | java | public void forwardPendingTaskToRejoinNode(long[] replicasAdded, long snapshotSpHandle) {
if (tmLog.isDebugEnabled()) {
tmLog.debug("Forward pending tasks in backlog to rejoin node: " + Arrays.toString(replicasAdded));
}
if (replicasAdded.length == 0) {
return;
}
... | [
"public",
"void",
"forwardPendingTaskToRejoinNode",
"(",
"long",
"[",
"]",
"replicasAdded",
",",
"long",
"snapshotSpHandle",
")",
"{",
"if",
"(",
"tmLog",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"tmLog",
".",
"debug",
"(",
"\"Forward pending tasks in backlog to... | first fragment of stream snapshot and site runs the first fragment. | [
"first",
"fragment",
"of",
"stream",
"snapshot",
"and",
"site",
"runs",
"the",
"first",
"fragment",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L1804-L1831 |
61,284 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/SpScheduler.java | SpScheduler.cleanupTransactionBacklogOnRepair | @Override
public void cleanupTransactionBacklogOnRepair() {
if (m_isLeader && m_sendToHSIds.length > 0) {
m_mailbox.send(m_sendToHSIds, new MPBacklogFlushMessage());
}
Iterator<Entry<Long, TransactionState>> iter = m_outstandingTxns.entrySet().iterator();
while (iter.hasN... | java | @Override
public void cleanupTransactionBacklogOnRepair() {
if (m_isLeader && m_sendToHSIds.length > 0) {
m_mailbox.send(m_sendToHSIds, new MPBacklogFlushMessage());
}
Iterator<Entry<Long, TransactionState>> iter = m_outstandingTxns.entrySet().iterator();
while (iter.hasN... | [
"@",
"Override",
"public",
"void",
"cleanupTransactionBacklogOnRepair",
"(",
")",
"{",
"if",
"(",
"m_isLeader",
"&&",
"m_sendToHSIds",
".",
"length",
">",
"0",
")",
"{",
"m_mailbox",
".",
"send",
"(",
"m_sendToHSIds",
",",
"new",
"MPBacklogFlushMessage",
"(",
... | site leaders also forward the message to its replicas. | [
"site",
"leaders",
"also",
"forward",
"the",
"message",
"to",
"its",
"replicas",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SpScheduler.java#L1839-L1859 |
61,285 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java | StatementManager.reset | synchronized void reset() {
schemaMap.clear();
sqlLookup.clear();
csidMap.clear();
sessionUseMap.clear();
useMap.clear();
next_cs_id = 0;
} | java | synchronized void reset() {
schemaMap.clear();
sqlLookup.clear();
csidMap.clear();
sessionUseMap.clear();
useMap.clear();
next_cs_id = 0;
} | [
"synchronized",
"void",
"reset",
"(",
")",
"{",
"schemaMap",
".",
"clear",
"(",
")",
";",
"sqlLookup",
".",
"clear",
"(",
")",
";",
"csidMap",
".",
"clear",
"(",
")",
";",
"sessionUseMap",
".",
"clear",
"(",
")",
";",
"useMap",
".",
"clear",
"(",
"... | Clears all internal data structures, removing any references to compiled statements. | [
"Clears",
"all",
"internal",
"data",
"structures",
"removing",
"any",
"references",
"to",
"compiled",
"statements",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java#L128-L137 |
61,286 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java | StatementManager.resetStatements | synchronized void resetStatements() {
Iterator it = csidMap.values().iterator();
while (it.hasNext()) {
Statement cs = (Statement) it.next();
cs.clearVariables();
}
} | java | synchronized void resetStatements() {
Iterator it = csidMap.values().iterator();
while (it.hasNext()) {
Statement cs = (Statement) it.next();
cs.clearVariables();
}
} | [
"synchronized",
"void",
"resetStatements",
"(",
")",
"{",
"Iterator",
"it",
"=",
"csidMap",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"Statement",
"cs",
"=",
"(",
"Statement",
")"... | Used after a DDL change that could impact the compiled statements.
Clears references to CompiledStatement objects while keeping the counts
and references to the sql strings. | [
"Used",
"after",
"a",
"DDL",
"change",
"that",
"could",
"impact",
"the",
"compiled",
"statements",
".",
"Clears",
"references",
"to",
"CompiledStatement",
"objects",
"while",
"keeping",
"the",
"counts",
"and",
"references",
"to",
"the",
"sql",
"strings",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java#L144-L153 |
61,287 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java | StatementManager.getStatementID | private long getStatementID(HsqlName schema, String sql) {
LongValueHashMap sqlMap =
(LongValueHashMap) schemaMap.get(schema.hashCode());
if (sqlMap == null) {
return -1;
}
return sqlMap.get(sql, -1);
} | java | private long getStatementID(HsqlName schema, String sql) {
LongValueHashMap sqlMap =
(LongValueHashMap) schemaMap.get(schema.hashCode());
if (sqlMap == null) {
return -1;
}
return sqlMap.get(sql, -1);
} | [
"private",
"long",
"getStatementID",
"(",
"HsqlName",
"schema",
",",
"String",
"sql",
")",
"{",
"LongValueHashMap",
"sqlMap",
"=",
"(",
"LongValueHashMap",
")",
"schemaMap",
".",
"get",
"(",
"schema",
".",
"hashCode",
"(",
")",
")",
";",
"if",
"(",
"sqlMap... | Retrieves the registered compiled statement identifier associated with
the specified SQL String, or a value less than zero, if no such
statement has been registered.
@param schema the schema id
@param sql the SQL String
@return the compiled statement identifier associated with the
specified SQL String | [
"Retrieves",
"the",
"registered",
"compiled",
"statement",
"identifier",
"associated",
"with",
"the",
"specified",
"SQL",
"String",
"or",
"a",
"value",
"less",
"than",
"zero",
"if",
"no",
"such",
"statement",
"has",
"been",
"registered",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java#L177-L187 |
61,288 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java | StatementManager.getStatement | public synchronized Statement getStatement(Session session, long csid) {
Statement cs = (Statement) csidMap.get(csid);
if (cs == null) {
return null;
}
if (!cs.isValid()) {
String sql = (String) sqlLookup.get(csid);
// revalidate with the original ... | java | public synchronized Statement getStatement(Session session, long csid) {
Statement cs = (Statement) csidMap.get(csid);
if (cs == null) {
return null;
}
if (!cs.isValid()) {
String sql = (String) sqlLookup.get(csid);
// revalidate with the original ... | [
"public",
"synchronized",
"Statement",
"getStatement",
"(",
"Session",
"session",
",",
"long",
"csid",
")",
"{",
"Statement",
"cs",
"=",
"(",
"Statement",
")",
"csidMap",
".",
"get",
"(",
"csid",
")",
";",
"if",
"(",
"cs",
"==",
"null",
")",
"{",
"retu... | Returns an existing CompiledStatement object with the given
statement identifier. Returns null if the CompiledStatement object
has been invalidated and cannot be recompiled
@param session the session
@param csid the identifier of the requested CompiledStatement object
@return the requested CompiledStatement object | [
"Returns",
"an",
"existing",
"CompiledStatement",
"object",
"with",
"the",
"given",
"statement",
"identifier",
".",
"Returns",
"null",
"if",
"the",
"CompiledStatement",
"object",
"has",
"been",
"invalidated",
"and",
"cannot",
"be",
"recompiled"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java#L198-L226 |
61,289 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java | StatementManager.linkSession | private void linkSession(long csid, long sessionID) {
LongKeyIntValueHashMap scsMap;
scsMap = (LongKeyIntValueHashMap) sessionUseMap.get(sessionID);
if (scsMap == null) {
scsMap = new LongKeyIntValueHashMap();
sessionUseMap.put(sessionID, scsMap);
}
i... | java | private void linkSession(long csid, long sessionID) {
LongKeyIntValueHashMap scsMap;
scsMap = (LongKeyIntValueHashMap) sessionUseMap.get(sessionID);
if (scsMap == null) {
scsMap = new LongKeyIntValueHashMap();
sessionUseMap.put(sessionID, scsMap);
}
i... | [
"private",
"void",
"linkSession",
"(",
"long",
"csid",
",",
"long",
"sessionID",
")",
"{",
"LongKeyIntValueHashMap",
"scsMap",
";",
"scsMap",
"=",
"(",
"LongKeyIntValueHashMap",
")",
"sessionUseMap",
".",
"get",
"(",
"sessionID",
")",
";",
"if",
"(",
"scsMap",... | Links a session with a registered compiled statement. If this session has
not already been linked with the given statement, then the statement use
count is incremented.
@param csid the compiled statement identifier
@param sessionID the session identifier | [
"Links",
"a",
"session",
"with",
"a",
"registered",
"compiled",
"statement",
".",
"If",
"this",
"session",
"has",
"not",
"already",
"been",
"linked",
"with",
"the",
"given",
"statement",
"then",
"the",
"statement",
"use",
"count",
"is",
"incremented",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java#L236-L255 |
61,290 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java | StatementManager.registerStatement | private long registerStatement(long csid, Statement cs) {
if (csid < 0) {
csid = nextID();
int schemaid = cs.getSchemaName().hashCode();
LongValueHashMap sqlMap =
(LongValueHashMap) schemaMap.get(schemaid);
if (sqlMap == null) {
... | java | private long registerStatement(long csid, Statement cs) {
if (csid < 0) {
csid = nextID();
int schemaid = cs.getSchemaName().hashCode();
LongValueHashMap sqlMap =
(LongValueHashMap) schemaMap.get(schemaid);
if (sqlMap == null) {
... | [
"private",
"long",
"registerStatement",
"(",
"long",
"csid",
",",
"Statement",
"cs",
")",
"{",
"if",
"(",
"csid",
"<",
"0",
")",
"{",
"csid",
"=",
"nextID",
"(",
")",
";",
"int",
"schemaid",
"=",
"cs",
".",
"getSchemaName",
"(",
")",
".",
"hashCode",... | Registers a compiled statement to be managed.
The only caller should be a Session that is attempting to prepare
a statement for the first time or process a statement that has been
invalidated due to DDL changes.
@param csid existing id or negative if the statement is not yet managed
@param cs The CompiledStatement to... | [
"Registers",
"a",
"compiled",
"statement",
"to",
"be",
"managed",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java#L269-L292 |
61,291 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java | StatementManager.removeSession | synchronized void removeSession(long sessionID) {
LongKeyIntValueHashMap scsMap;
long csid;
Iterator i;
scsMap = (LongKeyIntValueHashMap) sessionUseMap.remove(sessionID);
if (scsMap == null) {
return;
}
i = scsMap.ke... | java | synchronized void removeSession(long sessionID) {
LongKeyIntValueHashMap scsMap;
long csid;
Iterator i;
scsMap = (LongKeyIntValueHashMap) sessionUseMap.remove(sessionID);
if (scsMap == null) {
return;
}
i = scsMap.ke... | [
"synchronized",
"void",
"removeSession",
"(",
"long",
"sessionID",
")",
"{",
"LongKeyIntValueHashMap",
"scsMap",
";",
"long",
"csid",
";",
"Iterator",
"i",
";",
"scsMap",
"=",
"(",
"LongKeyIntValueHashMap",
")",
"sessionUseMap",
".",
"remove",
"(",
"sessionID",
... | Releases the link betwen the session and all compiled statement objects
it is linked to. If any such statement is not linked with any other
session, it is removed from management.
@param sessionID the session identifier | [
"Releases",
"the",
"link",
"betwen",
"the",
"session",
"and",
"all",
"compiled",
"statement",
"objects",
"it",
"is",
"linked",
"to",
".",
"If",
"any",
"such",
"statement",
"is",
"not",
"linked",
"with",
"any",
"other",
"session",
"it",
"is",
"removed",
"fr... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java#L362-L398 |
61,292 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java | StatementManager.compile | synchronized Statement compile(Session session,
Result cmd) throws Throwable {
String sql = cmd.getMainString();
long csid = getStatementID(session.currentSchema, sql);
Statement cs = (Statement) csidMap.get(csid);
if (cs == null || !cs.isV... | java | synchronized Statement compile(Session session,
Result cmd) throws Throwable {
String sql = cmd.getMainString();
long csid = getStatementID(session.currentSchema, sql);
Statement cs = (Statement) csidMap.get(csid);
if (cs == null || !cs.isV... | [
"synchronized",
"Statement",
"compile",
"(",
"Session",
"session",
",",
"Result",
"cmd",
")",
"throws",
"Throwable",
"{",
"String",
"sql",
"=",
"cmd",
".",
"getMainString",
"(",
")",
";",
"long",
"csid",
"=",
"getStatementID",
"(",
"session",
".",
"currentSc... | Compiles an SQL statement and returns a CompiledStatement Object
@param session the session
@throws Throwable
@return CompiledStatement | [
"Compiles",
"an",
"SQL",
"statement",
"and",
"returns",
"a",
"CompiledStatement",
"Object"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java#L407-L425 |
61,293 | VoltDB/voltdb | src/frontend/org/voltdb/largequery/LargeBlockManager.java | LargeBlockManager.startupInstance | private void startupInstance() throws IOException {
assert (m_blockPathMap.isEmpty());
try {
clearSwapDir();
}
catch (Exception e) {
throw new IOException("Unable to clear large query swap directory: " + e.getMessage());
}
} | java | private void startupInstance() throws IOException {
assert (m_blockPathMap.isEmpty());
try {
clearSwapDir();
}
catch (Exception e) {
throw new IOException("Unable to clear large query swap directory: " + e.getMessage());
}
} | [
"private",
"void",
"startupInstance",
"(",
")",
"throws",
"IOException",
"{",
"assert",
"(",
"m_blockPathMap",
".",
"isEmpty",
"(",
")",
")",
";",
"try",
"{",
"clearSwapDir",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"throw",
"new",
... | On startup, clear out the large query swap directory.
@throws IOException | [
"On",
"startup",
"clear",
"out",
"the",
"large",
"query",
"swap",
"directory",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/largequery/LargeBlockManager.java#L114-L122 |
61,294 | VoltDB/voltdb | src/frontend/org/voltdb/largequery/LargeBlockManager.java | LargeBlockManager.storeBlock | void storeBlock(BlockId blockId, ByteBuffer block) throws IOException {
synchronized (m_accessLock) {
if (m_blockPathMap.containsKey(blockId)) {
throw new IllegalArgumentException("Request to store block that is already stored: "
+ ... | java | void storeBlock(BlockId blockId, ByteBuffer block) throws IOException {
synchronized (m_accessLock) {
if (m_blockPathMap.containsKey(blockId)) {
throw new IllegalArgumentException("Request to store block that is already stored: "
+ ... | [
"void",
"storeBlock",
"(",
"BlockId",
"blockId",
",",
"ByteBuffer",
"block",
")",
"throws",
"IOException",
"{",
"synchronized",
"(",
"m_accessLock",
")",
"{",
"if",
"(",
"m_blockPathMap",
".",
"containsKey",
"(",
"blockId",
")",
")",
"{",
"throw",
"new",
"Il... | Store the given block with the given ID to disk.
@param blockId the ID of the block
@param block the bytes for the block
@throws IOException | [
"Store",
"the",
"given",
"block",
"with",
"the",
"given",
"ID",
"to",
"disk",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/largequery/LargeBlockManager.java#L172-L191 |
61,295 | VoltDB/voltdb | src/frontend/org/voltdb/largequery/LargeBlockManager.java | LargeBlockManager.loadBlock | void loadBlock(BlockId blockId, ByteBuffer block) throws IOException {
synchronized (m_accessLock) {
if (! m_blockPathMap.containsKey(blockId)) {
throw new IllegalArgumentException("Request to load block that is not stored: " + blockId);
}
int origPosition = ... | java | void loadBlock(BlockId blockId, ByteBuffer block) throws IOException {
synchronized (m_accessLock) {
if (! m_blockPathMap.containsKey(blockId)) {
throw new IllegalArgumentException("Request to load block that is not stored: " + blockId);
}
int origPosition = ... | [
"void",
"loadBlock",
"(",
"BlockId",
"blockId",
",",
"ByteBuffer",
"block",
")",
"throws",
"IOException",
"{",
"synchronized",
"(",
"m_accessLock",
")",
"{",
"if",
"(",
"!",
"m_blockPathMap",
".",
"containsKey",
"(",
"blockId",
")",
")",
"{",
"throw",
"new",... | Read the block with the given ID into the given byte buffer.
@param blockId block id of the block to load
@param block The block to write the bytes to
@return The original address of the block
@throws IOException | [
"Read",
"the",
"block",
"with",
"the",
"given",
"ID",
"into",
"the",
"given",
"byte",
"buffer",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/largequery/LargeBlockManager.java#L200-L216 |
61,296 | VoltDB/voltdb | src/frontend/org/voltdb/largequery/LargeBlockManager.java | LargeBlockManager.releaseBlock | void releaseBlock(BlockId blockId) throws IOException {
synchronized (m_accessLock) {
if (! m_blockPathMap.containsKey(blockId)) {
throw new IllegalArgumentException("Request to release block that is not stored: " + blockId);
}
Path blockPath = m_blockPathMap... | java | void releaseBlock(BlockId blockId) throws IOException {
synchronized (m_accessLock) {
if (! m_blockPathMap.containsKey(blockId)) {
throw new IllegalArgumentException("Request to release block that is not stored: " + blockId);
}
Path blockPath = m_blockPathMap... | [
"void",
"releaseBlock",
"(",
"BlockId",
"blockId",
")",
"throws",
"IOException",
"{",
"synchronized",
"(",
"m_accessLock",
")",
"{",
"if",
"(",
"!",
"m_blockPathMap",
".",
"containsKey",
"(",
"blockId",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
... | The block with the given site id and block counter is no longer needed, so delete it from disk.
@param blockId The blockId of the block to release.
@throws IOException | [
"The",
"block",
"with",
"the",
"given",
"site",
"id",
"and",
"block",
"counter",
"is",
"no",
"longer",
"needed",
"so",
"delete",
"it",
"from",
"disk",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/largequery/LargeBlockManager.java#L223-L233 |
61,297 | VoltDB/voltdb | src/frontend/org/voltdb/largequery/LargeBlockManager.java | LargeBlockManager.releaseAllBlocks | private void releaseAllBlocks() throws IOException {
synchronized (m_accessLock) {
Set<Map.Entry<BlockId, Path>> entries = m_blockPathMap.entrySet();
while (! entries.isEmpty()) {
Map.Entry<BlockId, Path> entry = entries.iterator().next();
Files.delete(ent... | java | private void releaseAllBlocks() throws IOException {
synchronized (m_accessLock) {
Set<Map.Entry<BlockId, Path>> entries = m_blockPathMap.entrySet();
while (! entries.isEmpty()) {
Map.Entry<BlockId, Path> entry = entries.iterator().next();
Files.delete(ent... | [
"private",
"void",
"releaseAllBlocks",
"(",
")",
"throws",
"IOException",
"{",
"synchronized",
"(",
"m_accessLock",
")",
"{",
"Set",
"<",
"Map",
".",
"Entry",
"<",
"BlockId",
",",
"Path",
">",
">",
"entries",
"=",
"m_blockPathMap",
".",
"entrySet",
"(",
")... | Release all the blocks that are on disk, and delete them from the
map that tracks them.
@throws IOException | [
"Release",
"all",
"the",
"blocks",
"that",
"are",
"on",
"disk",
"and",
"delete",
"them",
"from",
"the",
"map",
"that",
"tracks",
"them",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/largequery/LargeBlockManager.java#L240-L250 |
61,298 | VoltDB/voltdb | src/frontend/org/voltdb/largequery/LargeBlockManager.java | LargeBlockManager.makeBlockPath | Path makeBlockPath(BlockId id) {
String filename = id.fileNameString();
return m_largeQuerySwapPath.resolve(filename);
} | java | Path makeBlockPath(BlockId id) {
String filename = id.fileNameString();
return m_largeQuerySwapPath.resolve(filename);
} | [
"Path",
"makeBlockPath",
"(",
"BlockId",
"id",
")",
"{",
"String",
"filename",
"=",
"id",
".",
"fileNameString",
"(",
")",
";",
"return",
"m_largeQuerySwapPath",
".",
"resolve",
"(",
"filename",
")",
";",
"}"
] | Given package visibility for unit testing purposes. | [
"Given",
"package",
"visibility",
"for",
"unit",
"testing",
"purposes",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/largequery/LargeBlockManager.java#L254-L257 |
61,299 | VoltDB/voltdb | src/frontend/org/voltdb/importclient/kinesis/KinesisStreamImporterConfig.java | KinesisStreamImporterConfig.discoverShards | public static List<Shard> discoverShards(String regionName, String streamName, String accessKey, String secretKey,
String appName) {
try {
Region region = RegionUtils.getRegion(regionName);
if (region != null) {
final AWSCredentials credentials = new BasicAWSC... | java | public static List<Shard> discoverShards(String regionName, String streamName, String accessKey, String secretKey,
String appName) {
try {
Region region = RegionUtils.getRegion(regionName);
if (region != null) {
final AWSCredentials credentials = new BasicAWSC... | [
"public",
"static",
"List",
"<",
"Shard",
">",
"discoverShards",
"(",
"String",
"regionName",
",",
"String",
"streamName",
",",
"String",
"accessKey",
",",
"String",
"secretKey",
",",
"String",
"appName",
")",
"{",
"try",
"{",
"Region",
"region",
"=",
"Regio... | connect to kinesis stream to discover the shards on the stream
@param regionName The region name where the stream resides
@param streamName The kinesis stream name
@param accessKey The user access key
@param secretKey The user secret key
@param appName The name of stream application
@return a list of shards | [
"connect",
"to",
"kinesis",
"stream",
"to",
"discover",
"the",
"shards",
"on",
"the",
"stream"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importclient/kinesis/KinesisStreamImporterConfig.java#L185-L207 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.