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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
62,000 | VoltDB/voltdb | src/frontend/org/voltdb/ProcedureStatsCollector.java | ProcedureStatsCollector.endProcedure | public final synchronized void endProcedure(boolean aborted, boolean failed, SingleCallStatsToken statsToken) {
if (aborted) {
m_procStatsData.m_abortCount++;
}
if (failed) {
m_procStatsData.m_failureCount++;
}
m_procStatsData.m_invocations++;
// ... | java | public final synchronized void endProcedure(boolean aborted, boolean failed, SingleCallStatsToken statsToken) {
if (aborted) {
m_procStatsData.m_abortCount++;
}
if (failed) {
m_procStatsData.m_failureCount++;
}
m_procStatsData.m_invocations++;
// ... | [
"public",
"final",
"synchronized",
"void",
"endProcedure",
"(",
"boolean",
"aborted",
",",
"boolean",
"failed",
",",
"SingleCallStatsToken",
"statsToken",
")",
"{",
"if",
"(",
"aborted",
")",
"{",
"m_procStatsData",
".",
"m_abortCount",
"++",
";",
"}",
"if",
"... | Called after a procedure is finished executing. Compares the start and end time and calculates
the statistics.
Synchronized because it modifies internal state and (for NT procs) can be called from multiple
threads. For transactional procs the lock should be uncontended., | [
"Called",
"after",
"a",
"procedure",
"is",
"finished",
"executing",
".",
"Compares",
"the",
"start",
"and",
"end",
"time",
"and",
"calculates",
"the",
"statistics",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ProcedureStatsCollector.java#L138-L207 |
62,001 | VoltDB/voltdb | src/frontend/org/voltdb/ProcedureStatsCollector.java | ProcedureStatsCollector.endFragment | public final synchronized void endFragment(String stmtName,
boolean isCoordinatorTask,
boolean failed,
boolean sampledStmt,
long dur... | java | public final synchronized void endFragment(String stmtName,
boolean isCoordinatorTask,
boolean failed,
boolean sampledStmt,
long dur... | [
"public",
"final",
"synchronized",
"void",
"endFragment",
"(",
"String",
"stmtName",
",",
"boolean",
"isCoordinatorTask",
",",
"boolean",
"failed",
",",
"boolean",
"sampledStmt",
",",
"long",
"duration",
",",
"int",
"resultSize",
",",
"int",
"parameterSetSize",
")... | This function will be called after a statement finish running.
It updates the data structures to maintain the statistics. | [
"This",
"function",
"will",
"be",
"called",
"after",
"a",
"statement",
"finish",
"running",
".",
"It",
"updates",
"the",
"data",
"structures",
"to",
"maintain",
"the",
"statistics",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ProcedureStatsCollector.java#L213-L272 |
62,002 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/SessionManager.java | SessionManager.newSession | public synchronized Session newSession(Database db, User user,
boolean readonly, boolean forLog,
int timeZoneSeconds) {
Session s = new Session(db, user, !forLog, !forLog, readonly,
sessionIdCo... | java | public synchronized Session newSession(Database db, User user,
boolean readonly, boolean forLog,
int timeZoneSeconds) {
Session s = new Session(db, user, !forLog, !forLog, readonly,
sessionIdCo... | [
"public",
"synchronized",
"Session",
"newSession",
"(",
"Database",
"db",
",",
"User",
"user",
",",
"boolean",
"readonly",
",",
"boolean",
"forLog",
",",
"int",
"timeZoneSeconds",
")",
"{",
"Session",
"s",
"=",
"new",
"Session",
"(",
"db",
",",
"user",
","... | Binds the specified Session object into this SessionManager's active
Session registry. This method is typically called internally as
the final step, when a successful connection has been made.
@param db the database to which the new Session is initially connected
@param user the Session User
@param readonly the ReadOn... | [
"Binds",
"the",
"specified",
"Session",
"object",
"into",
"this",
"SessionManager",
"s",
"active",
"Session",
"registry",
".",
"This",
"method",
"is",
"typically",
"called",
"internally",
"as",
"the",
"final",
"step",
"when",
"a",
"successful",
"connection",
"ha... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SessionManager.java#L101-L115 |
62,003 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/SessionManager.java | SessionManager.getSysSessionForScript | public Session getSysSessionForScript(Database db) {
Session session = new Session(db, db.getUserManager().getSysUser(),
false, false, false, 0, 0);
session.isProcessingScript = true;
return session;
} | java | public Session getSysSessionForScript(Database db) {
Session session = new Session(db, db.getUserManager().getSysUser(),
false, false, false, 0, 0);
session.isProcessingScript = true;
return session;
} | [
"public",
"Session",
"getSysSessionForScript",
"(",
"Database",
"db",
")",
"{",
"Session",
"session",
"=",
"new",
"Session",
"(",
"db",
",",
"db",
".",
"getUserManager",
"(",
")",
".",
"getSysUser",
"(",
")",
",",
"false",
",",
"false",
",",
"false",
","... | Retrieves a new SYS Session. | [
"Retrieves",
"a",
"new",
"SYS",
"Session",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SessionManager.java#L120-L128 |
62,004 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/SessionManager.java | SessionManager.closeAllSessions | public synchronized void closeAllSessions() {
// don't disconnect system user; need it to save database
Session[] sessions = getAllSessions();
for (int i = 0; i < sessions.length; i++) {
sessions[i].close();
}
} | java | public synchronized void closeAllSessions() {
// don't disconnect system user; need it to save database
Session[] sessions = getAllSessions();
for (int i = 0; i < sessions.length; i++) {
sessions[i].close();
}
} | [
"public",
"synchronized",
"void",
"closeAllSessions",
"(",
")",
"{",
"// don't disconnect system user; need it to save database",
"Session",
"[",
"]",
"sessions",
"=",
"getAllSessions",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"sessions",
... | Closes all Sessions registered with this SessionManager. | [
"Closes",
"all",
"Sessions",
"registered",
"with",
"this",
"SessionManager",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SessionManager.java#L177-L185 |
62,005 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/net/HostAndPort.java | HostAndPort.withDefaultPort | public HostAndPort withDefaultPort(int defaultPort) {
checkArgument(isValidPort(defaultPort));
if (hasPort() || port == defaultPort) {
return this;
}
return new HostAndPort(host, defaultPort, hasBracketlessColons);
} | java | public HostAndPort withDefaultPort(int defaultPort) {
checkArgument(isValidPort(defaultPort));
if (hasPort() || port == defaultPort) {
return this;
}
return new HostAndPort(host, defaultPort, hasBracketlessColons);
} | [
"public",
"HostAndPort",
"withDefaultPort",
"(",
"int",
"defaultPort",
")",
"{",
"checkArgument",
"(",
"isValidPort",
"(",
"defaultPort",
")",
")",
";",
"if",
"(",
"hasPort",
"(",
")",
"||",
"port",
"==",
"defaultPort",
")",
"{",
"return",
"this",
";",
"}"... | Provide a default port if the parsed string contained only a host.
You can chain this after {@link #fromString(String)} to include a port in case the port was
omitted from the input string. If a port was already provided, then this method is a no-op.
@param defaultPort a port number, from [0..65535]
@return a HostAnd... | [
"Provide",
"a",
"default",
"port",
"if",
"the",
"parsed",
"string",
"contained",
"only",
"a",
"host",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/net/HostAndPort.java#L263-L269 |
62,006 | VoltDB/voltdb | src/frontend/org/voltdb/CatalogContext.java | CatalogContext.writeCatalogJarToFile | public Runnable writeCatalogJarToFile(String path, String name, CatalogJarWriteMode mode) throws IOException
{
File catalogFile = new VoltFile(path, name);
File catalogTmpFile = new VoltFile(path, name + ".tmp");
if (mode == CatalogJarWriteMode.CATALOG_UPDATE) {
// This means a ... | java | public Runnable writeCatalogJarToFile(String path, String name, CatalogJarWriteMode mode) throws IOException
{
File catalogFile = new VoltFile(path, name);
File catalogTmpFile = new VoltFile(path, name + ".tmp");
if (mode == CatalogJarWriteMode.CATALOG_UPDATE) {
// This means a ... | [
"public",
"Runnable",
"writeCatalogJarToFile",
"(",
"String",
"path",
",",
"String",
"name",
",",
"CatalogJarWriteMode",
"mode",
")",
"throws",
"IOException",
"{",
"File",
"catalogFile",
"=",
"new",
"VoltFile",
"(",
"path",
",",
"name",
")",
";",
"File",
"cata... | Write, replace or update the catalog jar based on different cases. This function
assumes any IOException should lead to fatal crash.
@param path
@param name
@throws IOException | [
"Write",
"replace",
"or",
"update",
"the",
"catalog",
"jar",
"based",
"on",
"different",
"cases",
".",
"This",
"function",
"assumes",
"any",
"IOException",
"should",
"lead",
"to",
"fatal",
"crash",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/CatalogContext.java#L340-L374 |
62,007 | VoltDB/voltdb | src/frontend/org/voltdb/CatalogContext.java | CatalogContext.classForProcedureOrUDF | public Class<?> classForProcedureOrUDF(String procedureClassName)
throws LinkageError, ExceptionInInitializerError, ClassNotFoundException {
return classForProcedureOrUDF(procedureClassName, m_catalogInfo.m_jarfile.getLoader());
} | java | public Class<?> classForProcedureOrUDF(String procedureClassName)
throws LinkageError, ExceptionInInitializerError, ClassNotFoundException {
return classForProcedureOrUDF(procedureClassName, m_catalogInfo.m_jarfile.getLoader());
} | [
"public",
"Class",
"<",
"?",
">",
"classForProcedureOrUDF",
"(",
"String",
"procedureClassName",
")",
"throws",
"LinkageError",
",",
"ExceptionInInitializerError",
",",
"ClassNotFoundException",
"{",
"return",
"classForProcedureOrUDF",
"(",
"procedureClassName",
",",
"m_c... | Given a class name in the catalog jar, loads it from the jar, even if the
jar is served from an URL and isn't in the classpath.
@param procedureClassName The name of the class to load.
@return A java Class variable associated with the class.
@throws ClassNotFoundException if the class is not in the jar file. | [
"Given",
"a",
"class",
"name",
"in",
"the",
"catalog",
"jar",
"loads",
"it",
"from",
"the",
"jar",
"even",
"if",
"the",
"jar",
"is",
"served",
"from",
"an",
"URL",
"and",
"isn",
"t",
"in",
"the",
"classpath",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/CatalogContext.java#L384-L387 |
62,008 | VoltDB/voltdb | src/frontend/org/voltdb/CatalogContext.java | CatalogContext.getDeployment | public DeploymentType getDeployment()
{
if (m_memoizedDeployment == null) {
m_memoizedDeployment = CatalogUtil.getDeployment(
new ByteArrayInputStream(m_catalogInfo.m_deploymentBytes));
// This should NEVER happen
if (m_memoizedDeployment == null) {
... | java | public DeploymentType getDeployment()
{
if (m_memoizedDeployment == null) {
m_memoizedDeployment = CatalogUtil.getDeployment(
new ByteArrayInputStream(m_catalogInfo.m_deploymentBytes));
// This should NEVER happen
if (m_memoizedDeployment == null) {
... | [
"public",
"DeploymentType",
"getDeployment",
"(",
")",
"{",
"if",
"(",
"m_memoizedDeployment",
"==",
"null",
")",
"{",
"m_memoizedDeployment",
"=",
"CatalogUtil",
".",
"getDeployment",
"(",
"new",
"ByteArrayInputStream",
"(",
"m_catalogInfo",
".",
"m_deploymentBytes",... | Get the JAXB XML Deployment object, which is memoized | [
"Get",
"the",
"JAXB",
"XML",
"Deployment",
"object",
"which",
"is",
"memoized"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/CatalogContext.java#L533-L544 |
62,009 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlLinkedList.java | HsqlLinkedList.removeAfter | public boolean removeAfter(Node node) {
if (node == null || node.next == null) {
return false;
}
if (node.next == last) {
last = node;
}
node.next = node.next.next;
return true;
} | java | public boolean removeAfter(Node node) {
if (node == null || node.next == null) {
return false;
}
if (node.next == last) {
last = node;
}
node.next = node.next.next;
return true;
} | [
"public",
"boolean",
"removeAfter",
"(",
"Node",
"node",
")",
"{",
"if",
"(",
"node",
"==",
"null",
"||",
"node",
".",
"next",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"node",
".",
"next",
"==",
"last",
")",
"{",
"last",
"=... | Removes the given node to allow removel from iterators | [
"Removes",
"the",
"given",
"node",
"to",
"allow",
"removel",
"from",
"iterators"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlLinkedList.java#L74-L87 |
62,010 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/statements/CreateProcedure.java | CreateProcedure.parseCreateProcedureClauses | protected ProcedurePartitionData parseCreateProcedureClauses(
ProcedureDescriptor descriptor,
String clauses) throws VoltCompilerException {
// Nothing to do if there were no clauses.
// Null means there's no partition data to return.
// There's also no roles to add.... | java | protected ProcedurePartitionData parseCreateProcedureClauses(
ProcedureDescriptor descriptor,
String clauses) throws VoltCompilerException {
// Nothing to do if there were no clauses.
// Null means there's no partition data to return.
// There's also no roles to add.... | [
"protected",
"ProcedurePartitionData",
"parseCreateProcedureClauses",
"(",
"ProcedureDescriptor",
"descriptor",
",",
"String",
"clauses",
")",
"throws",
"VoltCompilerException",
"{",
"// Nothing to do if there were no clauses.",
"// Null means there's no partition data to return.",
"//... | Parse and validate the substring containing ALLOW and PARTITION
clauses for CREATE PROCEDURE.
@param clauses the substring to parse
@param descriptor procedure descriptor populated with role names from ALLOW clause
@return parsed and validated partition data or null if there was no PARTITION clause
@throws VoltCompi... | [
"Parse",
"and",
"validate",
"the",
"substring",
"containing",
"ALLOW",
"and",
"PARTITION",
"clauses",
"for",
"CREATE",
"PROCEDURE",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/statements/CreateProcedure.java#L48-L87 |
62,011 | VoltDB/voltdb | src/frontend/org/voltdb/utils/SQLCommand.java | SQLCommand.interactWithTheUser | public static void interactWithTheUser() throws Exception
{
final SQLConsoleReader interactiveReader =
new SQLConsoleReader(new FileInputStream(FileDescriptor.in), System.out);
interactiveReader.setBellEnabled(false);
FileHistory historyFile = null;
try {
... | java | public static void interactWithTheUser() throws Exception
{
final SQLConsoleReader interactiveReader =
new SQLConsoleReader(new FileInputStream(FileDescriptor.in), System.out);
interactiveReader.setBellEnabled(false);
FileHistory historyFile = null;
try {
... | [
"public",
"static",
"void",
"interactWithTheUser",
"(",
")",
"throws",
"Exception",
"{",
"final",
"SQLConsoleReader",
"interactiveReader",
"=",
"new",
"SQLConsoleReader",
"(",
"new",
"FileInputStream",
"(",
"FileDescriptor",
".",
"in",
")",
",",
"System",
".",
"ou... | The main loop for interactive mode. | [
"The",
"main",
"loop",
"for",
"interactive",
"mode",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/SQLCommand.java#L171-L221 |
62,012 | VoltDB/voltdb | src/frontend/org/voltdb/utils/SQLCommand.java | SQLCommand.executeScriptFiles | static void executeScriptFiles(List<FileInfo> filesInfo, SQLCommandLineReader parentLineReader, DDLParserCallback callback) throws IOException
{
LineReaderAdapter adapter = null;
SQLCommandLineReader reader = null;
StringBuilder statements = new StringBuilder();
if ( ! m_interactive... | java | static void executeScriptFiles(List<FileInfo> filesInfo, SQLCommandLineReader parentLineReader, DDLParserCallback callback) throws IOException
{
LineReaderAdapter adapter = null;
SQLCommandLineReader reader = null;
StringBuilder statements = new StringBuilder();
if ( ! m_interactive... | [
"static",
"void",
"executeScriptFiles",
"(",
"List",
"<",
"FileInfo",
">",
"filesInfo",
",",
"SQLCommandLineReader",
"parentLineReader",
",",
"DDLParserCallback",
"callback",
")",
"throws",
"IOException",
"{",
"LineReaderAdapter",
"adapter",
"=",
"null",
";",
"SQLComm... | Reads a script file and executes its content.
Note that the "script file" could be an inline batch,
i.e., a "here document" that is coming from the same input stream
as the "file" directive.
@param fileInfo Info on the file directive being processed
@param parentLineReader The current input stream, to be used for ... | [
"Reads",
"a",
"script",
"file",
"and",
"executes",
"its",
"content",
".",
"Note",
"that",
"the",
"script",
"file",
"could",
"be",
"an",
"inline",
"batch",
"i",
".",
"e",
".",
"a",
"here",
"document",
"that",
"is",
"coming",
"from",
"the",
"same",
"inpu... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/SQLCommand.java#L724-L803 |
62,013 | VoltDB/voltdb | src/frontend/org/voltdb/utils/SQLCommand.java | SQLCommand.printUsage | private static void printUsage(String msg)
{
System.out.print(msg);
System.out.println("\n");
m_exitCode = -1;
printUsage();
} | java | private static void printUsage(String msg)
{
System.out.print(msg);
System.out.println("\n");
m_exitCode = -1;
printUsage();
} | [
"private",
"static",
"void",
"printUsage",
"(",
"String",
"msg",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"msg",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\"\\n\"",
")",
";",
"m_exitCode",
"=",
"-",
"1",
";",
"printUsage",
"(",
... | General application support | [
"General",
"application",
"support"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/SQLCommand.java#L1287-L1293 |
62,014 | VoltDB/voltdb | src/frontend/org/voltdb/utils/SQLCommand.java | SQLCommand.printHelp | static void printHelp(OutputStream prtStr)
{
try {
InputStream is = SQLCommand.class.getResourceAsStream(m_readme);
while (is.available() > 0) {
byte[] bytes = new byte[is.available()]; // Fix for ENG-3440
is.read(bytes, 0, bytes.length);
... | java | static void printHelp(OutputStream prtStr)
{
try {
InputStream is = SQLCommand.class.getResourceAsStream(m_readme);
while (is.available() > 0) {
byte[] bytes = new byte[is.available()]; // Fix for ENG-3440
is.read(bytes, 0, bytes.length);
... | [
"static",
"void",
"printHelp",
"(",
"OutputStream",
"prtStr",
")",
"{",
"try",
"{",
"InputStream",
"is",
"=",
"SQLCommand",
".",
"class",
".",
"getResourceAsStream",
"(",
"m_readme",
")",
";",
"while",
"(",
"is",
".",
"available",
"(",
")",
">",
"0",
")"... | Default visibility is for test purposes. | [
"Default",
"visibility",
"is",
"for",
"test",
"purposes",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/SQLCommand.java#L1362-L1377 |
62,015 | VoltDB/voltdb | src/frontend/org/voltdb/utils/SQLCommand.java | SQLCommand.main | public static void main(String args[])
{
System.setProperty("voltdb_no_logging", "true");
int exitCode = mainWithReturnCode(args);
System.exit(exitCode);
} | java | public static void main(String args[])
{
System.setProperty("voltdb_no_logging", "true");
int exitCode = mainWithReturnCode(args);
System.exit(exitCode);
} | [
"public",
"static",
"void",
"main",
"(",
"String",
"args",
"[",
"]",
")",
"{",
"System",
".",
"setProperty",
"(",
"\"voltdb_no_logging\"",
",",
"\"true\"",
")",
";",
"int",
"exitCode",
"=",
"mainWithReturnCode",
"(",
"args",
")",
";",
"System",
".",
"exit"... | Application entry point | [
"Application",
"entry",
"point"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/SQLCommand.java#L1800-L1805 |
62,016 | VoltDB/voltdb | src/frontend/org/voltdb/rejoin/StreamSnapshotDataTarget.java | StreamSnapshotDataTarget.checkTimeout | private synchronized void checkTimeout(final long timeoutMs) {
final Entry<Integer, SendWork> oldest = m_outstandingWork.firstEntry();
if (oldest != null) {
final long now = System.currentTimeMillis();
SendWork work = oldest.getValue();
if ((now - work.m_ts) > timeout... | java | private synchronized void checkTimeout(final long timeoutMs) {
final Entry<Integer, SendWork> oldest = m_outstandingWork.firstEntry();
if (oldest != null) {
final long now = System.currentTimeMillis();
SendWork work = oldest.getValue();
if ((now - work.m_ts) > timeout... | [
"private",
"synchronized",
"void",
"checkTimeout",
"(",
"final",
"long",
"timeoutMs",
")",
"{",
"final",
"Entry",
"<",
"Integer",
",",
"SendWork",
">",
"oldest",
"=",
"m_outstandingWork",
".",
"firstEntry",
"(",
")",
";",
"if",
"(",
"oldest",
"!=",
"null",
... | Called by the watchdog from the periodic work thread to check if the
oldest unacked block is older than the timeout interval. | [
"Called",
"by",
"the",
"watchdog",
"from",
"the",
"periodic",
"work",
"thread",
"to",
"check",
"if",
"the",
"oldest",
"unacked",
"block",
"is",
"older",
"than",
"the",
"timeout",
"interval",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/rejoin/StreamSnapshotDataTarget.java#L347-L362 |
62,017 | VoltDB/voltdb | src/frontend/org/voltdb/rejoin/StreamSnapshotDataTarget.java | StreamSnapshotDataTarget.clearOutstanding | synchronized void clearOutstanding() {
if (m_outstandingWork.isEmpty() && (m_outstandingWorkCount.get() == 0)) {
return;
}
rejoinLog.trace("Clearing outstanding work.");
for (Entry<Integer, SendWork> e : m_outstandingWork.entrySet()) {
e.getValue().discard();
... | java | synchronized void clearOutstanding() {
if (m_outstandingWork.isEmpty() && (m_outstandingWorkCount.get() == 0)) {
return;
}
rejoinLog.trace("Clearing outstanding work.");
for (Entry<Integer, SendWork> e : m_outstandingWork.entrySet()) {
e.getValue().discard();
... | [
"synchronized",
"void",
"clearOutstanding",
"(",
")",
"{",
"if",
"(",
"m_outstandingWork",
".",
"isEmpty",
"(",
")",
"&&",
"(",
"m_outstandingWorkCount",
".",
"get",
"(",
")",
"==",
"0",
")",
")",
"{",
"return",
";",
"}",
"rejoinLog",
".",
"trace",
"(",
... | Idempotent, synchronized method to perform all cleanup of outstanding
work so buffers aren't leaked. | [
"Idempotent",
"synchronized",
"method",
"to",
"perform",
"all",
"cleanup",
"of",
"outstanding",
"work",
"so",
"buffers",
"aren",
"t",
"leaked",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/rejoin/StreamSnapshotDataTarget.java#L368-L380 |
62,018 | VoltDB/voltdb | src/frontend/org/voltdb/rejoin/StreamSnapshotDataTarget.java | StreamSnapshotDataTarget.receiveAck | @Override
public synchronized void receiveAck(int blockIndex) {
SendWork work = m_outstandingWork.get(blockIndex);
// releases the BBContainers and cleans up
if (work == null || work.m_ackCounter == null) {
rejoinLog.warn("Received invalid blockIndex ack for targetId " + m_targe... | java | @Override
public synchronized void receiveAck(int blockIndex) {
SendWork work = m_outstandingWork.get(blockIndex);
// releases the BBContainers and cleans up
if (work == null || work.m_ackCounter == null) {
rejoinLog.warn("Received invalid blockIndex ack for targetId " + m_targe... | [
"@",
"Override",
"public",
"synchronized",
"void",
"receiveAck",
"(",
"int",
"blockIndex",
")",
"{",
"SendWork",
"work",
"=",
"m_outstandingWork",
".",
"get",
"(",
"blockIndex",
")",
";",
"// releases the BBContainers and cleans up",
"if",
"(",
"work",
"==",
"null... | Synchronized method to handle the arrival of an Ack.
@param blockIndex The index of the block that is being acked. | [
"Synchronized",
"method",
"to",
"handle",
"the",
"arrival",
"of",
"an",
"Ack",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/rejoin/StreamSnapshotDataTarget.java#L386-L408 |
62,019 | VoltDB/voltdb | src/frontend/org/voltdb/rejoin/StreamSnapshotDataTarget.java | StreamSnapshotDataTarget.send | synchronized ListenableFuture<Boolean> send(StreamSnapshotMessageType type, int blockIndex, BBContainer chunk, boolean replicatedTable) {
SettableFuture<Boolean> sendFuture = SettableFuture.create();
rejoinLog.trace("Sending block " + blockIndex + " of type " + (replicatedTable?"REPLICATED ":"PARTITIONE... | java | synchronized ListenableFuture<Boolean> send(StreamSnapshotMessageType type, int blockIndex, BBContainer chunk, boolean replicatedTable) {
SettableFuture<Boolean> sendFuture = SettableFuture.create();
rejoinLog.trace("Sending block " + blockIndex + " of type " + (replicatedTable?"REPLICATED ":"PARTITIONE... | [
"synchronized",
"ListenableFuture",
"<",
"Boolean",
">",
"send",
"(",
"StreamSnapshotMessageType",
"type",
",",
"int",
"blockIndex",
",",
"BBContainer",
"chunk",
",",
"boolean",
"replicatedTable",
")",
"{",
"SettableFuture",
"<",
"Boolean",
">",
"sendFuture",
"=",
... | Send data to the rejoining node, tracking what was sent for ack tracking.
Synchronized to protect access to m_outstandingWork and to keep
m_outstandingWorkCount in sync with m_outstandingWork.
@param blockIndex Index useful for ack tracking and debugging
@param schemaContainer Optional schema for table (can be null)
@... | [
"Send",
"data",
"to",
"the",
"rejoining",
"node",
"tracking",
"what",
"was",
"sent",
"for",
"ack",
"tracking",
".",
"Synchronized",
"to",
"protect",
"access",
"to",
"m_outstandingWork",
"and",
"to",
"keep",
"m_outstandingWorkCount",
"in",
"sync",
"with",
"m_outs... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/rejoin/StreamSnapshotDataTarget.java#L582-L593 |
62,020 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogSchemaTools.java | CatalogSchemaTools.toSchemaWithoutInlineBatches | public static String toSchemaWithoutInlineBatches(String schema) {
StringBuilder sb = new StringBuilder(schema);
int i = sb.indexOf(batchSpecificComments);
if (i != -1) {
sb.delete(i, i + batchSpecificComments.length());
}
i = sb.indexOf(startBatch);
if (i != ... | java | public static String toSchemaWithoutInlineBatches(String schema) {
StringBuilder sb = new StringBuilder(schema);
int i = sb.indexOf(batchSpecificComments);
if (i != -1) {
sb.delete(i, i + batchSpecificComments.length());
}
i = sb.indexOf(startBatch);
if (i != ... | [
"public",
"static",
"String",
"toSchemaWithoutInlineBatches",
"(",
"String",
"schema",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
"schema",
")",
";",
"int",
"i",
"=",
"sb",
".",
"indexOf",
"(",
"batchSpecificComments",
")",
";",
"if",
... | Given a schema, strips out inline batch statements and associated comments.
@param schema The given schema
@return The given schema without batch statements and comments. | [
"Given",
"a",
"schema",
"strips",
"out",
"inline",
"batch",
"statements",
"and",
"associated",
"comments",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogSchemaTools.java#L646-L661 |
62,021 | VoltDB/voltdb | src/frontend/org/voltdb/client/Distributer.java | Distributer.shutdown | final void shutdown() throws InterruptedException {
// stop the old proc call reaper
m_timeoutReaperHandle.cancel(false);
m_ex.shutdown();
if (CoreUtils.isJunitTest()) {
m_ex.awaitTermination(1, TimeUnit.SECONDS);
} else {
m_ex.awaitTermination(365, TimeUn... | java | final void shutdown() throws InterruptedException {
// stop the old proc call reaper
m_timeoutReaperHandle.cancel(false);
m_ex.shutdown();
if (CoreUtils.isJunitTest()) {
m_ex.awaitTermination(1, TimeUnit.SECONDS);
} else {
m_ex.awaitTermination(365, TimeUn... | [
"final",
"void",
"shutdown",
"(",
")",
"throws",
"InterruptedException",
"{",
"// stop the old proc call reaper",
"m_timeoutReaperHandle",
".",
"cancel",
"(",
"false",
")",
";",
"m_ex",
".",
"shutdown",
"(",
")",
";",
"if",
"(",
"CoreUtils",
".",
"isJunitTest",
... | Shutdown the VoltNetwork allowing the Ports to close and free resources
like memory pools
@throws InterruptedException | [
"Shutdown",
"the",
"VoltNetwork",
"allowing",
"the",
"Ports",
"to",
"close",
"and",
"free",
"resources",
"like",
"memory",
"pools"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/Distributer.java#L1287-L1302 |
62,022 | VoltDB/voltdb | src/frontend/org/voltdb/client/Distributer.java | Distributer.getPartitionForParameter | public long getPartitionForParameter(byte typeValue, Object value) {
if (m_hashinator == null) {
return -1;
}
return m_hashinator.getHashedPartitionForParameter(typeValue, value);
} | java | public long getPartitionForParameter(byte typeValue, Object value) {
if (m_hashinator == null) {
return -1;
}
return m_hashinator.getHashedPartitionForParameter(typeValue, value);
} | [
"public",
"long",
"getPartitionForParameter",
"(",
"byte",
"typeValue",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"m_hashinator",
"==",
"null",
")",
"{",
"return",
"-",
"1",
";",
"}",
"return",
"m_hashinator",
".",
"getHashedPartitionForParameter",
"(",
"ty... | This is used by clients such as CSVLoader which puts processing into buckets.
@param typeValue volt Type
@param value the representative value
@return | [
"This",
"is",
"used",
"by",
"clients",
"such",
"as",
"CSVLoader",
"which",
"puts",
"processing",
"into",
"buckets",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/Distributer.java#L1546-L1551 |
62,023 | VoltDB/voltdb | src/frontend/org/voltdb/client/Distributer.java | Distributer.refreshPartitionKeys | private void refreshPartitionKeys(boolean topologyUpdate) {
long interval = System.currentTimeMillis() - m_lastPartitionKeyFetched.get();
if (!m_useClientAffinity && interval < PARTITION_KEYS_INFO_REFRESH_FREQUENCY) {
return;
}
try {
ProcedureInvocation invocat... | java | private void refreshPartitionKeys(boolean topologyUpdate) {
long interval = System.currentTimeMillis() - m_lastPartitionKeyFetched.get();
if (!m_useClientAffinity && interval < PARTITION_KEYS_INFO_REFRESH_FREQUENCY) {
return;
}
try {
ProcedureInvocation invocat... | [
"private",
"void",
"refreshPartitionKeys",
"(",
"boolean",
"topologyUpdate",
")",
"{",
"long",
"interval",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
"-",
"m_lastPartitionKeyFetched",
".",
"get",
"(",
")",
";",
"if",
"(",
"!",
"m_useClientAffinity",
"&&"... | Set up partitions.
@param topologyUpdate if true, it is called from topology update
@throws ProcCallException on any VoltDB specific failure.
@throws NoConnectionsException if this {@link Client} instance is not connected to any servers.
@throws IOException if there is a Java network or connection problem. | [
"Set",
"up",
"partitions",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/Distributer.java#L1582-L1609 |
62,024 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/OrderByPlanNode.java | OrderByPlanNode.addSortExpressions | public void addSortExpressions(List<AbstractExpression> sortExprs, List<SortDirectionType> sortDirs) {
assert(sortExprs.size() == sortDirs.size());
for (int i = 0; i < sortExprs.size(); ++i) {
addSortExpression(sortExprs.get(i), sortDirs.get(i));
}
} | java | public void addSortExpressions(List<AbstractExpression> sortExprs, List<SortDirectionType> sortDirs) {
assert(sortExprs.size() == sortDirs.size());
for (int i = 0; i < sortExprs.size(); ++i) {
addSortExpression(sortExprs.get(i), sortDirs.get(i));
}
} | [
"public",
"void",
"addSortExpressions",
"(",
"List",
"<",
"AbstractExpression",
">",
"sortExprs",
",",
"List",
"<",
"SortDirectionType",
">",
"sortDirs",
")",
"{",
"assert",
"(",
"sortExprs",
".",
"size",
"(",
")",
"==",
"sortDirs",
".",
"size",
"(",
")",
... | Add multiple sort expressions to the order-by
@param sortExprs List of the input expression on which to order the rows
@param sortDirs List of the corresponding sort order for each input expression | [
"Add",
"multiple",
"sort",
"expressions",
"to",
"the",
"order",
"-",
"by"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/OrderByPlanNode.java#L87-L92 |
62,025 | VoltDB/voltdb | src/frontend/org/voltdb/plannodes/OrderByPlanNode.java | OrderByPlanNode.addSortExpression | public void addSortExpression(AbstractExpression sortExpr, SortDirectionType sortDir)
{
assert(sortExpr != null);
// PlanNodes all need private deep copies of expressions
// so that the resolveColumnIndexes results
// don't get bashed by other nodes or subsequent planner runs
... | java | public void addSortExpression(AbstractExpression sortExpr, SortDirectionType sortDir)
{
assert(sortExpr != null);
// PlanNodes all need private deep copies of expressions
// so that the resolveColumnIndexes results
// don't get bashed by other nodes or subsequent planner runs
... | [
"public",
"void",
"addSortExpression",
"(",
"AbstractExpression",
"sortExpr",
",",
"SortDirectionType",
"sortDir",
")",
"{",
"assert",
"(",
"sortExpr",
"!=",
"null",
")",
";",
"// PlanNodes all need private deep copies of expressions",
"// so that the resolveColumnIndexes resul... | Add a sort expression to the order-by
@param sortExpr The input expression on which to order the rows
@param sortDir | [
"Add",
"a",
"sort",
"expression",
"to",
"the",
"order",
"-",
"by"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/OrderByPlanNode.java#L99-L107 |
62,026 | VoltDB/voltdb | src/frontend/org/voltcore/logging/VoltUtilLoggingLogger.java | VoltUtilLoggingLogger.getPriorityForLevel | static java.util.logging.Level getPriorityForLevel(Level level) {
switch (level) {
case DEBUG:
return java.util.logging.Level.FINEST;
case ERROR:
return java.util.logging.Level.SEVERE;
case FATAL:
return java.util.logging.Level... | java | static java.util.logging.Level getPriorityForLevel(Level level) {
switch (level) {
case DEBUG:
return java.util.logging.Level.FINEST;
case ERROR:
return java.util.logging.Level.SEVERE;
case FATAL:
return java.util.logging.Level... | [
"static",
"java",
".",
"util",
".",
"logging",
".",
"Level",
"getPriorityForLevel",
"(",
"Level",
"level",
")",
"{",
"switch",
"(",
"level",
")",
"{",
"case",
"DEBUG",
":",
"return",
"java",
".",
"util",
".",
"logging",
".",
"Level",
".",
"FINEST",
";"... | Convert the VoltLogger Level to the java.ulil.logging Level | [
"Convert",
"the",
"VoltLogger",
"Level",
"to",
"the",
"java",
".",
"ulil",
".",
"logging",
"Level"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/logging/VoltUtilLoggingLogger.java#L32-L49 |
62,027 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java | TableWorks.checkAddColumn | void checkAddColumn(ColumnSchema col) {
if (table.isText() && !table.isEmpty(session)) {
throw Error.error(ErrorCode.X_S0521);
}
if (table.findColumn(col.getName().name) != -1) {
throw Error.error(ErrorCode.X_42504);
}
if (col.isPrimaryKey() && table.ha... | java | void checkAddColumn(ColumnSchema col) {
if (table.isText() && !table.isEmpty(session)) {
throw Error.error(ErrorCode.X_S0521);
}
if (table.findColumn(col.getName().name) != -1) {
throw Error.error(ErrorCode.X_42504);
}
if (col.isPrimaryKey() && table.ha... | [
"void",
"checkAddColumn",
"(",
"ColumnSchema",
"col",
")",
"{",
"if",
"(",
"table",
".",
"isText",
"(",
")",
"&&",
"!",
"table",
".",
"isEmpty",
"(",
"session",
")",
")",
"{",
"throw",
"Error",
".",
"error",
"(",
"ErrorCode",
".",
"X_S0521",
")",
";"... | Checks if the attributes of the Column argument, c, are compatible with
the operation of adding such a Column to the Table argument, table.
@param col the Column to add to the Table, t | [
"Checks",
"if",
"the",
"attributes",
"of",
"the",
"Column",
"argument",
"c",
"are",
"compatible",
"with",
"the",
"operation",
"of",
"adding",
"such",
"a",
"Column",
"to",
"the",
"Table",
"argument",
"table",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java#L216-L239 |
62,028 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java | TableWorks.makeNewTable | void makeNewTable(OrderedHashSet dropConstraintSet,
OrderedHashSet dropIndexSet) {
Table tn = table.moveDefinition(session, table.tableType, null, null,
null, -1, 0, dropConstraintSet,
dropIndexSet);
... | java | void makeNewTable(OrderedHashSet dropConstraintSet,
OrderedHashSet dropIndexSet) {
Table tn = table.moveDefinition(session, table.tableType, null, null,
null, -1, 0, dropConstraintSet,
dropIndexSet);
... | [
"void",
"makeNewTable",
"(",
"OrderedHashSet",
"dropConstraintSet",
",",
"OrderedHashSet",
"dropIndexSet",
")",
"{",
"Table",
"tn",
"=",
"table",
".",
"moveDefinition",
"(",
"session",
",",
"table",
".",
"tableType",
",",
"null",
",",
"null",
",",
"null",
",",... | Drops constriants and their indexes in table. Uses set of names. | [
"Drops",
"constriants",
"and",
"their",
"indexes",
"in",
"table",
".",
"Uses",
"set",
"of",
"names",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java#L452-L469 |
62,029 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java | TableWorks.addIndex | Index addIndex(int[] col, HsqlName name, boolean unique, boolean migrating) {
Index newindex;
if (table.isEmpty(session) || table.isIndexingMutable()) {
PersistentStore store = session.sessionData.getRowStore(table);
newindex = table.createIndex(store, name, col, null, null, u... | java | Index addIndex(int[] col, HsqlName name, boolean unique, boolean migrating) {
Index newindex;
if (table.isEmpty(session) || table.isIndexingMutable()) {
PersistentStore store = session.sessionData.getRowStore(table);
newindex = table.createIndex(store, name, col, null, null, u... | [
"Index",
"addIndex",
"(",
"int",
"[",
"]",
"col",
",",
"HsqlName",
"name",
",",
"boolean",
"unique",
",",
"boolean",
"migrating",
")",
"{",
"Index",
"newindex",
";",
"if",
"(",
"table",
".",
"isEmpty",
"(",
"session",
")",
"||",
"table",
".",
"isIndexi... | Because of the way indexes and column data are held in memory and on
disk, it is necessary to recreate the table when an index is added to a
non-empty cached table.
<p> With empty tables, Index objects are simply added
<p> With MEOMRY and TEXT tables, a new index is built up and nodes for
earch row are interlinked (f... | [
"Because",
"of",
"the",
"way",
"indexes",
"and",
"column",
"data",
"are",
"held",
"in",
"memory",
"and",
"on",
"disk",
"it",
"is",
"necessary",
"to",
"recreate",
"the",
"table",
"when",
"an",
"index",
"is",
"added",
"to",
"a",
"non",
"-",
"empty",
"cac... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java#L486-L517 |
62,030 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java | TableWorks.dropIndex | void dropIndex(String indexName) {
Index index;
index = table.getIndex(indexName);
if (table.isIndexingMutable()) {
table.dropIndex(session, indexName);
} else {
OrderedHashSet indexSet = new OrderedHashSet();
indexSet.add(table.getIndex(indexName)... | java | void dropIndex(String indexName) {
Index index;
index = table.getIndex(indexName);
if (table.isIndexingMutable()) {
table.dropIndex(session, indexName);
} else {
OrderedHashSet indexSet = new OrderedHashSet();
indexSet.add(table.getIndex(indexName)... | [
"void",
"dropIndex",
"(",
"String",
"indexName",
")",
"{",
"Index",
"index",
";",
"index",
"=",
"table",
".",
"getIndex",
"(",
"indexName",
")",
";",
"if",
"(",
"table",
".",
"isIndexingMutable",
"(",
")",
")",
"{",
"table",
".",
"dropIndex",
"(",
"ses... | Because of the way indexes and column data are held in memory and on
disk, it is necessary to recreate the table when an index is added to or
removed from a non-empty table.
<p> Originally, this method would break existing foreign keys as the
table order in the DB was changed. The new table is now linked in place
of t... | [
"Because",
"of",
"the",
"way",
"indexes",
"and",
"column",
"data",
"are",
"held",
"in",
"memory",
"and",
"on",
"disk",
"it",
"is",
"necessary",
"to",
"recreate",
"the",
"table",
"when",
"an",
"index",
"is",
"added",
"to",
"or",
"removed",
"from",
"a",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java#L615-L645 |
62,031 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java | TableWorks.retypeColumn | void retypeColumn(ColumnSchema oldCol, ColumnSchema newCol) {
boolean allowed = true;
int oldType = oldCol.getDataType().typeCode;
int newType = newCol.getDataType().typeCode;
if (!table.isEmpty(session) && oldType != newType) {
allowed =
newCol.getD... | java | void retypeColumn(ColumnSchema oldCol, ColumnSchema newCol) {
boolean allowed = true;
int oldType = oldCol.getDataType().typeCode;
int newType = newCol.getDataType().typeCode;
if (!table.isEmpty(session) && oldType != newType) {
allowed =
newCol.getD... | [
"void",
"retypeColumn",
"(",
"ColumnSchema",
"oldCol",
",",
"ColumnSchema",
"newCol",
")",
"{",
"boolean",
"allowed",
"=",
"true",
";",
"int",
"oldType",
"=",
"oldCol",
".",
"getDataType",
"(",
")",
".",
"typeCode",
";",
"int",
"newType",
"=",
"newCol",
".... | Allows changing the type or addition of an IDENTITY sequence.
@param oldCol Column
@param newCol Column | [
"Allows",
"changing",
"the",
"type",
"or",
"addition",
"of",
"an",
"IDENTITY",
"sequence",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java#L895-L977 |
62,032 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java | TableWorks.setColNullability | void setColNullability(ColumnSchema column, boolean nullable) {
Constraint c = null;
int colIndex = table.getColumnIndex(column.getName().name);
if (column.isNullable() == nullable) {
return;
}
if (nullable) {
if (column.isPrimaryKey()) {
... | java | void setColNullability(ColumnSchema column, boolean nullable) {
Constraint c = null;
int colIndex = table.getColumnIndex(column.getName().name);
if (column.isNullable() == nullable) {
return;
}
if (nullable) {
if (column.isPrimaryKey()) {
... | [
"void",
"setColNullability",
"(",
"ColumnSchema",
"column",
",",
"boolean",
"nullable",
")",
"{",
"Constraint",
"c",
"=",
"null",
";",
"int",
"colIndex",
"=",
"table",
".",
"getColumnIndex",
"(",
"column",
".",
"getName",
"(",
")",
".",
"name",
")",
";",
... | performs the work for changing the nullability of a column
@param column Column
@param nullable boolean | [
"performs",
"the",
"work",
"for",
"changing",
"the",
"nullability",
"of",
"a",
"column"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java#L1028-L1058 |
62,033 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java | TableWorks.setColDefaultExpression | void setColDefaultExpression(int colIndex, Expression def) {
if (def == null) {
table.checkColumnInFKConstraint(colIndex, Constraint.SET_DEFAULT);
}
table.setDefaultExpression(colIndex, def);
} | java | void setColDefaultExpression(int colIndex, Expression def) {
if (def == null) {
table.checkColumnInFKConstraint(colIndex, Constraint.SET_DEFAULT);
}
table.setDefaultExpression(colIndex, def);
} | [
"void",
"setColDefaultExpression",
"(",
"int",
"colIndex",
",",
"Expression",
"def",
")",
"{",
"if",
"(",
"def",
"==",
"null",
")",
"{",
"table",
".",
"checkColumnInFKConstraint",
"(",
"colIndex",
",",
"Constraint",
".",
"SET_DEFAULT",
")",
";",
"}",
"table"... | performs the work for changing the default value of a column
@param colIndex int
@param def Expression | [
"performs",
"the",
"work",
"for",
"changing",
"the",
"default",
"value",
"of",
"a",
"column"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java#L1066-L1073 |
62,034 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java | TableWorks.setTableType | public boolean setTableType(Session session, int newType) {
int currentType = table.getTableType();
if (currentType == newType) {
return false;
}
switch (newType) {
case TableBase.CACHED_TABLE :
break;
case TableBase.MEMORY_TABLE :... | java | public boolean setTableType(Session session, int newType) {
int currentType = table.getTableType();
if (currentType == newType) {
return false;
}
switch (newType) {
case TableBase.CACHED_TABLE :
break;
case TableBase.MEMORY_TABLE :... | [
"public",
"boolean",
"setTableType",
"(",
"Session",
"session",
",",
"int",
"newType",
")",
"{",
"int",
"currentType",
"=",
"table",
".",
"getTableType",
"(",
")",
";",
"if",
"(",
"currentType",
"==",
"newType",
")",
"{",
"return",
"false",
";",
"}",
"sw... | Changes the type of a table
@param session Session
@param newType int
@return boolean | [
"Changes",
"the",
"type",
"of",
"a",
"table"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java#L1082-L1122 |
62,035 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java | TableWorks.addExprIndex | Index addExprIndex(int[] col, Expression[] indexExprs, HsqlName name, boolean unique, boolean migrating, Expression predicate) {
Index newindex;
if (table.isEmpty(session) || table.isIndexingMutable()) {
newindex = table.createAndAddExprIndexStructure(name, col, indexExprs, unique, migrati... | java | Index addExprIndex(int[] col, Expression[] indexExprs, HsqlName name, boolean unique, boolean migrating, Expression predicate) {
Index newindex;
if (table.isEmpty(session) || table.isIndexingMutable()) {
newindex = table.createAndAddExprIndexStructure(name, col, indexExprs, unique, migrati... | [
"Index",
"addExprIndex",
"(",
"int",
"[",
"]",
"col",
",",
"Expression",
"[",
"]",
"indexExprs",
",",
"HsqlName",
"name",
",",
"boolean",
"unique",
",",
"boolean",
"migrating",
",",
"Expression",
"predicate",
")",
"{",
"Index",
"newindex",
";",
"if",
"(",
... | A VoltDB extended variant of addIndex that supports indexed generalized non-column expressions.
@param cols int[]
@param indexExprs Expression[]
@param name HsqlName
@param unique boolean
@param predicate Expression
@return new index | [
"A",
"VoltDB",
"extended",
"variant",
"of",
"addIndex",
"that",
"supports",
"indexed",
"generalized",
"non",
"-",
"column",
"expressions",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java#L1172-L1203 |
62,036 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java | TableWorks.addIndex | Index addIndex(int[] col, HsqlName name, boolean unique, boolean migrating, Expression predicate) {
return addIndex(col, name, unique, migrating).withPredicate(predicate);
} | java | Index addIndex(int[] col, HsqlName name, boolean unique, boolean migrating, Expression predicate) {
return addIndex(col, name, unique, migrating).withPredicate(predicate);
} | [
"Index",
"addIndex",
"(",
"int",
"[",
"]",
"col",
",",
"HsqlName",
"name",
",",
"boolean",
"unique",
",",
"boolean",
"migrating",
",",
"Expression",
"predicate",
")",
"{",
"return",
"addIndex",
"(",
"col",
",",
"name",
",",
"unique",
",",
"migrating",
")... | A VoltDB extended variant of addIndex that supports partial index predicate.
@param col int[]
@param name HsqlName
@param unique boolean
@param migrating is MIGRATING INDEX being created
@param predicate Expression
@return new index | [
"A",
"VoltDB",
"extended",
"variant",
"of",
"addIndex",
"that",
"supports",
"partial",
"index",
"predicate",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java#L1215-L1217 |
62,037 | VoltDB/voltdb | src/frontend/org/voltdb/planner/ParsedColInfo.java | ParsedColInfo.fromOrderByXml | static public ParsedColInfo fromOrderByXml(AbstractParsedStmt parsedStmt,
VoltXMLElement orderByXml) {
// A generic adjuster that just calls finalizeValueTypes
ExpressionAdjuster adjuster = new ExpressionAdjuster() {
@Override
public AbstractExpression adjust(Abstract... | java | static public ParsedColInfo fromOrderByXml(AbstractParsedStmt parsedStmt,
VoltXMLElement orderByXml) {
// A generic adjuster that just calls finalizeValueTypes
ExpressionAdjuster adjuster = new ExpressionAdjuster() {
@Override
public AbstractExpression adjust(Abstract... | [
"static",
"public",
"ParsedColInfo",
"fromOrderByXml",
"(",
"AbstractParsedStmt",
"parsedStmt",
",",
"VoltXMLElement",
"orderByXml",
")",
"{",
"// A generic adjuster that just calls finalizeValueTypes",
"ExpressionAdjuster",
"adjuster",
"=",
"new",
"ExpressionAdjuster",
"(",
")... | Construct a ParsedColInfo from Volt XML. | [
"Construct",
"a",
"ParsedColInfo",
"from",
"Volt",
"XML",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedColInfo.java#L72-L84 |
62,038 | VoltDB/voltdb | src/frontend/org/voltdb/planner/ParsedColInfo.java | ParsedColInfo.fromOrderByXml | static public ParsedColInfo fromOrderByXml(AbstractParsedStmt parsedStmt,
VoltXMLElement orderByXml, ExpressionAdjuster adjuster) {
// make sure everything is kosher
assert(orderByXml.name.equalsIgnoreCase("orderby"));
// get desc/asc
String desc = orderByXml.attributes.get... | java | static public ParsedColInfo fromOrderByXml(AbstractParsedStmt parsedStmt,
VoltXMLElement orderByXml, ExpressionAdjuster adjuster) {
// make sure everything is kosher
assert(orderByXml.name.equalsIgnoreCase("orderby"));
// get desc/asc
String desc = orderByXml.attributes.get... | [
"static",
"public",
"ParsedColInfo",
"fromOrderByXml",
"(",
"AbstractParsedStmt",
"parsedStmt",
",",
"VoltXMLElement",
"orderByXml",
",",
"ExpressionAdjuster",
"adjuster",
")",
"{",
"// make sure everything is kosher",
"assert",
"(",
"orderByXml",
".",
"name",
".",
"equal... | Construct a ParsedColInfo from Volt XML.
Allow caller to specify actions to finalize the parsed expression. | [
"Construct",
"a",
"ParsedColInfo",
"from",
"Volt",
"XML",
".",
"Allow",
"caller",
"to",
"specify",
"actions",
"to",
"finalize",
"the",
"parsed",
"expression",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedColInfo.java#L122-L184 |
62,039 | VoltDB/voltdb | src/frontend/org/voltdb/planner/ParsedColInfo.java | ParsedColInfo.asSchemaColumn | public SchemaColumn asSchemaColumn() {
String columnAlias = (m_alias == null) ? m_columnName : m_alias;
return new SchemaColumn(m_tableName, m_tableAlias,
m_columnName, columnAlias,
m_expression, m_differentiator);
} | java | public SchemaColumn asSchemaColumn() {
String columnAlias = (m_alias == null) ? m_columnName : m_alias;
return new SchemaColumn(m_tableName, m_tableAlias,
m_columnName, columnAlias,
m_expression, m_differentiator);
} | [
"public",
"SchemaColumn",
"asSchemaColumn",
"(",
")",
"{",
"String",
"columnAlias",
"=",
"(",
"m_alias",
"==",
"null",
")",
"?",
"m_columnName",
":",
"m_alias",
";",
"return",
"new",
"SchemaColumn",
"(",
"m_tableName",
",",
"m_tableAlias",
",",
"m_columnName",
... | Return this as an instance of SchemaColumn | [
"Return",
"this",
"as",
"an",
"instance",
"of",
"SchemaColumn"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedColInfo.java#L187-L192 |
62,040 | VoltDB/voltdb | src/frontend/org/voltdb/jni/ExecutionEngine.java | ExecutionEngine.crashVoltDB | public static void crashVoltDB(String reason, String traces[], String filename, int lineno) {
VoltLogger hostLog = new VoltLogger("HOST");
String fn = (filename == null) ? "unknown" : filename;
String re = (reason == null) ? "Fatal EE error." : reason;
hostLog.fatal(re + " In " + fn + ":... | java | public static void crashVoltDB(String reason, String traces[], String filename, int lineno) {
VoltLogger hostLog = new VoltLogger("HOST");
String fn = (filename == null) ? "unknown" : filename;
String re = (reason == null) ? "Fatal EE error." : reason;
hostLog.fatal(re + " In " + fn + ":... | [
"public",
"static",
"void",
"crashVoltDB",
"(",
"String",
"reason",
",",
"String",
"traces",
"[",
"]",
",",
"String",
"filename",
",",
"int",
"lineno",
")",
"{",
"VoltLogger",
"hostLog",
"=",
"new",
"VoltLogger",
"(",
"\"HOST\"",
")",
";",
"String",
"fn",
... | Call VoltDB.crashVoltDB on behalf of the EE
@param reason Reason the EE crashed | [
"Call",
"VoltDB",
".",
"crashVoltDB",
"on",
"behalf",
"of",
"the",
"EE"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngine.java#L385-L396 |
62,041 | VoltDB/voltdb | src/frontend/org/voltdb/jni/ExecutionEngine.java | ExecutionEngine.nextDependencyAsBytes | public byte[] nextDependencyAsBytes(final int dependencyId) {
final VoltTable vt = m_dependencyTracker.nextDependency(dependencyId);
if (vt != null) {
final ByteBuffer buf2 = PrivateVoltTableFactory.getTableDataReference(vt);
int pos = buf2.position();
byte[] bytes =... | java | public byte[] nextDependencyAsBytes(final int dependencyId) {
final VoltTable vt = m_dependencyTracker.nextDependency(dependencyId);
if (vt != null) {
final ByteBuffer buf2 = PrivateVoltTableFactory.getTableDataReference(vt);
int pos = buf2.position();
byte[] bytes =... | [
"public",
"byte",
"[",
"]",
"nextDependencyAsBytes",
"(",
"final",
"int",
"dependencyId",
")",
"{",
"final",
"VoltTable",
"vt",
"=",
"m_dependencyTracker",
".",
"nextDependency",
"(",
"dependencyId",
")",
";",
"if",
"(",
"vt",
"!=",
"null",
")",
"{",
"final"... | Called from the ExecutionEngine to request serialized dependencies. | [
"Called",
"from",
"the",
"ExecutionEngine",
"to",
"request",
"serialized",
"dependencies",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngine.java#L401-L414 |
62,042 | VoltDB/voltdb | src/frontend/org/voltdb/jni/ExecutionEngine.java | ExecutionEngine.loadCatalog | public void loadCatalog(long timestamp, String serializedCatalog) {
try {
setupProcedure(null);
m_fragmentContext = FragmentContext.CATALOG_LOAD;
coreLoadCatalog(timestamp, getStringBytes(serializedCatalog));
}
finally {
m_fragmentContext = Fragmen... | java | public void loadCatalog(long timestamp, String serializedCatalog) {
try {
setupProcedure(null);
m_fragmentContext = FragmentContext.CATALOG_LOAD;
coreLoadCatalog(timestamp, getStringBytes(serializedCatalog));
}
finally {
m_fragmentContext = Fragmen... | [
"public",
"void",
"loadCatalog",
"(",
"long",
"timestamp",
",",
"String",
"serializedCatalog",
")",
"{",
"try",
"{",
"setupProcedure",
"(",
"null",
")",
";",
"m_fragmentContext",
"=",
"FragmentContext",
".",
"CATALOG_LOAD",
";",
"coreLoadCatalog",
"(",
"timestamp"... | Pass the catalog to the engine | [
"Pass",
"the",
"catalog",
"to",
"the",
"engine"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngine.java#L610-L619 |
62,043 | VoltDB/voltdb | src/frontend/org/voltdb/jni/ExecutionEngine.java | ExecutionEngine.updateCatalog | public final void updateCatalog(final long timestamp, final boolean isStreamUpdate, final String diffCommands) throws EEException {
try {
setupProcedure(null);
m_fragmentContext = FragmentContext.CATALOG_UPDATE;
coreUpdateCatalog(timestamp, isStreamUpdate, diffCommands);
... | java | public final void updateCatalog(final long timestamp, final boolean isStreamUpdate, final String diffCommands) throws EEException {
try {
setupProcedure(null);
m_fragmentContext = FragmentContext.CATALOG_UPDATE;
coreUpdateCatalog(timestamp, isStreamUpdate, diffCommands);
... | [
"public",
"final",
"void",
"updateCatalog",
"(",
"final",
"long",
"timestamp",
",",
"final",
"boolean",
"isStreamUpdate",
",",
"final",
"String",
"diffCommands",
")",
"throws",
"EEException",
"{",
"try",
"{",
"setupProcedure",
"(",
"null",
")",
";",
"m_fragmentC... | Pass diffs to apply to the EE's catalog to update it | [
"Pass",
"diffs",
"to",
"apply",
"to",
"the",
"EE",
"s",
"catalog",
"to",
"update",
"it"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngine.java#L624-L633 |
62,044 | VoltDB/voltdb | src/frontend/org/voltdb/jni/ExecutionEngine.java | ExecutionEngine.executePlanFragments | public FastDeserializer executePlanFragments(
int numFragmentIds,
long[] planFragmentIds,
long[] inputDepIds,
Object[] parameterSets,
DeterminismHash determinismHash,
String[] sqlTexts,
boolean[] isWriteFrags,
int[] sqlCRCs,... | java | public FastDeserializer executePlanFragments(
int numFragmentIds,
long[] planFragmentIds,
long[] inputDepIds,
Object[] parameterSets,
DeterminismHash determinismHash,
String[] sqlTexts,
boolean[] isWriteFrags,
int[] sqlCRCs,... | [
"public",
"FastDeserializer",
"executePlanFragments",
"(",
"int",
"numFragmentIds",
",",
"long",
"[",
"]",
"planFragmentIds",
",",
"long",
"[",
"]",
"inputDepIds",
",",
"Object",
"[",
"]",
"parameterSets",
",",
"DeterminismHash",
"determinismHash",
",",
"String",
... | Run multiple plan fragments | [
"Run",
"multiple",
"plan",
"fragments"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngine.java#L652-L709 |
62,045 | VoltDB/voltdb | src/frontend/org/voltdb/client/VoltBulkLoader/VoltBulkLoader.java | VoltBulkLoader.setFlushInterval | public synchronized void setFlushInterval(long delay, long seconds) {
if (m_flush != null) {
m_flush.cancel(false);
m_flush = null;
}
if (seconds > 0) {
m_flush = m_ses.scheduleAtFixedRate(new Runnable() {
@Override
public void ... | java | public synchronized void setFlushInterval(long delay, long seconds) {
if (m_flush != null) {
m_flush.cancel(false);
m_flush = null;
}
if (seconds > 0) {
m_flush = m_ses.scheduleAtFixedRate(new Runnable() {
@Override
public void ... | [
"public",
"synchronized",
"void",
"setFlushInterval",
"(",
"long",
"delay",
",",
"long",
"seconds",
")",
"{",
"if",
"(",
"m_flush",
"!=",
"null",
")",
"{",
"m_flush",
".",
"cancel",
"(",
"false",
")",
";",
"m_flush",
"=",
"null",
";",
"}",
"if",
"(",
... | Set periodic flush interval and initial delay in seconds.
@param delay Initial delay in seconds
@param seconds Interval in seconds, passing <code>seconds <= 0</code> value will cancel periodic flush | [
"Set",
"periodic",
"flush",
"interval",
"and",
"initial",
"delay",
"in",
"seconds",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/VoltBulkLoader/VoltBulkLoader.java#L275-L292 |
62,046 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Session.java | Session.close | @Override
public synchronized void close() {
if (isClosed) {
return;
}
rollback(false);
try {
database.logger.writeToLog(this, Tokens.T_DISCONNECT);
} catch (HsqlException e) {}
sessionData.closeAllNavigators();
sessionData.persiste... | java | @Override
public synchronized void close() {
if (isClosed) {
return;
}
rollback(false);
try {
database.logger.writeToLog(this, Tokens.T_DISCONNECT);
} catch (HsqlException e) {}
sessionData.closeAllNavigators();
sessionData.persiste... | [
"@",
"Override",
"public",
"synchronized",
"void",
"close",
"(",
")",
"{",
"if",
"(",
"isClosed",
")",
"{",
"return",
";",
"}",
"rollback",
"(",
"false",
")",
";",
"try",
"{",
"database",
".",
"logger",
".",
"writeToLog",
"(",
"this",
",",
"Tokens",
... | Closes this Session. | [
"Closes",
"this",
"Session",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Session.java#L231-L259 |
62,047 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Session.java | Session.setIsolation | public void setIsolation(int level) {
if (isInMidTransaction()) {
throw Error.error(ErrorCode.X_25001);
}
if (level == SessionInterface.TX_READ_UNCOMMITTED) {
isReadOnly = true;
}
isolationMode = level;
if (isolationMode != isolationModeDefault... | java | public void setIsolation(int level) {
if (isInMidTransaction()) {
throw Error.error(ErrorCode.X_25001);
}
if (level == SessionInterface.TX_READ_UNCOMMITTED) {
isReadOnly = true;
}
isolationMode = level;
if (isolationMode != isolationModeDefault... | [
"public",
"void",
"setIsolation",
"(",
"int",
"level",
")",
"{",
"if",
"(",
"isInMidTransaction",
"(",
")",
")",
"{",
"throw",
"Error",
".",
"error",
"(",
"ErrorCode",
".",
"X_25001",
")",
";",
"}",
"if",
"(",
"level",
"==",
"SessionInterface",
".",
"T... | sets ISOLATION for the next transaction only | [
"sets",
"ISOLATION",
"for",
"the",
"next",
"transaction",
"only"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Session.java#L294-L309 |
62,048 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Session.java | Session.checkDDLWrite | void checkDDLWrite() {
checkReadWrite();
if (isProcessingScript || isProcessingLog) {
return;
}
if (database.isFilesReadOnly()) {
throw Error.error(ErrorCode.DATABASE_IS_READONLY);
}
} | java | void checkDDLWrite() {
checkReadWrite();
if (isProcessingScript || isProcessingLog) {
return;
}
if (database.isFilesReadOnly()) {
throw Error.error(ErrorCode.DATABASE_IS_READONLY);
}
} | [
"void",
"checkDDLWrite",
"(",
")",
"{",
"checkReadWrite",
"(",
")",
";",
"if",
"(",
"isProcessingScript",
"||",
"isProcessingLog",
")",
"{",
"return",
";",
"}",
"if",
"(",
"database",
".",
"isFilesReadOnly",
"(",
")",
")",
"{",
"throw",
"Error",
".",
"er... | This is used for creating new database objects such as tables.
@throws HsqlException | [
"This",
"is",
"used",
"for",
"creating",
"new",
"database",
"objects",
"such",
"as",
"tables",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Session.java#L420-L431 |
62,049 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Session.java | Session.addDeleteAction | void addDeleteAction(Table table, Row row) {
// tempActionHistory.add("add delete action " + actionTimestamp);
if (abortTransaction) {
// throw Error.error(ErrorCode.X_40001);
}
database.txManager.addDeleteAction(this, table, row);
} | java | void addDeleteAction(Table table, Row row) {
// tempActionHistory.add("add delete action " + actionTimestamp);
if (abortTransaction) {
// throw Error.error(ErrorCode.X_40001);
}
database.txManager.addDeleteAction(this, table, row);
} | [
"void",
"addDeleteAction",
"(",
"Table",
"table",
",",
"Row",
"row",
")",
"{",
"// tempActionHistory.add(\"add delete action \" + actionTimestamp);",
"if",
"(",
"abortTransaction",
")",
"{",
"// throw Error.error(ErrorCode.X_40001);",
"}",
"database",
".",
"... | Adds a delete action to the row and the transaction manager.
@param table the table of the row
@param row the deleted row
@throws HsqlException | [
"Adds",
"a",
"delete",
"action",
"to",
"the",
"row",
"and",
"the",
"transaction",
"manager",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Session.java#L444-L453 |
62,050 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Session.java | Session.setAutoCommit | @Override
public synchronized void setAutoCommit(boolean autocommit) {
if (isClosed) {
return;
}
if (autocommit != isAutoCommit) {
commit(false);
isAutoCommit = autocommit;
}
} | java | @Override
public synchronized void setAutoCommit(boolean autocommit) {
if (isClosed) {
return;
}
if (autocommit != isAutoCommit) {
commit(false);
isAutoCommit = autocommit;
}
} | [
"@",
"Override",
"public",
"synchronized",
"void",
"setAutoCommit",
"(",
"boolean",
"autocommit",
")",
"{",
"if",
"(",
"isClosed",
")",
"{",
"return",
";",
"}",
"if",
"(",
"autocommit",
"!=",
"isAutoCommit",
")",
"{",
"commit",
"(",
"false",
")",
";",
"i... | Setter for the autocommit attribute.
@param autocommit the new value
@throws HsqlException | [
"Setter",
"for",
"the",
"autocommit",
"attribute",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Session.java#L473-L485 |
62,051 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Session.java | Session.commit | @Override
public synchronized void commit(boolean chain) {
// tempActionHistory.add("commit " + actionTimestamp);
if (isClosed) {
return;
}
if (!isTransaction) {
isReadOnly = isReadOnlyDefault;
isolationMode = isolationModeDefault;
... | java | @Override
public synchronized void commit(boolean chain) {
// tempActionHistory.add("commit " + actionTimestamp);
if (isClosed) {
return;
}
if (!isTransaction) {
isReadOnly = isReadOnlyDefault;
isolationMode = isolationModeDefault;
... | [
"@",
"Override",
"public",
"synchronized",
"void",
"commit",
"(",
"boolean",
"chain",
")",
"{",
"// tempActionHistory.add(\"commit \" + actionTimestamp);",
"if",
"(",
"isClosed",
")",
"{",
"return",
";",
"}",
"if",
"(",
"!",
"isTransaction",
")",
"{",
"isRe... | Commits any uncommited transaction this Session may have open
@throws HsqlException | [
"Commits",
"any",
"uncommited",
"transaction",
"this",
"Session",
"may",
"have",
"open"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Session.java#L548-L572 |
62,052 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Session.java | Session.rollback | @Override
public synchronized void rollback(boolean chain) {
// tempActionHistory.add("rollback " + actionTimestamp);
if (isClosed) {
return;
}
if (!isTransaction) {
isReadOnly = isReadOnlyDefault;
isolationMode = isolationModeDefault;
... | java | @Override
public synchronized void rollback(boolean chain) {
// tempActionHistory.add("rollback " + actionTimestamp);
if (isClosed) {
return;
}
if (!isTransaction) {
isReadOnly = isReadOnlyDefault;
isolationMode = isolationModeDefault;
... | [
"@",
"Override",
"public",
"synchronized",
"void",
"rollback",
"(",
"boolean",
"chain",
")",
"{",
"// tempActionHistory.add(\"rollback \" + actionTimestamp);",
"if",
"(",
"isClosed",
")",
"{",
"return",
";",
"}",
"if",
"(",
"!",
"isTransaction",
")",
"{",
"... | Rolls back any uncommited transaction this Session may have open.
@throws HsqlException | [
"Rolls",
"back",
"any",
"uncommited",
"transaction",
"this",
"Session",
"may",
"have",
"open",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Session.java#L579-L600 |
62,053 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Session.java | Session.savepoint | @Override
public synchronized void savepoint(String name) {
int index = sessionContext.savepoints.getIndex(name);
if (index != -1) {
sessionContext.savepoints.remove(name);
sessionContext.savepointTimestamps.remove(index);
}
sessionContext.savepoints.add(na... | java | @Override
public synchronized void savepoint(String name) {
int index = sessionContext.savepoints.getIndex(name);
if (index != -1) {
sessionContext.savepoints.remove(name);
sessionContext.savepointTimestamps.remove(index);
}
sessionContext.savepoints.add(na... | [
"@",
"Override",
"public",
"synchronized",
"void",
"savepoint",
"(",
"String",
"name",
")",
"{",
"int",
"index",
"=",
"sessionContext",
".",
"savepoints",
".",
"getIndex",
"(",
"name",
")",
";",
"if",
"(",
"index",
"!=",
"-",
"1",
")",
"{",
"sessionConte... | Registers a transaction SAVEPOINT. A new SAVEPOINT with the
name of an existing one replaces the old SAVEPOINT.
@param name name of the savepoint
@throws HsqlException if there is no current transaction | [
"Registers",
"a",
"transaction",
"SAVEPOINT",
".",
"A",
"new",
"SAVEPOINT",
"with",
"the",
"name",
"of",
"an",
"existing",
"one",
"replaces",
"the",
"old",
"SAVEPOINT",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Session.java#L644-L661 |
62,054 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Session.java | Session.rollbackToSavepoint | @Override
public synchronized void rollbackToSavepoint(String name) {
if (isClosed) {
return;
}
int index = sessionContext.savepoints.getIndex(name);
if (index < 0) {
throw Error.error(ErrorCode.X_3B001, name);
}
database.txManager.rollback... | java | @Override
public synchronized void rollbackToSavepoint(String name) {
if (isClosed) {
return;
}
int index = sessionContext.savepoints.getIndex(name);
if (index < 0) {
throw Error.error(ErrorCode.X_3B001, name);
}
database.txManager.rollback... | [
"@",
"Override",
"public",
"synchronized",
"void",
"rollbackToSavepoint",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"isClosed",
")",
"{",
"return",
";",
"}",
"int",
"index",
"=",
"sessionContext",
".",
"savepoints",
".",
"getIndex",
"(",
"name",
")",
";"... | Performs a partial transaction ROLLBACK to savepoint.
@param name name of savepoint
@throws HsqlException | [
"Performs",
"a",
"partial",
"transaction",
"ROLLBACK",
"to",
"savepoint",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Session.java#L669-L687 |
62,055 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Session.java | Session.rollbackToSavepoint | public synchronized void rollbackToSavepoint() {
if (isClosed) {
return;
}
String name = (String) sessionContext.savepoints.getKey(0);
database.txManager.rollbackSavepoint(this, 0);
try {
database.logger.writeToLog(this, getSavepointRollbackSQL(name));... | java | public synchronized void rollbackToSavepoint() {
if (isClosed) {
return;
}
String name = (String) sessionContext.savepoints.getKey(0);
database.txManager.rollbackSavepoint(this, 0);
try {
database.logger.writeToLog(this, getSavepointRollbackSQL(name));... | [
"public",
"synchronized",
"void",
"rollbackToSavepoint",
"(",
")",
"{",
"if",
"(",
"isClosed",
")",
"{",
"return",
";",
"}",
"String",
"name",
"=",
"(",
"String",
")",
"sessionContext",
".",
"savepoints",
".",
"getKey",
"(",
"0",
")",
";",
"database",
".... | Performs a partial transaction ROLLBACK of current savepoint level.
@throws HsqlException | [
"Performs",
"a",
"partial",
"transaction",
"ROLLBACK",
"of",
"current",
"savepoint",
"level",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Session.java#L694-L707 |
62,056 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Session.java | Session.releaseSavepoint | @Override
public synchronized void releaseSavepoint(String name) {
// remove this and all later savepoints
int index = sessionContext.savepoints.getIndex(name);
if (index < 0) {
throw Error.error(ErrorCode.X_3B001, name);
}
while (sessionContext.savepoints.size... | java | @Override
public synchronized void releaseSavepoint(String name) {
// remove this and all later savepoints
int index = sessionContext.savepoints.getIndex(name);
if (index < 0) {
throw Error.error(ErrorCode.X_3B001, name);
}
while (sessionContext.savepoints.size... | [
"@",
"Override",
"public",
"synchronized",
"void",
"releaseSavepoint",
"(",
"String",
"name",
")",
"{",
"// remove this and all later savepoints",
"int",
"index",
"=",
"sessionContext",
".",
"savepoints",
".",
"getIndex",
"(",
"name",
")",
";",
"if",
"(",
"index",... | Releases a savepoint
@param name name of savepoint
@throws HsqlException if name does not correspond to a savepoint | [
"Releases",
"a",
"savepoint"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Session.java#L715-L730 |
62,057 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Session.java | Session.setReadOnly | public void setReadOnly(boolean readonly) {
if (!readonly && database.databaseReadOnly) {
throw Error.error(ErrorCode.DATABASE_IS_READONLY);
}
if (isInMidTransaction()) {
throw Error.error(ErrorCode.X_25001);
}
isReadOnly = readonly;
} | java | public void setReadOnly(boolean readonly) {
if (!readonly && database.databaseReadOnly) {
throw Error.error(ErrorCode.DATABASE_IS_READONLY);
}
if (isInMidTransaction()) {
throw Error.error(ErrorCode.X_25001);
}
isReadOnly = readonly;
} | [
"public",
"void",
"setReadOnly",
"(",
"boolean",
"readonly",
")",
"{",
"if",
"(",
"!",
"readonly",
"&&",
"database",
".",
"databaseReadOnly",
")",
"{",
"throw",
"Error",
".",
"error",
"(",
"ErrorCode",
".",
"DATABASE_IS_READONLY",
")",
";",
"}",
"if",
"(",... | sets READ ONLY for next transaction only
@param readonly the new value | [
"sets",
"READ",
"ONLY",
"for",
"next",
"transaction",
"only"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Session.java#L737-L748 |
62,058 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Session.java | Session.executeResultUpdate | private Result executeResultUpdate(Result cmd) {
long id = cmd.getResultId();
int actionType = cmd.getActionType();
Result result = sessionData.getDataResult(id);
if (result == null) {
return Result.newErrorResult(Error.error(ErrorCode.X_24501));
}
... | java | private Result executeResultUpdate(Result cmd) {
long id = cmd.getResultId();
int actionType = cmd.getActionType();
Result result = sessionData.getDataResult(id);
if (result == null) {
return Result.newErrorResult(Error.error(ErrorCode.X_24501));
}
... | [
"private",
"Result",
"executeResultUpdate",
"(",
"Result",
"cmd",
")",
"{",
"long",
"id",
"=",
"cmd",
".",
"getResultId",
"(",
")",
";",
"int",
"actionType",
"=",
"cmd",
".",
"getActionType",
"(",
")",
";",
"Result",
"result",
"=",
"sessionData",
".",
"g... | Retrieves the result of inserting, updating or deleting a row
from an updatable result.
@return the result of executing the statement | [
"Retrieves",
"the",
"result",
"of",
"inserting",
"updating",
"or",
"deleting",
"a",
"row",
"from",
"an",
"updatable",
"result",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Session.java#L1419-L1443 |
62,059 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Session.java | Session.getSchemaHsqlName | HsqlName getSchemaHsqlName(String name) {
return name == null ? currentSchema
: database.schemaManager.getSchemaHsqlName(name);
} | java | HsqlName getSchemaHsqlName(String name) {
return name == null ? currentSchema
: database.schemaManager.getSchemaHsqlName(name);
} | [
"HsqlName",
"getSchemaHsqlName",
"(",
"String",
"name",
")",
"{",
"return",
"name",
"==",
"null",
"?",
"currentSchema",
":",
"database",
".",
"schemaManager",
".",
"getSchemaHsqlName",
"(",
"name",
")",
";",
"}"
] | If schemaName is null, return the current schema name, else return
the HsqlName object for the schema. If schemaName does not exist,
throw. | [
"If",
"schemaName",
"is",
"null",
"return",
"the",
"current",
"schema",
"name",
"else",
"return",
"the",
"HsqlName",
"object",
"for",
"the",
"schema",
".",
"If",
"schemaName",
"does",
"not",
"exist",
"throw",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Session.java#L1817-L1820 |
62,060 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Session.java | Session.getSchemaName | public String getSchemaName(String name) {
return name == null ? currentSchema.name
: database.schemaManager.getSchemaName(name);
} | java | public String getSchemaName(String name) {
return name == null ? currentSchema.name
: database.schemaManager.getSchemaName(name);
} | [
"public",
"String",
"getSchemaName",
"(",
"String",
"name",
")",
"{",
"return",
"name",
"==",
"null",
"?",
"currentSchema",
".",
"name",
":",
"database",
".",
"schemaManager",
".",
"getSchemaName",
"(",
"name",
")",
";",
"}"
] | Same as above, but return string | [
"Same",
"as",
"above",
"but",
"return",
"string"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Session.java#L1825-L1828 |
62,061 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Session.java | Session.defineLocalTable | public Table defineLocalTable(HsqlName tableName, HsqlName[] colNames, Type[] colTypes) {
// I'm not sure the table type, here TableBase.CACHED_TABLE, matters
// all that much.
assert(localTables != null);
Table newTable = TableUtil.newTable(database, TableBase.CACHED_TABLE, tableName);
... | java | public Table defineLocalTable(HsqlName tableName, HsqlName[] colNames, Type[] colTypes) {
// I'm not sure the table type, here TableBase.CACHED_TABLE, matters
// all that much.
assert(localTables != null);
Table newTable = TableUtil.newTable(database, TableBase.CACHED_TABLE, tableName);
... | [
"public",
"Table",
"defineLocalTable",
"(",
"HsqlName",
"tableName",
",",
"HsqlName",
"[",
"]",
"colNames",
",",
"Type",
"[",
"]",
"colTypes",
")",
"{",
"// I'm not sure the table type, here TableBase.CACHED_TABLE, matters",
"// all that much.",
"assert",
"(",
"localTable... | Define a local table with the given name, column names and column types.
@param tableName
@param colNames
@param colTypes
@return | [
"Define",
"a",
"local",
"table",
"with",
"the",
"given",
"name",
"column",
"names",
"and",
"column",
"types",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Session.java#L1860-L1869 |
62,062 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Session.java | Session.updateLocalTable | public void updateLocalTable(HsqlName queryName, Type[] finalTypes) {
assert(localTables != null);
Table tbl = getLocalTable(queryName.name);
assert (tbl != null);
TableUtil.updateColumnTypes(tbl, finalTypes);
} | java | public void updateLocalTable(HsqlName queryName, Type[] finalTypes) {
assert(localTables != null);
Table tbl = getLocalTable(queryName.name);
assert (tbl != null);
TableUtil.updateColumnTypes(tbl, finalTypes);
} | [
"public",
"void",
"updateLocalTable",
"(",
"HsqlName",
"queryName",
",",
"Type",
"[",
"]",
"finalTypes",
")",
"{",
"assert",
"(",
"localTables",
"!=",
"null",
")",
";",
"Table",
"tbl",
"=",
"getLocalTable",
"(",
"queryName",
".",
"name",
")",
";",
"assert"... | Update the local table with new types. This is very dubious.
@param queryName
@param finalTypes | [
"Update",
"the",
"local",
"table",
"with",
"new",
"types",
".",
"This",
"is",
"very",
"dubious",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Session.java#L1884-L1889 |
62,063 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Session.java | Session.logSequences | void logSequences() {
OrderedHashSet set = sessionData.sequenceUpdateSet;
if (set == null || set.isEmpty()) {
return;
}
for (int i = 0, size = set.size(); i < size; i++) {
NumberSequence sequence = (NumberSequence) set.get(i);
database.logger.write... | java | void logSequences() {
OrderedHashSet set = sessionData.sequenceUpdateSet;
if (set == null || set.isEmpty()) {
return;
}
for (int i = 0, size = set.size(); i < size; i++) {
NumberSequence sequence = (NumberSequence) set.get(i);
database.logger.write... | [
"void",
"logSequences",
"(",
")",
"{",
"OrderedHashSet",
"set",
"=",
"sessionData",
".",
"sequenceUpdateSet",
";",
"if",
"(",
"set",
"==",
"null",
"||",
"set",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
... | SEQUENCE current values | [
"SEQUENCE",
"current",
"values"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Session.java#L2016-L2031 |
62,064 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/CatalogBuilder.java | CatalogBuilder.addLiteralSchema | public void addLiteralSchema(String ddlText) throws IOException {
File temp = File.createTempFile("literalschema", "sql");
temp.deleteOnExit();
FileWriter out = new FileWriter(temp);
out.write(ddlText);
out.close();
addSchema(URLEncoder.encode(temp.getAbsolutePath(), "UTF... | java | public void addLiteralSchema(String ddlText) throws IOException {
File temp = File.createTempFile("literalschema", "sql");
temp.deleteOnExit();
FileWriter out = new FileWriter(temp);
out.write(ddlText);
out.close();
addSchema(URLEncoder.encode(temp.getAbsolutePath(), "UTF... | [
"public",
"void",
"addLiteralSchema",
"(",
"String",
"ddlText",
")",
"throws",
"IOException",
"{",
"File",
"temp",
"=",
"File",
".",
"createTempFile",
"(",
"\"literalschema\"",
",",
"\"sql\"",
")",
";",
"temp",
".",
"deleteOnExit",
"(",
")",
";",
"FileWriter",... | This is test code written by Ryan, even though it was
committed by John. | [
"This",
"is",
"test",
"code",
"written",
"by",
"Ryan",
"even",
"though",
"it",
"was",
"committed",
"by",
"John",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/CatalogBuilder.java#L150-L157 |
62,065 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/CatalogBuilder.java | CatalogBuilder.addSchema | public void addSchema(String schemaURL) {
try {
schemaURL = URLDecoder.decode(schemaURL, "UTF-8");
} catch (final UnsupportedEncodingException e) {
e.printStackTrace();
System.exit(-1);
}
assert(m_schemas.contains(schemaURL) == false);
final Fi... | java | public void addSchema(String schemaURL) {
try {
schemaURL = URLDecoder.decode(schemaURL, "UTF-8");
} catch (final UnsupportedEncodingException e) {
e.printStackTrace();
System.exit(-1);
}
assert(m_schemas.contains(schemaURL) == false);
final Fi... | [
"public",
"void",
"addSchema",
"(",
"String",
"schemaURL",
")",
"{",
"try",
"{",
"schemaURL",
"=",
"URLDecoder",
".",
"decode",
"(",
"schemaURL",
",",
"\"UTF-8\"",
")",
";",
"}",
"catch",
"(",
"final",
"UnsupportedEncodingException",
"e",
")",
"{",
"e",
".... | Add a schema based on a URL.
@param schemaURL Schema file URL | [
"Add",
"a",
"schema",
"based",
"on",
"a",
"URL",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/CatalogBuilder.java#L163-L179 |
62,066 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/ExpressionUtil.java | ExpressionUtil.isParameterized | private static boolean isParameterized(VoltXMLElement elm) {
final String name = elm.name;
if (name.equals("value")) {
return elm.getBoolAttribute("isparam", false);
} else if (name.equals("vector") || name.equals("row")) {
return elm.children.stream().anyMatch(Expression... | java | private static boolean isParameterized(VoltXMLElement elm) {
final String name = elm.name;
if (name.equals("value")) {
return elm.getBoolAttribute("isparam", false);
} else if (name.equals("vector") || name.equals("row")) {
return elm.children.stream().anyMatch(Expression... | [
"private",
"static",
"boolean",
"isParameterized",
"(",
"VoltXMLElement",
"elm",
")",
"{",
"final",
"String",
"name",
"=",
"elm",
".",
"name",
";",
"if",
"(",
"name",
".",
"equals",
"(",
"\"value\"",
")",
")",
"{",
"return",
"elm",
".",
"getBoolAttribute",... | Helper to check if a VoltXMLElement contains parameter.
@param elm element under inspection
@return if elm contains parameter | [
"Helper",
"to",
"check",
"if",
"a",
"VoltXMLElement",
"contains",
"parameter",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/ExpressionUtil.java#L72-L112 |
62,067 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/ExpressionUtil.java | ExpressionUtil.getType | private static String getType(Database db, VoltXMLElement elm) {
final String type = elm.getStringAttribute("valuetype", "");
if (! type.isEmpty()) {
return type;
} else if (elm.name.equals("columnref")) {
final String tblName = elm.getStringAttribute("table", "");
... | java | private static String getType(Database db, VoltXMLElement elm) {
final String type = elm.getStringAttribute("valuetype", "");
if (! type.isEmpty()) {
return type;
} else if (elm.name.equals("columnref")) {
final String tblName = elm.getStringAttribute("table", "");
... | [
"private",
"static",
"String",
"getType",
"(",
"Database",
"db",
",",
"VoltXMLElement",
"elm",
")",
"{",
"final",
"String",
"type",
"=",
"elm",
".",
"getStringAttribute",
"(",
"\"valuetype\"",
",",
"\"\"",
")",
";",
"if",
"(",
"!",
"type",
".",
"isEmpty",
... | Get the underlying type of the VoltXMLElement node. Need reference to the catalog for PVE
@param db catalog
@param elm element under inspection
@return string representation of the element node | [
"Get",
"the",
"underlying",
"type",
"of",
"the",
"VoltXMLElement",
"node",
".",
"Need",
"reference",
"to",
"the",
"catalog",
"for",
"PVE"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/ExpressionUtil.java#L120-L140 |
62,068 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/ExpressionUtil.java | ExpressionUtil.guessParameterType | private static String guessParameterType(Database db, VoltXMLElement elm) {
if (! isParameterized(elm) || ! elm.name.equals("operation")) {
return "";
} else {
final ExpressionType op = mapOfVoltXMLOpType.get(elm.attributes.get("optype"));
assert op != null;
... | java | private static String guessParameterType(Database db, VoltXMLElement elm) {
if (! isParameterized(elm) || ! elm.name.equals("operation")) {
return "";
} else {
final ExpressionType op = mapOfVoltXMLOpType.get(elm.attributes.get("optype"));
assert op != null;
... | [
"private",
"static",
"String",
"guessParameterType",
"(",
"Database",
"db",
",",
"VoltXMLElement",
"elm",
")",
"{",
"if",
"(",
"!",
"isParameterized",
"(",
"elm",
")",
"||",
"!",
"elm",
".",
"name",
".",
"equals",
"(",
"\"operation\"",
")",
")",
"{",
"re... | Guess from a parent node what are the parameter type of its child node, should one of its child node
contain parameter.
@param db catalog
@param elm node under inspection
@return string representation of the type of its child node. | [
"Guess",
"from",
"a",
"parent",
"node",
"what",
"are",
"the",
"parameter",
"type",
"of",
"its",
"child",
"node",
"should",
"one",
"of",
"its",
"child",
"node",
"contain",
"parameter",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/ExpressionUtil.java#L149-L185 |
62,069 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/ExpressionUtil.java | ExpressionUtil.reduce | public static boolean reduce(AbstractExpression expr, Predicate<AbstractExpression> pred) {
final boolean current = pred.test(expr);
if (current) {
return true;
} else if (expr == null) {
return pred.test(null);
} else {
return pred.test(expr.getLeft()... | java | public static boolean reduce(AbstractExpression expr, Predicate<AbstractExpression> pred) {
final boolean current = pred.test(expr);
if (current) {
return true;
} else if (expr == null) {
return pred.test(null);
} else {
return pred.test(expr.getLeft()... | [
"public",
"static",
"boolean",
"reduce",
"(",
"AbstractExpression",
"expr",
",",
"Predicate",
"<",
"AbstractExpression",
">",
"pred",
")",
"{",
"final",
"boolean",
"current",
"=",
"pred",
".",
"test",
"(",
"expr",
")",
";",
"if",
"(",
"current",
")",
"{",
... | Check if any node of given expression tree satisfies given predicate
@param expr source expression tree
@param pred predicate to check against any expression node to find if any node satisfies.
Note that it should be able to handle null.
@return true if there exists a node that satisfies the predicate | [
"Check",
"if",
"any",
"node",
"of",
"given",
"expression",
"tree",
"satisfies",
"given",
"predicate"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/ExpressionUtil.java#L311-L322 |
62,070 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/ExpressionUtil.java | ExpressionUtil.uncombineAny | public static Collection<AbstractExpression> uncombineAny(AbstractExpression expr)
{
ArrayDeque<AbstractExpression> out = new ArrayDeque<AbstractExpression>();
if (expr != null) {
ArrayDeque<AbstractExpression> in = new ArrayDeque<AbstractExpression>();
// this chunk of code ... | java | public static Collection<AbstractExpression> uncombineAny(AbstractExpression expr)
{
ArrayDeque<AbstractExpression> out = new ArrayDeque<AbstractExpression>();
if (expr != null) {
ArrayDeque<AbstractExpression> in = new ArrayDeque<AbstractExpression>();
// this chunk of code ... | [
"public",
"static",
"Collection",
"<",
"AbstractExpression",
">",
"uncombineAny",
"(",
"AbstractExpression",
"expr",
")",
"{",
"ArrayDeque",
"<",
"AbstractExpression",
">",
"out",
"=",
"new",
"ArrayDeque",
"<",
"AbstractExpression",
">",
"(",
")",
";",
"if",
"("... | Convert one or more predicates, potentially in an arbitrarily nested conjunction tree
into a flattened collection. Similar to uncombine but for arbitrary tree shapes and with no
guarantee of the result collection type or of any ordering within the collection.
In fact, it currently fills an ArrayDeque via a left=to-righ... | [
"Convert",
"one",
"or",
"more",
"predicates",
"potentially",
"in",
"an",
"arbitrarily",
"nested",
"conjunction",
"tree",
"into",
"a",
"flattened",
"collection",
".",
"Similar",
"to",
"uncombine",
"but",
"for",
"arbitrary",
"tree",
"shapes",
"and",
"with",
"no",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/ExpressionUtil.java#L442-L462 |
62,071 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/ExpressionUtil.java | ExpressionUtil.getTupleValueExpressions | public static List<TupleValueExpression>
getTupleValueExpressions(AbstractExpression input)
{
ArrayList<TupleValueExpression> tves =
new ArrayList<TupleValueExpression>();
// recursive stopping steps
if (input == null)
{
return tves;
} else if (inp... | java | public static List<TupleValueExpression>
getTupleValueExpressions(AbstractExpression input)
{
ArrayList<TupleValueExpression> tves =
new ArrayList<TupleValueExpression>();
// recursive stopping steps
if (input == null)
{
return tves;
} else if (inp... | [
"public",
"static",
"List",
"<",
"TupleValueExpression",
">",
"getTupleValueExpressions",
"(",
"AbstractExpression",
"input",
")",
"{",
"ArrayList",
"<",
"TupleValueExpression",
">",
"tves",
"=",
"new",
"ArrayList",
"<",
"TupleValueExpression",
">",
"(",
")",
";",
... | Recursively walk an expression and return a list of all the tuple
value expressions it contains. | [
"Recursively",
"walk",
"an",
"expression",
"and",
"return",
"a",
"list",
"of",
"all",
"the",
"tuple",
"value",
"expressions",
"it",
"contains",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/ExpressionUtil.java#L533-L556 |
62,072 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/ExpressionUtil.java | ExpressionUtil.subqueryRequiresScalarValueExpressionFromContext | private static boolean subqueryRequiresScalarValueExpressionFromContext(AbstractExpression parentExpr) {
if (parentExpr == null) {
// No context: we are a top-level expression. E.g, an item on the
// select list. In this case, assume the expression must be scalar.
return tr... | java | private static boolean subqueryRequiresScalarValueExpressionFromContext(AbstractExpression parentExpr) {
if (parentExpr == null) {
// No context: we are a top-level expression. E.g, an item on the
// select list. In this case, assume the expression must be scalar.
return tr... | [
"private",
"static",
"boolean",
"subqueryRequiresScalarValueExpressionFromContext",
"(",
"AbstractExpression",
"parentExpr",
")",
"{",
"if",
"(",
"parentExpr",
"==",
"null",
")",
"{",
"// No context: we are a top-level expression. E.g, an item on the",
"// select list. In this ca... | Return true if we must insert a ScalarValueExpression between a subquery
and its parent expression.
@param parentExpr the parent expression of a subquery
@return true if the parent expression is not a comparison, EXISTS operator, or
a scalar value expression | [
"Return",
"true",
"if",
"we",
"must",
"insert",
"a",
"ScalarValueExpression",
"between",
"a",
"subquery",
"and",
"its",
"parent",
"expression",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/ExpressionUtil.java#L801-L821 |
62,073 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/ExpressionUtil.java | ExpressionUtil.addScalarValueExpression | private static AbstractExpression addScalarValueExpression(SelectSubqueryExpression expr) {
if (expr.getSubqueryScan().getOutputSchema().size() != 1) {
throw new PlanningErrorException("Scalar subquery can have only one output column");
}
expr.changeToScalarExprType();
Abst... | java | private static AbstractExpression addScalarValueExpression(SelectSubqueryExpression expr) {
if (expr.getSubqueryScan().getOutputSchema().size() != 1) {
throw new PlanningErrorException("Scalar subquery can have only one output column");
}
expr.changeToScalarExprType();
Abst... | [
"private",
"static",
"AbstractExpression",
"addScalarValueExpression",
"(",
"SelectSubqueryExpression",
"expr",
")",
"{",
"if",
"(",
"expr",
".",
"getSubqueryScan",
"(",
")",
".",
"getOutputSchema",
"(",
")",
".",
"size",
"(",
")",
"!=",
"1",
")",
"{",
"throw"... | Add a ScalarValueExpression on top of the SubqueryExpression
@param expr - subquery expression
@return ScalarValueExpression | [
"Add",
"a",
"ScalarValueExpression",
"on",
"top",
"of",
"the",
"SubqueryExpression"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/ExpressionUtil.java#L828-L840 |
62,074 | VoltDB/voltdb | src/frontend/org/voltdb/PermissionValidator.java | PermissionValidator.shouldAccept | public ClientResponseImpl shouldAccept(String name, AuthSystem.AuthUser user,
final StoredProcedureInvocation task,
final Procedure catProc) {
if (user.isAuthEnabled()) {
InvocationPermissionPolicy deniedPolicy = null;
I... | java | public ClientResponseImpl shouldAccept(String name, AuthSystem.AuthUser user,
final StoredProcedureInvocation task,
final Procedure catProc) {
if (user.isAuthEnabled()) {
InvocationPermissionPolicy deniedPolicy = null;
I... | [
"public",
"ClientResponseImpl",
"shouldAccept",
"(",
"String",
"name",
",",
"AuthSystem",
".",
"AuthUser",
"user",
",",
"final",
"StoredProcedureInvocation",
"task",
",",
"final",
"Procedure",
"catProc",
")",
"{",
"if",
"(",
"user",
".",
"isAuthEnabled",
"(",
")... | For auth disabled user the first policy will return ALLOW breaking the loop. | [
"For",
"auth",
"disabled",
"user",
"the",
"first",
"policy",
"will",
"return",
"ALLOW",
"breaking",
"the",
"loop",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/PermissionValidator.java#L43-L71 |
62,075 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/UpdateLogging.java | UpdateLogging.run | @SuppressWarnings("deprecation")
public VoltTable[] run(SystemProcedureExecutionContext ctx,
String username,
String remoteHost,
String xmlConfig)
{
long oldLevels = 0;
if (ctx.isLowestSiteId()) {
// Lo... | java | @SuppressWarnings("deprecation")
public VoltTable[] run(SystemProcedureExecutionContext ctx,
String username,
String remoteHost,
String xmlConfig)
{
long oldLevels = 0;
if (ctx.isLowestSiteId()) {
// Lo... | [
"@",
"SuppressWarnings",
"(",
"\"deprecation\"",
")",
"public",
"VoltTable",
"[",
"]",
"run",
"(",
"SystemProcedureExecutionContext",
"ctx",
",",
"String",
"username",
",",
"String",
"remoteHost",
",",
"String",
"xmlConfig",
")",
"{",
"long",
"oldLevels",
"=",
"... | Change the operational log configuration.
@param ctx Internal parameter. Not user-accessible.
@param xmlConfig New configuration XML document.
@return Standard STATUS table. | [
"Change",
"the",
"operational",
"log",
"configuration",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/UpdateLogging.java#L69-L114 |
62,076 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusChoice.java | ZaurusChoice.add | public void add(String item, String value) {
int maxChar = MaxLenInZChoice;
if (item.length() < MaxLenInZChoice) {
maxChar = item.length();
}
super.add(item.substring(0, maxChar));
values.addElement(value);
} | java | public void add(String item, String value) {
int maxChar = MaxLenInZChoice;
if (item.length() < MaxLenInZChoice) {
maxChar = item.length();
}
super.add(item.substring(0, maxChar));
values.addElement(value);
} | [
"public",
"void",
"add",
"(",
"String",
"item",
",",
"String",
"value",
")",
"{",
"int",
"maxChar",
"=",
"MaxLenInZChoice",
";",
"if",
"(",
"item",
".",
"length",
"(",
")",
"<",
"MaxLenInZChoice",
")",
"{",
"maxChar",
"=",
"item",
".",
"length",
"(",
... | restrict strings for the choice to MaxLenInZChoice characters | [
"restrict",
"strings",
"for",
"the",
"choice",
"to",
"MaxLenInZChoice",
"characters"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusChoice.java#L68-L78 |
62,077 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusChoice.java | ZaurusChoice.findValue | private int findValue(String s) {
for (int i = 0; i < values.size(); i++) {
if (s.equals(values.elementAt(i))) {
return i;
} // end of if (s.equals(values.elementAt(i)))
} // end of for (int i=0; i<values.size(); i++)
return -1;
} | java | private int findValue(String s) {
for (int i = 0; i < values.size(); i++) {
if (s.equals(values.elementAt(i))) {
return i;
} // end of if (s.equals(values.elementAt(i)))
} // end of for (int i=0; i<values.size(); i++)
return -1;
} | [
"private",
"int",
"findValue",
"(",
"String",
"s",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"values",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"if",
"(",
"s",
".",
"equals",
"(",
"values",
".",
"elementAt",
"(",
"i",... | find for a given value the index in values | [
"find",
"for",
"a",
"given",
"value",
"the",
"index",
"in",
"values"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusChoice.java#L121-L130 |
62,078 | VoltDB/voltdb | src/frontend/org/voltdb/rejoin/StreamSnapshotSink.java | StreamSnapshotSink.getNextChunk | public static ByteBuffer getNextChunk(byte[] schemaBytes, ByteBuffer buf,
CachedByteBufferAllocator resultBufferAllocator) {
buf.position(buf.position() + 4);//skip partition id
int length = schemaBytes.length + buf.remaining();
ByteBuffer outputBuffer ... | java | public static ByteBuffer getNextChunk(byte[] schemaBytes, ByteBuffer buf,
CachedByteBufferAllocator resultBufferAllocator) {
buf.position(buf.position() + 4);//skip partition id
int length = schemaBytes.length + buf.remaining();
ByteBuffer outputBuffer ... | [
"public",
"static",
"ByteBuffer",
"getNextChunk",
"(",
"byte",
"[",
"]",
"schemaBytes",
",",
"ByteBuffer",
"buf",
",",
"CachedByteBufferAllocator",
"resultBufferAllocator",
")",
"{",
"buf",
".",
"position",
"(",
"buf",
".",
"position",
"(",
")",
"+",
"4",
")",... | Assemble the chunk so that it can be used to construct the VoltTable that
will be passed to EE.
@param buf
@return | [
"Assemble",
"the",
"chunk",
"so",
"that",
"it",
"can",
"be",
"used",
"to",
"construct",
"the",
"VoltTable",
"that",
"will",
"be",
"passed",
"to",
"EE",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/rejoin/StreamSnapshotSink.java#L201-L212 |
62,079 | VoltDB/voltdb | src/frontend/org/voltdb/rejoin/StreamSnapshotSink.java | StreamSnapshotSink.processMessage | private RestoreWork processMessage(DecodedContainer msg,
CachedByteBufferAllocator resultBufferAllocator) {
if (msg == null) {
return null;
}
RestoreWork restoreWork = null;
try {
if (msg.m_msgType == StreamSnapshotMessageTy... | java | private RestoreWork processMessage(DecodedContainer msg,
CachedByteBufferAllocator resultBufferAllocator) {
if (msg == null) {
return null;
}
RestoreWork restoreWork = null;
try {
if (msg.m_msgType == StreamSnapshotMessageTy... | [
"private",
"RestoreWork",
"processMessage",
"(",
"DecodedContainer",
"msg",
",",
"CachedByteBufferAllocator",
"resultBufferAllocator",
")",
"{",
"if",
"(",
"msg",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"RestoreWork",
"restoreWork",
"=",
"null",
";",
... | Process a message pulled off from the network thread, and discard the
container once it's processed.
@param msg A pair of <sourceHSId, blockContainer>
@return The restore work, or null if there's no data block to return
to the site. | [
"Process",
"a",
"message",
"pulled",
"off",
"from",
"the",
"network",
"thread",
"and",
"discard",
"the",
"container",
"once",
"it",
"s",
"processed",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/rejoin/StreamSnapshotSink.java#L251-L325 |
62,080 | VoltDB/voltdb | src/frontend/org/voltdb/utils/MiscUtils.java | MiscUtils.copyFile | public static void copyFile(String fromPath, String toPath) throws Exception {
File inputFile = new File(fromPath);
File outputFile = new File(toPath);
com.google_voltpatches.common.io.Files.copy(inputFile, outputFile);
} | java | public static void copyFile(String fromPath, String toPath) throws Exception {
File inputFile = new File(fromPath);
File outputFile = new File(toPath);
com.google_voltpatches.common.io.Files.copy(inputFile, outputFile);
} | [
"public",
"static",
"void",
"copyFile",
"(",
"String",
"fromPath",
",",
"String",
"toPath",
")",
"throws",
"Exception",
"{",
"File",
"inputFile",
"=",
"new",
"File",
"(",
"fromPath",
")",
";",
"File",
"outputFile",
"=",
"new",
"File",
"(",
"toPath",
")",
... | Simple code to copy a file from one place to another...
Java should have this built in... stupid java... | [
"Simple",
"code",
"to",
"copy",
"a",
"file",
"from",
"one",
"place",
"to",
"another",
"...",
"Java",
"should",
"have",
"this",
"built",
"in",
"...",
"stupid",
"java",
"..."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/MiscUtils.java#L92-L96 |
62,081 | VoltDB/voltdb | src/frontend/org/voltdb/utils/MiscUtils.java | MiscUtils.parseRevisionString | public static String parseRevisionString(String fullBuildString) {
String build = "";
// Test for SVN revision string - example: https://svn.voltdb.com/eng/trunk?revision=2352
String[] splitted = fullBuildString.split("=", 2);
if (splitted.length == 2) {
build = splitted[1].... | java | public static String parseRevisionString(String fullBuildString) {
String build = "";
// Test for SVN revision string - example: https://svn.voltdb.com/eng/trunk?revision=2352
String[] splitted = fullBuildString.split("=", 2);
if (splitted.length == 2) {
build = splitted[1].... | [
"public",
"static",
"String",
"parseRevisionString",
"(",
"String",
"fullBuildString",
")",
"{",
"String",
"build",
"=",
"\"\"",
";",
"// Test for SVN revision string - example: https://svn.voltdb.com/eng/trunk?revision=2352",
"String",
"[",
"]",
"splitted",
"=",
"fullBuildSt... | Check that RevisionStrings are properly formatted.
@param fullBuildString
@return build revision # (SVN), build hash (git) or null | [
"Check",
"that",
"RevisionStrings",
"are",
"properly",
"formatted",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/MiscUtils.java#L402-L427 |
62,082 | VoltDB/voltdb | src/frontend/org/voltdb/utils/MiscUtils.java | MiscUtils.parseVersionString | public static Object[] parseVersionString(String versionString) {
if (versionString == null) {
return null;
}
// check for whitespace
if (versionString.matches("\\s")) {
return null;
}
// split on the dots
String[] split = versionString.s... | java | public static Object[] parseVersionString(String versionString) {
if (versionString == null) {
return null;
}
// check for whitespace
if (versionString.matches("\\s")) {
return null;
}
// split on the dots
String[] split = versionString.s... | [
"public",
"static",
"Object",
"[",
"]",
"parseVersionString",
"(",
"String",
"versionString",
")",
"{",
"if",
"(",
"versionString",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"// check for whitespace",
"if",
"(",
"versionString",
".",
"matches",
"(",
... | Parse a version string in the form of x.y.z. It doesn't require that
there are exactly three parts in the version. Each part must be separated
by a dot.
@param versionString
@return an array of each part as integer. | [
"Parse",
"a",
"version",
"string",
"in",
"the",
"form",
"of",
"x",
".",
"y",
".",
"z",
".",
"It",
"doesn",
"t",
"require",
"that",
"there",
"are",
"exactly",
"three",
"parts",
"in",
"the",
"version",
".",
"Each",
"part",
"must",
"be",
"separated",
"b... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/MiscUtils.java#L437-L471 |
62,083 | VoltDB/voltdb | src/frontend/org/voltdb/utils/MiscUtils.java | MiscUtils.compareVersions | public static int compareVersions(Object[] left, Object[] right) {
if (left == null || right == null) {
throw new IllegalArgumentException("Invalid versions");
}
for (int i = 0; i < left.length; i++) {
// right is shorter than left and share the same prefix => left must ... | java | public static int compareVersions(Object[] left, Object[] right) {
if (left == null || right == null) {
throw new IllegalArgumentException("Invalid versions");
}
for (int i = 0; i < left.length; i++) {
// right is shorter than left and share the same prefix => left must ... | [
"public",
"static",
"int",
"compareVersions",
"(",
"Object",
"[",
"]",
"left",
",",
"Object",
"[",
"]",
"right",
")",
"{",
"if",
"(",
"left",
"==",
"null",
"||",
"right",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid... | Compare two versions. Version should be represented as an array of
integers.
@param left
@param right
@return -1 if left is smaller than right, 0 if they are equal, 1 if left
is greater than right. | [
"Compare",
"two",
"versions",
".",
"Version",
"should",
"be",
"represented",
"as",
"an",
"array",
"of",
"integers",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/MiscUtils.java#L482-L534 |
62,084 | VoltDB/voltdb | src/frontend/org/voltdb/utils/MiscUtils.java | MiscUtils.isPro | public static boolean isPro() {
if (m_isPro == null) {
//Allow running pro kit as community.
if (!Boolean.parseBoolean(System.getProperty("community", "false"))) {
m_isPro = ProClass.load("org.voltdb.CommandLogImpl", "Command logging", ProClass.HANDLER_IGNORE)
... | java | public static boolean isPro() {
if (m_isPro == null) {
//Allow running pro kit as community.
if (!Boolean.parseBoolean(System.getProperty("community", "false"))) {
m_isPro = ProClass.load("org.voltdb.CommandLogImpl", "Command logging", ProClass.HANDLER_IGNORE)
... | [
"public",
"static",
"boolean",
"isPro",
"(",
")",
"{",
"if",
"(",
"m_isPro",
"==",
"null",
")",
"{",
"//Allow running pro kit as community.",
"if",
"(",
"!",
"Boolean",
".",
"parseBoolean",
"(",
"System",
".",
"getProperty",
"(",
"\"community\"",
",",
"\"false... | check if we're running pro code | [
"check",
"if",
"we",
"re",
"running",
"pro",
"code"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/MiscUtils.java#L563-L574 |
62,085 | VoltDB/voltdb | src/frontend/org/voltdb/utils/MiscUtils.java | MiscUtils.cheesyBufferCheckSum | public static final long cheesyBufferCheckSum(ByteBuffer buffer) {
final int mypos = buffer.position();
buffer.position(0);
long checksum = 0;
if (buffer.hasArray()) {
final byte bytes[] = buffer.array();
final int end = buffer.arrayOffset() + mypos;
f... | java | public static final long cheesyBufferCheckSum(ByteBuffer buffer) {
final int mypos = buffer.position();
buffer.position(0);
long checksum = 0;
if (buffer.hasArray()) {
final byte bytes[] = buffer.array();
final int end = buffer.arrayOffset() + mypos;
f... | [
"public",
"static",
"final",
"long",
"cheesyBufferCheckSum",
"(",
"ByteBuffer",
"buffer",
")",
"{",
"final",
"int",
"mypos",
"=",
"buffer",
".",
"position",
"(",
")",
";",
"buffer",
".",
"position",
"(",
"0",
")",
";",
"long",
"checksum",
"=",
"0",
";",
... | I heart commutativity
@param buffer ByteBuffer assumed position is at end of data
@return the cheesy checksum of this VoltTable | [
"I",
"heart",
"commutativity"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/MiscUtils.java#L617-L634 |
62,086 | VoltDB/voltdb | src/frontend/org/voltdb/utils/MiscUtils.java | MiscUtils.concatAll | public static <T> T[] concatAll(final T[] empty, Iterable<T[]> arrayList) {
assert(empty.length == 0);
if (arrayList.iterator().hasNext() == false) {
return empty;
}
int len = 0;
for (T[] subArray : arrayList) {
len += subArray.length;
}
i... | java | public static <T> T[] concatAll(final T[] empty, Iterable<T[]> arrayList) {
assert(empty.length == 0);
if (arrayList.iterator().hasNext() == false) {
return empty;
}
int len = 0;
for (T[] subArray : arrayList) {
len += subArray.length;
}
i... | [
"public",
"static",
"<",
"T",
">",
"T",
"[",
"]",
"concatAll",
"(",
"final",
"T",
"[",
"]",
"empty",
",",
"Iterable",
"<",
"T",
"[",
"]",
">",
"arrayList",
")",
"{",
"assert",
"(",
"empty",
".",
"length",
"==",
"0",
")",
";",
"if",
"(",
"arrayL... | Concatenate an list of arrays of typed-objects
@param empty An empty array of the right type used for cloning
@param arrayList A list of arrays to concatenate.
@return The concatenated mega-array. | [
"Concatenate",
"an",
"list",
"of",
"arrays",
"of",
"typed",
"-",
"objects"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/MiscUtils.java#L664-L681 |
62,087 | VoltDB/voltdb | src/frontend/org/voltdb/utils/MiscUtils.java | MiscUtils.getMBRss | public static long getMBRss(Client client) {
assert(client != null);
long rssMax = 0;
try {
ClientResponse r = client.callProcedure("@Statistics", "MEMORY", 0);
VoltTable stats = r.getResults()[0];
stats.resetRowPosition();
while (stats.advanceRow(... | java | public static long getMBRss(Client client) {
assert(client != null);
long rssMax = 0;
try {
ClientResponse r = client.callProcedure("@Statistics", "MEMORY", 0);
VoltTable stats = r.getResults()[0];
stats.resetRowPosition();
while (stats.advanceRow(... | [
"public",
"static",
"long",
"getMBRss",
"(",
"Client",
"client",
")",
"{",
"assert",
"(",
"client",
"!=",
"null",
")",
";",
"long",
"rssMax",
"=",
"0",
";",
"try",
"{",
"ClientResponse",
"r",
"=",
"client",
".",
"callProcedure",
"(",
"\"@Statistics\"",
"... | Get the resident set size, in mb, for the voltdb server on the other end of the client.
If the client is connected to multiple servers, return the max individual rss across
the cluster. | [
"Get",
"the",
"resident",
"set",
"size",
"in",
"mb",
"for",
"the",
"voltdb",
"server",
"on",
"the",
"other",
"end",
"of",
"the",
"client",
".",
"If",
"the",
"client",
"is",
"connected",
"to",
"multiple",
"servers",
"return",
"the",
"max",
"individual",
"... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/MiscUtils.java#L700-L720 |
62,088 | VoltDB/voltdb | src/frontend/org/voltdb/utils/MiscUtils.java | MiscUtils.zipToMap | public static <K, V> Multimap<K, V> zipToMap(List<K> keys, List<V> values)
{
if (keys.isEmpty() || values.isEmpty()) {
return null;
}
Iterator<K> keyIter = keys.iterator();
Iterator<V> valueIter = values.iterator();
ArrayListMultimap<K, V> result = ArrayListMulti... | java | public static <K, V> Multimap<K, V> zipToMap(List<K> keys, List<V> values)
{
if (keys.isEmpty() || values.isEmpty()) {
return null;
}
Iterator<K> keyIter = keys.iterator();
Iterator<V> valueIter = values.iterator();
ArrayListMultimap<K, V> result = ArrayListMulti... | [
"public",
"static",
"<",
"K",
",",
"V",
">",
"Multimap",
"<",
"K",
",",
"V",
">",
"zipToMap",
"(",
"List",
"<",
"K",
">",
"keys",
",",
"List",
"<",
"V",
">",
"values",
")",
"{",
"if",
"(",
"keys",
".",
"isEmpty",
"(",
")",
"||",
"values",
"."... | Zip the two lists up into a multimap
@return null if one of the lists is empty | [
"Zip",
"the",
"two",
"lists",
"up",
"into",
"a",
"multimap"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/MiscUtils.java#L726-L748 |
62,089 | VoltDB/voltdb | src/frontend/org/voltdb/utils/MiscUtils.java | MiscUtils.zip | public static <K> List<K> zip(Collection<Deque<K>> stuff)
{
final List<K> result = Lists.newArrayList();
// merge the results
Iterator<Deque<K>> iter = stuff.iterator();
while (iter.hasNext()) {
final K next = iter.next().poll();
if (next != null) {
... | java | public static <K> List<K> zip(Collection<Deque<K>> stuff)
{
final List<K> result = Lists.newArrayList();
// merge the results
Iterator<Deque<K>> iter = stuff.iterator();
while (iter.hasNext()) {
final K next = iter.next().poll();
if (next != null) {
... | [
"public",
"static",
"<",
"K",
">",
"List",
"<",
"K",
">",
"zip",
"(",
"Collection",
"<",
"Deque",
"<",
"K",
">",
">",
"stuff",
")",
"{",
"final",
"List",
"<",
"K",
">",
"result",
"=",
"Lists",
".",
"newArrayList",
"(",
")",
";",
"// merge the resul... | Aggregates the elements from each of the given deque. It takes one
element from the head of each deque in each loop and put them into a
single list. This method modifies the deques in-place.
@param stuff
@return | [
"Aggregates",
"the",
"elements",
"from",
"each",
"of",
"the",
"given",
"deque",
".",
"It",
"takes",
"one",
"element",
"from",
"the",
"head",
"of",
"each",
"deque",
"in",
"each",
"loop",
"and",
"put",
"them",
"into",
"a",
"single",
"list",
".",
"This",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/MiscUtils.java#L757-L777 |
62,090 | VoltDB/voltdb | src/frontend/org/voltdb/utils/MiscUtils.java | MiscUtils.sortedArrayListMultimap | public static <K extends Comparable<?>, V> ListMultimap<K, V> sortedArrayListMultimap()
{
Map<K, Collection<V>> map = Maps.newTreeMap();
return Multimaps.newListMultimap(map, new Supplier<List<V>>() {
@Override
public List<V> get()
{
return Lists.n... | java | public static <K extends Comparable<?>, V> ListMultimap<K, V> sortedArrayListMultimap()
{
Map<K, Collection<V>> map = Maps.newTreeMap();
return Multimaps.newListMultimap(map, new Supplier<List<V>>() {
@Override
public List<V> get()
{
return Lists.n... | [
"public",
"static",
"<",
"K",
"extends",
"Comparable",
"<",
"?",
">",
",",
"V",
">",
"ListMultimap",
"<",
"K",
",",
"V",
">",
"sortedArrayListMultimap",
"(",
")",
"{",
"Map",
"<",
"K",
",",
"Collection",
"<",
"V",
">",
">",
"map",
"=",
"Maps",
".",... | Create an ArrayListMultimap that uses TreeMap as the container map, so order is preserved. | [
"Create",
"an",
"ArrayListMultimap",
"that",
"uses",
"TreeMap",
"as",
"the",
"container",
"map",
"so",
"order",
"is",
"preserved",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/MiscUtils.java#L782-L792 |
62,091 | VoltDB/voltdb | src/frontend/org/voltdb/utils/MiscUtils.java | MiscUtils.roundTripForCL | public static StoredProcedureInvocation roundTripForCL(StoredProcedureInvocation invocation) throws IOException
{
if (invocation.getSerializedParams() != null) {
return invocation;
}
ByteBuffer buf = ByteBuffer.allocate(invocation.getSerializedSize());
invocation.flattenT... | java | public static StoredProcedureInvocation roundTripForCL(StoredProcedureInvocation invocation) throws IOException
{
if (invocation.getSerializedParams() != null) {
return invocation;
}
ByteBuffer buf = ByteBuffer.allocate(invocation.getSerializedSize());
invocation.flattenT... | [
"public",
"static",
"StoredProcedureInvocation",
"roundTripForCL",
"(",
"StoredProcedureInvocation",
"invocation",
")",
"throws",
"IOException",
"{",
"if",
"(",
"invocation",
".",
"getSerializedParams",
"(",
")",
"!=",
"null",
")",
"{",
"return",
"invocation",
";",
... | Serialize and then deserialize an invocation so that it has serializedParams set for command logging if the
invocation is sent to a local site.
@return The round-tripped version of the invocation
@throws IOException | [
"Serialize",
"and",
"then",
"deserialize",
"an",
"invocation",
"so",
"that",
"it",
"has",
"serializedParams",
"set",
"for",
"command",
"logging",
"if",
"the",
"invocation",
"is",
"sent",
"to",
"a",
"local",
"site",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/MiscUtils.java#L800-L812 |
62,092 | VoltDB/voltdb | src/frontend/org/voltdb/utils/MiscUtils.java | MiscUtils.getBinaryPartitionKeys | public static Map<Integer, byte[]> getBinaryPartitionKeys(TheHashinator hashinator) {
Map<Integer, byte[]> partitionMap = new HashMap<>();
VoltTable partitionKeys = null;
if (hashinator == null) {
partitionKeys = TheHashinator.getPartitionKeys(VoltType.VARBINARY);
}
... | java | public static Map<Integer, byte[]> getBinaryPartitionKeys(TheHashinator hashinator) {
Map<Integer, byte[]> partitionMap = new HashMap<>();
VoltTable partitionKeys = null;
if (hashinator == null) {
partitionKeys = TheHashinator.getPartitionKeys(VoltType.VARBINARY);
}
... | [
"public",
"static",
"Map",
"<",
"Integer",
",",
"byte",
"[",
"]",
">",
"getBinaryPartitionKeys",
"(",
"TheHashinator",
"hashinator",
")",
"{",
"Map",
"<",
"Integer",
",",
"byte",
"[",
"]",
">",
"partitionMap",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
... | Get VARBINARY partition keys for the specified topology.
@return A map from partition IDs to partition keys, null if failed to get the keys. | [
"Get",
"VARBINARY",
"partition",
"keys",
"for",
"the",
"specified",
"topology",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/MiscUtils.java#L1002-L1025 |
62,093 | VoltDB/voltdb | src/frontend/org/voltdb/utils/MiscUtils.java | MiscUtils.readPropertiesFromCredentials | public static Properties readPropertiesFromCredentials(String credentials) {
Properties props = new Properties();
File propFD = new File(credentials);
if (!propFD.exists() || !propFD.isFile() || !propFD.canRead()) {
throw new IllegalArgumentException("Credentials file " + credentials... | java | public static Properties readPropertiesFromCredentials(String credentials) {
Properties props = new Properties();
File propFD = new File(credentials);
if (!propFD.exists() || !propFD.isFile() || !propFD.canRead()) {
throw new IllegalArgumentException("Credentials file " + credentials... | [
"public",
"static",
"Properties",
"readPropertiesFromCredentials",
"(",
"String",
"credentials",
")",
"{",
"Properties",
"props",
"=",
"new",
"Properties",
"(",
")",
";",
"File",
"propFD",
"=",
"new",
"File",
"(",
"credentials",
")",
";",
"if",
"(",
"!",
"pr... | Get username and password from credentials file.
@return a Properties variable which contains username and password. | [
"Get",
"username",
"and",
"password",
"from",
"credentials",
"file",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/MiscUtils.java#L1031-L1046 |
62,094 | VoltDB/voltdb | src/frontend/org/voltdb/utils/MiscUtils.java | MiscUtils.writeDeferredSerialization | public static int writeDeferredSerialization(ByteBuffer mbuf, DeferredSerialization ds) throws IOException
{
int written = 0;
try {
final int objStartPosition = mbuf.position();
ds.serialize(mbuf);
written = mbuf.position() - objStartPosition;
} finally {
... | java | public static int writeDeferredSerialization(ByteBuffer mbuf, DeferredSerialization ds) throws IOException
{
int written = 0;
try {
final int objStartPosition = mbuf.position();
ds.serialize(mbuf);
written = mbuf.position() - objStartPosition;
} finally {
... | [
"public",
"static",
"int",
"writeDeferredSerialization",
"(",
"ByteBuffer",
"mbuf",
",",
"DeferredSerialization",
"ds",
")",
"throws",
"IOException",
"{",
"int",
"written",
"=",
"0",
";",
"try",
"{",
"final",
"int",
"objStartPosition",
"=",
"mbuf",
".",
"positio... | Serialize the deferred serializer data into byte buffer
@param mbuf ByteBuffer the buffer is written to
@param ds DeferredSerialization data writes to the byte buffer
@return size of data
@throws IOException | [
"Serialize",
"the",
"deferred",
"serializer",
"data",
"into",
"byte",
"buffer"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/MiscUtils.java#L1055-L1066 |
62,095 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/RowAVL.java | RowAVL.getNode | public NodeAVL getNode(int index) {
NodeAVL n = nPrimaryNode;
while (index-- > 0) {
n = n.nNext;
}
return n;
} | java | public NodeAVL getNode(int index) {
NodeAVL n = nPrimaryNode;
while (index-- > 0) {
n = n.nNext;
}
return n;
} | [
"public",
"NodeAVL",
"getNode",
"(",
"int",
"index",
")",
"{",
"NodeAVL",
"n",
"=",
"nPrimaryNode",
";",
"while",
"(",
"index",
"--",
">",
"0",
")",
"{",
"n",
"=",
"n",
".",
"nNext",
";",
"}",
"return",
"n",
";",
"}"
] | Returns the Node for a given Index, using the ordinal position of the
Index within the Table Object. | [
"Returns",
"the",
"Node",
"for",
"a",
"given",
"Index",
"using",
"the",
"ordinal",
"position",
"of",
"the",
"Index",
"within",
"the",
"Table",
"Object",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RowAVL.java#L128-L137 |
62,096 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/RowAVL.java | RowAVL.getNextNode | NodeAVL getNextNode(NodeAVL n) {
if (n == null) {
n = nPrimaryNode;
} else {
n = n.nNext;
}
return n;
} | java | NodeAVL getNextNode(NodeAVL n) {
if (n == null) {
n = nPrimaryNode;
} else {
n = n.nNext;
}
return n;
} | [
"NodeAVL",
"getNextNode",
"(",
"NodeAVL",
"n",
")",
"{",
"if",
"(",
"n",
"==",
"null",
")",
"{",
"n",
"=",
"nPrimaryNode",
";",
"}",
"else",
"{",
"n",
"=",
"n",
".",
"nNext",
";",
"}",
"return",
"n",
";",
"}"
] | Returns the Node for the next Index on this database row, given the
Node for any Index. | [
"Returns",
"the",
"Node",
"for",
"the",
"next",
"Index",
"on",
"this",
"database",
"row",
"given",
"the",
"Node",
"for",
"any",
"Index",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RowAVL.java#L143-L152 |
62,097 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java | DataTree.listACLEquals | private boolean listACLEquals(List<ACL> lista, List<ACL> listb) {
if (lista.size() != listb.size()) {
return false;
}
for (int i = 0; i < lista.size(); i++) {
ACL a = lista.get(i);
ACL b = listb.get(i);
if (!a.equals(b)) {
return fa... | java | private boolean listACLEquals(List<ACL> lista, List<ACL> listb) {
if (lista.size() != listb.size()) {
return false;
}
for (int i = 0; i < lista.size(); i++) {
ACL a = lista.get(i);
ACL b = listb.get(i);
if (!a.equals(b)) {
return fa... | [
"private",
"boolean",
"listACLEquals",
"(",
"List",
"<",
"ACL",
">",
"lista",
",",
"List",
"<",
"ACL",
">",
"listb",
")",
"{",
"if",
"(",
"lista",
".",
"size",
"(",
")",
"!=",
"listb",
".",
"size",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",... | compare two list of acls. if there elements are in the same order and the
same size then return true else return false
@param lista
the list to be compared
@param listb
the list to be compared
@return true if and only if the lists are of the same size and the
elements are in the same order in lista and listb | [
"compare",
"two",
"list",
"of",
"acls",
".",
"if",
"there",
"elements",
"are",
"in",
"the",
"same",
"order",
"and",
"the",
"same",
"size",
"then",
"return",
"true",
"else",
"return",
"false"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java#L168-L180 |
62,098 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java | DataTree.convertAcls | public synchronized Long convertAcls(List<ACL> acls) {
if (acls == null)
return -1L;
// get the value from the map
Long ret = aclKeyMap.get(acls);
// could not find the map
if (ret != null)
return ret;
long val = incrementIndex();
longKeyMa... | java | public synchronized Long convertAcls(List<ACL> acls) {
if (acls == null)
return -1L;
// get the value from the map
Long ret = aclKeyMap.get(acls);
// could not find the map
if (ret != null)
return ret;
long val = incrementIndex();
longKeyMa... | [
"public",
"synchronized",
"Long",
"convertAcls",
"(",
"List",
"<",
"ACL",
">",
"acls",
")",
"{",
"if",
"(",
"acls",
"==",
"null",
")",
"return",
"-",
"1L",
";",
"// get the value from the map",
"Long",
"ret",
"=",
"aclKeyMap",
".",
"get",
"(",
"acls",
")... | converts the list of acls to a list of longs.
@param acls
@return a list of longs that map to the acls | [
"converts",
"the",
"list",
"of",
"acls",
"to",
"a",
"list",
"of",
"longs",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java#L188-L200 |
62,099 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java | DataTree.convertLong | public synchronized List<ACL> convertLong(Long longVal) {
if (longVal == null)
return null;
if (longVal == -1L)
return Ids.OPEN_ACL_UNSAFE;
List<ACL> acls = longKeyMap.get(longVal);
if (acls == null) {
LOG.error("ERROR: ACL not available for long " + l... | java | public synchronized List<ACL> convertLong(Long longVal) {
if (longVal == null)
return null;
if (longVal == -1L)
return Ids.OPEN_ACL_UNSAFE;
List<ACL> acls = longKeyMap.get(longVal);
if (acls == null) {
LOG.error("ERROR: ACL not available for long " + l... | [
"public",
"synchronized",
"List",
"<",
"ACL",
">",
"convertLong",
"(",
"Long",
"longVal",
")",
"{",
"if",
"(",
"longVal",
"==",
"null",
")",
"return",
"null",
";",
"if",
"(",
"longVal",
"==",
"-",
"1L",
")",
"return",
"Ids",
".",
"OPEN_ACL_UNSAFE",
";"... | converts a list of longs to a list of acls.
@param longs
the list of longs
@return a list of ACLs that map to longs | [
"converts",
"a",
"list",
"of",
"longs",
"to",
"a",
"list",
"of",
"acls",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java#L209-L220 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.