id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
61,300 | VoltDB/voltdb | src/frontend/org/voltdb/importclient/kinesis/KinesisStreamImporterConfig.java | KinesisStreamImporterConfig.getProperty | public static String getProperty(Properties props, String propertyName, String defaultValue) {
String value = props.getProperty(propertyName, defaultValue).trim();
if (value.isEmpty()) {
throw new IllegalArgumentException(
"Property " + propertyName + " is missing in Kine... | java | public static String getProperty(Properties props, String propertyName, String defaultValue) {
String value = props.getProperty(propertyName, defaultValue).trim();
if (value.isEmpty()) {
throw new IllegalArgumentException(
"Property " + propertyName + " is missing in Kine... | [
"public",
"static",
"String",
"getProperty",
"(",
"Properties",
"props",
",",
"String",
"propertyName",
",",
"String",
"defaultValue",
")",
"{",
"String",
"value",
"=",
"props",
".",
"getProperty",
"(",
"propertyName",
",",
"defaultValue",
")",
".",
"trim",
"(... | get property value. If no value is available, throw IllegalArgumentException
@param props The properties
@param propertyName property name
@param defaultValue The default value
@return property value | [
"get",
"property",
"value",
".",
"If",
"no",
"value",
"is",
"available",
"throw",
"IllegalArgumentException"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importclient/kinesis/KinesisStreamImporterConfig.java#L216-L223 |
61,301 | VoltDB/voltdb | src/frontend/org/voltdb/importclient/kinesis/KinesisStreamImporterConfig.java | KinesisStreamImporterConfig.getPropertyAsLong | public static long getPropertyAsLong(Properties props, String propertyName, long defaultValue) {
String value = props.getProperty(propertyName, "").trim();
if (value.isEmpty()) {
return defaultValue;
}
try {
long val = Long.parseLong(value);
if (val <=... | java | public static long getPropertyAsLong(Properties props, String propertyName, long defaultValue) {
String value = props.getProperty(propertyName, "").trim();
if (value.isEmpty()) {
return defaultValue;
}
try {
long val = Long.parseLong(value);
if (val <=... | [
"public",
"static",
"long",
"getPropertyAsLong",
"(",
"Properties",
"props",
",",
"String",
"propertyName",
",",
"long",
"defaultValue",
")",
"{",
"String",
"value",
"=",
"props",
".",
"getProperty",
"(",
"propertyName",
",",
"\"\"",
")",
".",
"trim",
"(",
"... | get property value as long.
@param props The properties
@param propertyName property name
@param defaultValue The default value
@return property value | [
"get",
"property",
"value",
"as",
"long",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importclient/kinesis/KinesisStreamImporterConfig.java#L232-L248 |
61,302 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/DataNode.java | DataNode.addChild | public synchronized boolean addChild(String child) {
if (children == null) {
// let's be conservative on the typical number of children
children = new HashSet<String>(8);
}
return children.add(child);
} | java | public synchronized boolean addChild(String child) {
if (children == null) {
// let's be conservative on the typical number of children
children = new HashSet<String>(8);
}
return children.add(child);
} | [
"public",
"synchronized",
"boolean",
"addChild",
"(",
"String",
"child",
")",
"{",
"if",
"(",
"children",
"==",
"null",
")",
"{",
"// let's be conservative on the typical number of children",
"children",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
"8",
")",
... | Method that inserts a child into the children set
@param child
to be inserted
@return true if this set did not already contain the specified element | [
"Method",
"that",
"inserts",
"a",
"child",
"into",
"the",
"children",
"set"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/DataNode.java#L96-L102 |
61,303 | VoltDB/voltdb | src/frontend/org/voltdb/utils/VoltBaseServlet.java | VoltBaseServlet.getHostHeader | protected String getHostHeader() {
if (m_hostHeader != null) {
return m_hostHeader;
}
if (!httpAdminListener.m_publicIntf.isEmpty()) {
m_hostHeader = httpAdminListener.m_publicIntf;
return m_hostHeader;
}
InetAddress addr = null;
int ... | java | protected String getHostHeader() {
if (m_hostHeader != null) {
return m_hostHeader;
}
if (!httpAdminListener.m_publicIntf.isEmpty()) {
m_hostHeader = httpAdminListener.m_publicIntf;
return m_hostHeader;
}
InetAddress addr = null;
int ... | [
"protected",
"String",
"getHostHeader",
"(",
")",
"{",
"if",
"(",
"m_hostHeader",
"!=",
"null",
")",
"{",
"return",
"m_hostHeader",
";",
"}",
"if",
"(",
"!",
"httpAdminListener",
".",
"m_publicIntf",
".",
"isEmpty",
"(",
")",
")",
"{",
"m_hostHeader",
"=",... | like behind a NATed network. | [
"like",
"behind",
"a",
"NATed",
"network",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/VoltBaseServlet.java#L65-L94 |
61,304 | VoltDB/voltdb | src/frontend/org/voltdb/utils/VoltBaseServlet.java | VoltBaseServlet.handleReportPage | void handleReportPage(HttpServletRequest request, HttpServletResponse response) {
try {
String report = ReportMaker.liveReport();
response.setContentType(HTML_CONTENT_TYPE);
response.setStatus(HttpServletResponse.SC_OK);
response.getWriter().print(report);
... | java | void handleReportPage(HttpServletRequest request, HttpServletResponse response) {
try {
String report = ReportMaker.liveReport();
response.setContentType(HTML_CONTENT_TYPE);
response.setStatus(HttpServletResponse.SC_OK);
response.getWriter().print(report);
... | [
"void",
"handleReportPage",
"(",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
")",
"{",
"try",
"{",
"String",
"report",
"=",
"ReportMaker",
".",
"liveReport",
"(",
")",
";",
"response",
".",
"setContentType",
"(",
"HTML_CONTENT_TYPE",
"... | Draw the catalog report page, mostly by pulling it from the JAR. | [
"Draw",
"the",
"catalog",
"report",
"page",
"mostly",
"by",
"pulling",
"it",
"from",
"the",
"JAR",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/VoltBaseServlet.java#L118-L129 |
61,305 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java | HsqlProperties.getIntegerProperty | public int getIntegerProperty(String key, int defaultValue, int[] values) {
String prop = getProperty(key);
int value = defaultValue;
try {
if (prop != null) {
value = Integer.parseInt(prop);
}
} catch (NumberFormatException e) {}
if... | java | public int getIntegerProperty(String key, int defaultValue, int[] values) {
String prop = getProperty(key);
int value = defaultValue;
try {
if (prop != null) {
value = Integer.parseInt(prop);
}
} catch (NumberFormatException e) {}
if... | [
"public",
"int",
"getIntegerProperty",
"(",
"String",
"key",
",",
"int",
"defaultValue",
",",
"int",
"[",
"]",
"values",
")",
"{",
"String",
"prop",
"=",
"getProperty",
"(",
"key",
")",
";",
"int",
"value",
"=",
"defaultValue",
";",
"try",
"{",
"if",
"... | Choice limited to values list, defaultValue must be in the values list. | [
"Choice",
"limited",
"to",
"values",
"list",
"defaultValue",
"must",
"be",
"in",
"the",
"values",
"list",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java#L175-L191 |
61,306 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java | HsqlProperties.save | public void save() throws Exception {
if (fileName == null || fileName.length() == 0) {
throw new java.io.FileNotFoundException(
Error.getMessage(ErrorCode.M_HsqlProperties_load));
}
String filestring = fileName + ".properties";
save(filestring);
} | java | public void save() throws Exception {
if (fileName == null || fileName.length() == 0) {
throw new java.io.FileNotFoundException(
Error.getMessage(ErrorCode.M_HsqlProperties_load));
}
String filestring = fileName + ".properties";
save(filestring);
} | [
"public",
"void",
"save",
"(",
")",
"throws",
"Exception",
"{",
"if",
"(",
"fileName",
"==",
"null",
"||",
"fileName",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"throw",
"new",
"java",
".",
"io",
".",
"FileNotFoundException",
"(",
"Error",
".",
"... | Saves the properties. | [
"Saves",
"the",
"properties",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java#L276-L286 |
61,307 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java | HsqlProperties.save | public void save(String fileString) throws Exception {
// oj@openoffice.org
fa.createParentDirs(fileString);
OutputStream fos = fa.openOutputStreamElement(fileString);
FileAccess.FileSync outDescriptor = fa.getFileSync(fos);
JavaSystem.saveProperties(
stringProps,
... | java | public void save(String fileString) throws Exception {
// oj@openoffice.org
fa.createParentDirs(fileString);
OutputStream fos = fa.openOutputStreamElement(fileString);
FileAccess.FileSync outDescriptor = fa.getFileSync(fos);
JavaSystem.saveProperties(
stringProps,
... | [
"public",
"void",
"save",
"(",
"String",
"fileString",
")",
"throws",
"Exception",
"{",
"// oj@openoffice.org",
"fa",
".",
"createParentDirs",
"(",
"fileString",
")",
";",
"OutputStream",
"fos",
"=",
"fa",
".",
"openOutputStreamElement",
"(",
"fileString",
")",
... | Saves the properties using JDK2 method if present, otherwise JDK1. | [
"Saves",
"the",
"properties",
"using",
"JDK2",
"method",
"if",
"present",
"otherwise",
"JDK1",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java#L291-L308 |
61,308 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java | HsqlProperties.addError | private void addError(int code, String key) {
errorCodes = (int[]) ArrayUtil.resizeArray(errorCodes,
errorCodes.length + 1);
errorKeys = (String[]) ArrayUtil.resizeArray(errorKeys,
errorKeys.length + 1);
errorCodes[errorCodes.length - 1] = code;
errorKeys... | java | private void addError(int code, String key) {
errorCodes = (int[]) ArrayUtil.resizeArray(errorCodes,
errorCodes.length + 1);
errorKeys = (String[]) ArrayUtil.resizeArray(errorKeys,
errorKeys.length + 1);
errorCodes[errorCodes.length - 1] = code;
errorKeys... | [
"private",
"void",
"addError",
"(",
"int",
"code",
",",
"String",
"key",
")",
"{",
"errorCodes",
"=",
"(",
"int",
"[",
"]",
")",
"ArrayUtil",
".",
"resizeArray",
"(",
"errorCodes",
",",
"errorCodes",
".",
"length",
"+",
"1",
")",
";",
"errorKeys",
"=",... | Adds the error code and the key to the list of errors. This list
is populated during construction or addition of elements and is used
outside this class to act upon the errors. | [
"Adds",
"the",
"error",
"code",
"and",
"the",
"key",
"to",
"the",
"list",
"of",
"errors",
".",
"This",
"list",
"is",
"populated",
"during",
"construction",
"or",
"addition",
"of",
"elements",
"and",
"is",
"used",
"outside",
"this",
"class",
"to",
"act",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java#L315-L323 |
61,309 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/rights/User.java | User.checkPassword | public void checkPassword(String value) {
if (!value.equals(password)) {
throw Error.error(ErrorCode.X_28000);
}
} | java | public void checkPassword(String value) {
if (!value.equals(password)) {
throw Error.error(ErrorCode.X_28000);
}
} | [
"public",
"void",
"checkPassword",
"(",
"String",
"value",
")",
"{",
"if",
"(",
"!",
"value",
".",
"equals",
"(",
"password",
")",
")",
"{",
"throw",
"Error",
".",
"error",
"(",
"ErrorCode",
".",
"X_28000",
")",
";",
"}",
"}"
] | Checks if this object's password attibute equals
specified argument, else throws. | [
"Checks",
"if",
"this",
"object",
"s",
"password",
"attibute",
"equals",
"specified",
"argument",
"else",
"throws",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/User.java#L94-L99 |
61,310 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/rights/User.java | User.getCreateUserSQL | public String getCreateUserSQL() {
StringBuffer sb = new StringBuffer(64);
sb.append(Tokens.T_CREATE).append(' ');
sb.append(Tokens.T_USER).append(' ');
sb.append(getStatementName()).append(' ');
sb.append(Tokens.T_PASSWORD).append(' ');
sb.append(StringConverter.toQuot... | java | public String getCreateUserSQL() {
StringBuffer sb = new StringBuffer(64);
sb.append(Tokens.T_CREATE).append(' ');
sb.append(Tokens.T_USER).append(' ');
sb.append(getStatementName()).append(' ');
sb.append(Tokens.T_PASSWORD).append(' ');
sb.append(StringConverter.toQuot... | [
"public",
"String",
"getCreateUserSQL",
"(",
")",
"{",
"StringBuffer",
"sb",
"=",
"new",
"StringBuffer",
"(",
"64",
")",
";",
"sb",
".",
"append",
"(",
"Tokens",
".",
"T_CREATE",
")",
".",
"append",
"(",
"'",
"'",
")",
";",
"sb",
".",
"append",
"(",
... | Returns the DDL string
sequence that creates this user. | [
"Returns",
"the",
"DDL",
"string",
"sequence",
"that",
"creates",
"this",
"user",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/User.java#L177-L188 |
61,311 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/rights/User.java | User.getConnectUserSQL | public String getConnectUserSQL() {
StringBuffer sb = new StringBuffer();
sb.append(Tokens.T_SET).append(' ');
sb.append(Tokens.T_SESSION).append(' ');
sb.append(Tokens.T_AUTHORIZATION).append(' ');
sb.append(StringConverter.toQuotedString(getNameString(), '\'', true));
... | java | public String getConnectUserSQL() {
StringBuffer sb = new StringBuffer();
sb.append(Tokens.T_SET).append(' ');
sb.append(Tokens.T_SESSION).append(' ');
sb.append(Tokens.T_AUTHORIZATION).append(' ');
sb.append(StringConverter.toQuotedString(getNameString(), '\'', true));
... | [
"public",
"String",
"getConnectUserSQL",
"(",
")",
"{",
"StringBuffer",
"sb",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"sb",
".",
"append",
"(",
"Tokens",
".",
"T_SET",
")",
".",
"append",
"(",
"'",
"'",
")",
";",
"sb",
".",
"append",
"(",
"Tokens"... | Retrieves the redo log character sequence for connecting
this user
@return the redo log character sequence for connecting
this user | [
"Retrieves",
"the",
"redo",
"log",
"character",
"sequence",
"for",
"connecting",
"this",
"user"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/User.java#L197-L207 |
61,312 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/thirdparty/publicsuffix/TrieParser.java | TrieParser.parseTrie | static ImmutableMap<String, PublicSuffixType> parseTrie(CharSequence encoded) {
ImmutableMap.Builder<String, PublicSuffixType> builder = ImmutableMap.builder();
int encodedLen = encoded.length();
int idx = 0;
while (idx < encodedLen) {
idx +=
doParseTrieToBuilder(
Lists.<Ch... | java | static ImmutableMap<String, PublicSuffixType> parseTrie(CharSequence encoded) {
ImmutableMap.Builder<String, PublicSuffixType> builder = ImmutableMap.builder();
int encodedLen = encoded.length();
int idx = 0;
while (idx < encodedLen) {
idx +=
doParseTrieToBuilder(
Lists.<Ch... | [
"static",
"ImmutableMap",
"<",
"String",
",",
"PublicSuffixType",
">",
"parseTrie",
"(",
"CharSequence",
"encoded",
")",
"{",
"ImmutableMap",
".",
"Builder",
"<",
"String",
",",
"PublicSuffixType",
">",
"builder",
"=",
"ImmutableMap",
".",
"builder",
"(",
")",
... | Parses a serialized trie representation of a map of reversed public suffixes into an immutable
map of public suffixes. | [
"Parses",
"a",
"serialized",
"trie",
"representation",
"of",
"a",
"map",
"of",
"reversed",
"public",
"suffixes",
"into",
"an",
"immutable",
"map",
"of",
"public",
"suffixes",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/thirdparty/publicsuffix/TrieParser.java#L36-L46 |
61,313 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/thirdparty/publicsuffix/TrieParser.java | TrieParser.doParseTrieToBuilder | private static int doParseTrieToBuilder(
List<CharSequence> stack,
CharSequence encoded,
ImmutableMap.Builder<String, PublicSuffixType> builder) {
int encodedLen = encoded.length();
int idx = 0;
char c = '\0';
// Read all of the characters for this node.
for (; idx < encodedLen; ... | java | private static int doParseTrieToBuilder(
List<CharSequence> stack,
CharSequence encoded,
ImmutableMap.Builder<String, PublicSuffixType> builder) {
int encodedLen = encoded.length();
int idx = 0;
char c = '\0';
// Read all of the characters for this node.
for (; idx < encodedLen; ... | [
"private",
"static",
"int",
"doParseTrieToBuilder",
"(",
"List",
"<",
"CharSequence",
">",
"stack",
",",
"CharSequence",
"encoded",
",",
"ImmutableMap",
".",
"Builder",
"<",
"String",
",",
"PublicSuffixType",
">",
"builder",
")",
"{",
"int",
"encodedLen",
"=",
... | Parses a trie node and returns the number of characters consumed.
@param stack The prefixes that preceed the characters represented by this node. Each entry of
the stack is in reverse order.
@param encoded The serialized trie.
@param builder A map builder to which all entries will be added.
@return The number of chara... | [
"Parses",
"a",
"trie",
"node",
"and",
"returns",
"the",
"number",
"of",
"characters",
"consumed",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/thirdparty/publicsuffix/TrieParser.java#L57-L101 |
61,314 | VoltDB/voltdb | src/frontend/org/voltdb/export/ExportManager.java | ExportManager.initialize | public static synchronized void initialize(
int myHostId,
CatalogContext catalogContext,
boolean isRejoin,
boolean forceCreate,
HostMessenger messenger,
List<Pair<Integer, Integer>> partitions)
throws ExportManager.SetupException
{
... | java | public static synchronized void initialize(
int myHostId,
CatalogContext catalogContext,
boolean isRejoin,
boolean forceCreate,
HostMessenger messenger,
List<Pair<Integer, Integer>> partitions)
throws ExportManager.SetupException
{
... | [
"public",
"static",
"synchronized",
"void",
"initialize",
"(",
"int",
"myHostId",
",",
"CatalogContext",
"catalogContext",
",",
"boolean",
"isRejoin",
",",
"boolean",
"forceCreate",
",",
"HostMessenger",
"messenger",
",",
"List",
"<",
"Pair",
"<",
"Integer",
",",
... | FIXME - this synchronizes on the ExportManager class, but everyone else synchronizes on the instance. | [
"FIXME",
"-",
"this",
"synchronizes",
"on",
"the",
"ExportManager",
"class",
"but",
"everyone",
"else",
"synchronizes",
"on",
"the",
"instance",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportManager.java#L250-L270 |
61,315 | VoltDB/voltdb | src/frontend/org/voltdb/export/ExportManager.java | ExportManager.initialize | private void initialize(CatalogContext catalogContext, List<Pair<Integer, Integer>> localPartitionsToSites,
boolean isRejoin) {
try {
CatalogMap<Connector> connectors = CatalogUtil.getConnectors(catalogContext);
if (exportLog.isDebugEnabled()) {
exportLog.debu... | java | private void initialize(CatalogContext catalogContext, List<Pair<Integer, Integer>> localPartitionsToSites,
boolean isRejoin) {
try {
CatalogMap<Connector> connectors = CatalogUtil.getConnectors(catalogContext);
if (exportLog.isDebugEnabled()) {
exportLog.debu... | [
"private",
"void",
"initialize",
"(",
"CatalogContext",
"catalogContext",
",",
"List",
"<",
"Pair",
"<",
"Integer",
",",
"Integer",
">",
">",
"localPartitionsToSites",
",",
"boolean",
"isRejoin",
")",
"{",
"try",
"{",
"CatalogMap",
"<",
"Connector",
">",
"conn... | Creates the initial export processor if export is enabled | [
"Creates",
"the",
"initial",
"export",
"processor",
"if",
"export",
"is",
"enabled"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportManager.java#L454-L489 |
61,316 | VoltDB/voltdb | src/frontend/org/voltdb/export/ExportManager.java | ExportManager.swapWithNewProcessor | private void swapWithNewProcessor(
final CatalogContext catalogContext,
ExportGeneration generation,
CatalogMap<Connector> connectors,
List<Pair<Integer, Integer>> partitions,
Map<String, Pair<Properties, Set<String>>> config)
{
ExportDataProcessor... | java | private void swapWithNewProcessor(
final CatalogContext catalogContext,
ExportGeneration generation,
CatalogMap<Connector> connectors,
List<Pair<Integer, Integer>> partitions,
Map<String, Pair<Properties, Set<String>>> config)
{
ExportDataProcessor... | [
"private",
"void",
"swapWithNewProcessor",
"(",
"final",
"CatalogContext",
"catalogContext",
",",
"ExportGeneration",
"generation",
",",
"CatalogMap",
"<",
"Connector",
">",
"connectors",
",",
"List",
"<",
"Pair",
"<",
"Integer",
",",
"Integer",
">",
">",
"partiti... | remove and install new processor | [
"remove",
"and",
"install",
"new",
"processor"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportManager.java#L588-L629 |
61,317 | VoltDB/voltdb | src/frontend/org/voltdb/planner/ParsedInsertStmt.java | ParsedInsertStmt.calculateContentDeterminismMessage | @Override
public String calculateContentDeterminismMessage() {
String ans = getContentDeterminismMessage();
if (ans != null) {
return ans;
}
if (m_subquery != null) {
updateContentDeterminismMessage(m_subquery.calculateContentDeterminismMessage());
... | java | @Override
public String calculateContentDeterminismMessage() {
String ans = getContentDeterminismMessage();
if (ans != null) {
return ans;
}
if (m_subquery != null) {
updateContentDeterminismMessage(m_subquery.calculateContentDeterminismMessage());
... | [
"@",
"Override",
"public",
"String",
"calculateContentDeterminismMessage",
"(",
")",
"{",
"String",
"ans",
"=",
"getContentDeterminismMessage",
"(",
")",
";",
"if",
"(",
"ans",
"!=",
"null",
")",
"{",
"return",
"ans",
";",
"}",
"if",
"(",
"m_subquery",
"!=",... | Return the content determinism string of the subquery if there is one. | [
"Return",
"the",
"content",
"determinism",
"string",
"of",
"the",
"subquery",
"if",
"there",
"is",
"one",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ParsedInsertStmt.java#L257-L277 |
61,318 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/WindowFunctionExpression.java | WindowFunctionExpression.getSortIndexOfOrderByExpression | public int getSortIndexOfOrderByExpression(AbstractExpression partitionByExpression) {
for (int idx = 0; idx < m_orderByExpressions.size(); ++idx) {
if (m_orderByExpressions.get(idx).equals(partitionByExpression)) {
return idx;
}
}
return -1;
} | java | public int getSortIndexOfOrderByExpression(AbstractExpression partitionByExpression) {
for (int idx = 0; idx < m_orderByExpressions.size(); ++idx) {
if (m_orderByExpressions.get(idx).equals(partitionByExpression)) {
return idx;
}
}
return -1;
} | [
"public",
"int",
"getSortIndexOfOrderByExpression",
"(",
"AbstractExpression",
"partitionByExpression",
")",
"{",
"for",
"(",
"int",
"idx",
"=",
"0",
";",
"idx",
"<",
"m_orderByExpressions",
".",
"size",
"(",
")",
";",
"++",
"idx",
")",
"{",
"if",
"(",
"m_or... | Return the index of the given partition by expression in the
order by list. This is used when trying to rationalize partition by
and order by expressions.
@param partitionByExpression
@return | [
"Return",
"the",
"index",
"of",
"the",
"given",
"partition",
"by",
"expression",
"in",
"the",
"order",
"by",
"list",
".",
"This",
"is",
"used",
"when",
"trying",
"to",
"rationalize",
"partition",
"by",
"and",
"order",
"by",
"expressions",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/WindowFunctionExpression.java#L212-L219 |
61,319 | VoltDB/voltdb | src/frontend/org/voltdb/planner/MVQueryRewriter.java | MVQueryRewriter.rewriteSelectStmt | private boolean rewriteSelectStmt() {
if (m_mvi != null) {
final Table view = m_mvi.getDest();
final String viewName = view.getTypeName();
// Get the map of select stmt's display column index -> view table (column name, column index)
m_selectStmt.getFinalProjectio... | java | private boolean rewriteSelectStmt() {
if (m_mvi != null) {
final Table view = m_mvi.getDest();
final String viewName = view.getTypeName();
// Get the map of select stmt's display column index -> view table (column name, column index)
m_selectStmt.getFinalProjectio... | [
"private",
"boolean",
"rewriteSelectStmt",
"(",
")",
"{",
"if",
"(",
"m_mvi",
"!=",
"null",
")",
"{",
"final",
"Table",
"view",
"=",
"m_mvi",
".",
"getDest",
"(",
")",
";",
"final",
"String",
"viewName",
"=",
"view",
".",
"getTypeName",
"(",
")",
";",
... | Try to rewrite SELECT stmt if there is a matching materialized view.
@return if SELECT stmt had been rewritten. Updates SELECT stmt transactionally. | [
"Try",
"to",
"rewrite",
"SELECT",
"stmt",
"if",
"there",
"is",
"a",
"matching",
"materialized",
"view",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/MVQueryRewriter.java#L128-L152 |
61,320 | VoltDB/voltdb | src/frontend/org/voltdb/planner/MVQueryRewriter.java | MVQueryRewriter.rewriteTableAlias | private static boolean rewriteTableAlias(StmtSubqueryScan scan) {
final AbstractParsedStmt stmt = scan.getSubqueryStmt();
return stmt instanceof ParsedSelectStmt && (new MVQueryRewriter((ParsedSelectStmt)stmt)).rewrite();
} | java | private static boolean rewriteTableAlias(StmtSubqueryScan scan) {
final AbstractParsedStmt stmt = scan.getSubqueryStmt();
return stmt instanceof ParsedSelectStmt && (new MVQueryRewriter((ParsedSelectStmt)stmt)).rewrite();
} | [
"private",
"static",
"boolean",
"rewriteTableAlias",
"(",
"StmtSubqueryScan",
"scan",
")",
"{",
"final",
"AbstractParsedStmt",
"stmt",
"=",
"scan",
".",
"getSubqueryStmt",
"(",
")",
";",
"return",
"stmt",
"instanceof",
"ParsedSelectStmt",
"&&",
"(",
"new",
"MVQuer... | Checks for any opportunity to rewrite sub-queries
@param scan target subquery
@return whether rewritten was applied | [
"Checks",
"for",
"any",
"opportunity",
"to",
"rewrite",
"sub",
"-",
"queries"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/MVQueryRewriter.java#L159-L162 |
61,321 | VoltDB/voltdb | src/frontend/org/voltdb/planner/MVQueryRewriter.java | MVQueryRewriter.extractTVEIndices | private static List<Integer> extractTVEIndices(AbstractExpression e, List<Integer> accum) {
if (e != null) {
if (e instanceof TupleValueExpression) {
accum.add(((TupleValueExpression) e).getColumnIndex());
} else {
extractTVEIndices(e.getRight(), extractTV... | java | private static List<Integer> extractTVEIndices(AbstractExpression e, List<Integer> accum) {
if (e != null) {
if (e instanceof TupleValueExpression) {
accum.add(((TupleValueExpression) e).getColumnIndex());
} else {
extractTVEIndices(e.getRight(), extractTV... | [
"private",
"static",
"List",
"<",
"Integer",
">",
"extractTVEIndices",
"(",
"AbstractExpression",
"e",
",",
"List",
"<",
"Integer",
">",
"accum",
")",
"{",
"if",
"(",
"e",
"!=",
"null",
")",
"{",
"if",
"(",
"e",
"instanceof",
"TupleValueExpression",
")",
... | Helper method to extract all TVE column indices from an expression.
@param e source expression to check/extract
@param accum accumulator
@return accumulated indices. | [
"Helper",
"method",
"to",
"extract",
"all",
"TVE",
"column",
"indices",
"from",
"an",
"expression",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/MVQueryRewriter.java#L208-L220 |
61,322 | VoltDB/voltdb | src/frontend/org/voltdb/planner/MVQueryRewriter.java | MVQueryRewriter.gbyMatches | private Map<Pair<String, Integer>, Pair<String, Integer>> gbyMatches(MaterializedViewInfo mv) {
final FilterMatcher filter = new FilterMatcher(m_selectStmt.m_joinTree.getJoinExpression(), predicate_of(mv));
// *** Matching criteria/order: ***
// 1. Filters match;
// 2. Group-by-columns'... | java | private Map<Pair<String, Integer>, Pair<String, Integer>> gbyMatches(MaterializedViewInfo mv) {
final FilterMatcher filter = new FilterMatcher(m_selectStmt.m_joinTree.getJoinExpression(), predicate_of(mv));
// *** Matching criteria/order: ***
// 1. Filters match;
// 2. Group-by-columns'... | [
"private",
"Map",
"<",
"Pair",
"<",
"String",
",",
"Integer",
">",
",",
"Pair",
"<",
"String",
",",
"Integer",
">",
">",
"gbyMatches",
"(",
"MaterializedViewInfo",
"mv",
")",
"{",
"final",
"FilterMatcher",
"filter",
"=",
"new",
"FilterMatcher",
"(",
"m_sel... | Apply matching rules of SELECT stmt against a materialized view, and gives back column relationship
between the two.
@pre !m_stmt.groupByColumns().isEmpty() -- guarded by constructor: m_stmt.isGrouped()
@param mv target materialized view
@return the map of (select stmt's display column name, select stmt's display colum... | [
"Apply",
"matching",
"rules",
"of",
"SELECT",
"stmt",
"against",
"a",
"materialized",
"view",
"and",
"gives",
"back",
"column",
"relationship",
"between",
"the",
"two",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/MVQueryRewriter.java#L249-L262 |
61,323 | VoltDB/voltdb | src/frontend/org/voltdb/planner/MVQueryRewriter.java | MVQueryRewriter.getMviAndViews | private static Map<MaterializedViewInfo, Table> getMviAndViews(List<Table> tbls) {
return tbls.stream().flatMap(tbl ->
StreamSupport.stream(((Iterable<MaterializedViewInfo>) () -> tbl.getViews().iterator()).spliterator(), false)
.map(mv -> Pair.of(mv, mv.getDest())))
... | java | private static Map<MaterializedViewInfo, Table> getMviAndViews(List<Table> tbls) {
return tbls.stream().flatMap(tbl ->
StreamSupport.stream(((Iterable<MaterializedViewInfo>) () -> tbl.getViews().iterator()).spliterator(), false)
.map(mv -> Pair.of(mv, mv.getDest())))
... | [
"private",
"static",
"Map",
"<",
"MaterializedViewInfo",
",",
"Table",
">",
"getMviAndViews",
"(",
"List",
"<",
"Table",
">",
"tbls",
")",
"{",
"return",
"tbls",
".",
"stream",
"(",
")",
".",
"flatMap",
"(",
"tbl",
"->",
"StreamSupport",
".",
"stream",
"... | returns all materialized view info => view table from table list | [
"returns",
"all",
"materialized",
"view",
"info",
"=",
">",
"view",
"table",
"from",
"table",
"list"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/MVQueryRewriter.java#L361-L366 |
61,324 | VoltDB/voltdb | src/frontend/org/voltdb/planner/MVQueryRewriter.java | MVQueryRewriter.transformExpressionRidofPVE | private static AbstractExpression transformExpressionRidofPVE(AbstractExpression src) {
AbstractExpression left = src.getLeft(), right = src.getRight();
if (left != null) {
left = transformExpressionRidofPVE(left);
}
if (right != null) {
right = transformExpressio... | java | private static AbstractExpression transformExpressionRidofPVE(AbstractExpression src) {
AbstractExpression left = src.getLeft(), right = src.getRight();
if (left != null) {
left = transformExpressionRidofPVE(left);
}
if (right != null) {
right = transformExpressio... | [
"private",
"static",
"AbstractExpression",
"transformExpressionRidofPVE",
"(",
"AbstractExpression",
"src",
")",
"{",
"AbstractExpression",
"left",
"=",
"src",
".",
"getLeft",
"(",
")",
",",
"right",
"=",
"src",
".",
"getRight",
"(",
")",
";",
"if",
"(",
"left... | For scope of ENG-2878, caching would not cause this trouble because parameter | [
"For",
"scope",
"of",
"ENG",
"-",
"2878",
"caching",
"would",
"not",
"cause",
"this",
"trouble",
"because",
"parameter"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/MVQueryRewriter.java#L370-L388 |
61,325 | VoltDB/voltdb | src/frontend/org/voltdb/planner/MVQueryRewriter.java | MVQueryRewriter.getGbyExpressions | private static List<AbstractExpression> getGbyExpressions(MaterializedViewInfo mv) {
try {
return AbstractExpression.fromJSONArrayString(mv.getGroupbyexpressionsjson(), null);
} catch (JSONException e) {
return new ArrayList<>();
}
} | java | private static List<AbstractExpression> getGbyExpressions(MaterializedViewInfo mv) {
try {
return AbstractExpression.fromJSONArrayString(mv.getGroupbyexpressionsjson(), null);
} catch (JSONException e) {
return new ArrayList<>();
}
} | [
"private",
"static",
"List",
"<",
"AbstractExpression",
">",
"getGbyExpressions",
"(",
"MaterializedViewInfo",
"mv",
")",
"{",
"try",
"{",
"return",
"AbstractExpression",
".",
"fromJSONArrayString",
"(",
"mv",
".",
"getGroupbyexpressionsjson",
"(",
")",
",",
"null",... | Get group-by expression
@param mv
@return | [
"Get",
"group",
"-",
"by",
"expression"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/MVQueryRewriter.java#L404-L410 |
61,326 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/MpScheduler.java | MpScheduler.isNpTxn | private boolean isNpTxn(Iv2InitiateTaskMessage msg)
{
return msg.getStoredProcedureName().startsWith("@") &&
msg.getStoredProcedureName().equalsIgnoreCase("@BalancePartitions") &&
(byte) msg.getParameters()[1] != 1; // clearIndex is MP, normal rebalance is NP
} | java | private boolean isNpTxn(Iv2InitiateTaskMessage msg)
{
return msg.getStoredProcedureName().startsWith("@") &&
msg.getStoredProcedureName().equalsIgnoreCase("@BalancePartitions") &&
(byte) msg.getParameters()[1] != 1; // clearIndex is MP, normal rebalance is NP
} | [
"private",
"boolean",
"isNpTxn",
"(",
"Iv2InitiateTaskMessage",
"msg",
")",
"{",
"return",
"msg",
".",
"getStoredProcedureName",
"(",
")",
".",
"startsWith",
"(",
"\"@\"",
")",
"&&",
"msg",
".",
"getStoredProcedureName",
"(",
")",
".",
"equalsIgnoreCase",
"(",
... | Hacky way to only run @BalancePartitions as n-partition transactions for now.
@return true if it's an n-partition transaction | [
"Hacky",
"way",
"to",
"only",
"run"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpScheduler.java#L398-L403 |
61,327 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/MpScheduler.java | MpScheduler.getBalancePartitions | private Set<Integer> getBalancePartitions(Iv2InitiateTaskMessage msg)
{
try {
JSONObject jsObj = new JSONObject((String) msg.getParameters()[0]);
BalancePartitionsRequest request = new BalancePartitionsRequest(jsObj);
return Sets.newHashSet(request.partitionPairs.get(0).... | java | private Set<Integer> getBalancePartitions(Iv2InitiateTaskMessage msg)
{
try {
JSONObject jsObj = new JSONObject((String) msg.getParameters()[0]);
BalancePartitionsRequest request = new BalancePartitionsRequest(jsObj);
return Sets.newHashSet(request.partitionPairs.get(0).... | [
"private",
"Set",
"<",
"Integer",
">",
"getBalancePartitions",
"(",
"Iv2InitiateTaskMessage",
"msg",
")",
"{",
"try",
"{",
"JSONObject",
"jsObj",
"=",
"new",
"JSONObject",
"(",
"(",
"String",
")",
"msg",
".",
"getParameters",
"(",
")",
"[",
"0",
"]",
")",
... | Extract the two involved partitions from the @BalancePartitions request. | [
"Extract",
"the",
"two",
"involved",
"partitions",
"from",
"the"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpScheduler.java#L408-L420 |
61,328 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/MpScheduler.java | MpScheduler.handleInitiateResponseMessage | public void handleInitiateResponseMessage(InitiateResponseMessage message)
{
final VoltTrace.TraceEventBatch traceLog = VoltTrace.log(VoltTrace.Category.MPI);
if (traceLog != null) {
traceLog.add(() -> VoltTrace.endAsync("initmp", message.getTxnId()));
}
DuplicateCounter... | java | public void handleInitiateResponseMessage(InitiateResponseMessage message)
{
final VoltTrace.TraceEventBatch traceLog = VoltTrace.log(VoltTrace.Category.MPI);
if (traceLog != null) {
traceLog.add(() -> VoltTrace.endAsync("initmp", message.getTxnId()));
}
DuplicateCounter... | [
"public",
"void",
"handleInitiateResponseMessage",
"(",
"InitiateResponseMessage",
"message",
")",
"{",
"final",
"VoltTrace",
".",
"TraceEventBatch",
"traceLog",
"=",
"VoltTrace",
".",
"log",
"(",
"VoltTrace",
".",
"Category",
".",
"MPI",
")",
";",
"if",
"(",
"t... | see all of these messages and control their transmission. | [
"see",
"all",
"of",
"these",
"messages",
"and",
"control",
"their",
"transmission",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpScheduler.java#L490-L560 |
61,329 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/MpScheduler.java | MpScheduler.handleEOLMessage | public void handleEOLMessage()
{
Iv2EndOfLogMessage msg = new Iv2EndOfLogMessage(m_partitionId);
MPIEndOfLogTransactionState txnState = new MPIEndOfLogTransactionState(msg);
MPIEndOfLogTask task = new MPIEndOfLogTask(m_mailbox, m_pendingTasks,
... | java | public void handleEOLMessage()
{
Iv2EndOfLogMessage msg = new Iv2EndOfLogMessage(m_partitionId);
MPIEndOfLogTransactionState txnState = new MPIEndOfLogTransactionState(msg);
MPIEndOfLogTask task = new MPIEndOfLogTask(m_mailbox, m_pendingTasks,
... | [
"public",
"void",
"handleEOLMessage",
"(",
")",
"{",
"Iv2EndOfLogMessage",
"msg",
"=",
"new",
"Iv2EndOfLogMessage",
"(",
"m_partitionId",
")",
";",
"MPIEndOfLogTransactionState",
"txnState",
"=",
"new",
"MPIEndOfLogTransactionState",
"(",
"msg",
")",
";",
"MPIEndOfLog... | Inject a task into the transaction task queue to flush it. When it
executes, it will send out MPI end of log messages to all partition
initiators. | [
"Inject",
"a",
"task",
"into",
"the",
"transaction",
"task",
"queue",
"to",
"flush",
"it",
".",
"When",
"it",
"executes",
"it",
"will",
"send",
"out",
"MPI",
"end",
"of",
"log",
"messages",
"to",
"all",
"partition",
"initiators",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpScheduler.java#L604-L611 |
61,330 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/MpScheduler.java | MpScheduler.loadNpProcedureTaskClass | private static ProClass<MpProcedureTask> loadNpProcedureTaskClass()
{
return ProClass
.<MpProcedureTask>load("org.voltdb.iv2.NpProcedureTask", "N-Partition",
MiscUtils.isPro() ? ProClass.HANDLER_LOG : ProClass.HANDLER_IGNORE)
.errorHandler(tmLog::error... | java | private static ProClass<MpProcedureTask> loadNpProcedureTaskClass()
{
return ProClass
.<MpProcedureTask>load("org.voltdb.iv2.NpProcedureTask", "N-Partition",
MiscUtils.isPro() ? ProClass.HANDLER_LOG : ProClass.HANDLER_IGNORE)
.errorHandler(tmLog::error... | [
"private",
"static",
"ProClass",
"<",
"MpProcedureTask",
">",
"loadNpProcedureTaskClass",
"(",
")",
"{",
"return",
"ProClass",
".",
"<",
"MpProcedureTask",
">",
"load",
"(",
"\"org.voltdb.iv2.NpProcedureTask\"",
",",
"\"N-Partition\"",
",",
"MiscUtils",
".",
"isPro",
... | Load the pro class for n-partition transactions.
@return null if running in community or failed to load the class | [
"Load",
"the",
"pro",
"class",
"for",
"n",
"-",
"partition",
"transactions",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpScheduler.java#L627-L635 |
61,331 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/MpScheduler.java | MpScheduler.safeAddToDuplicateCounterMap | void safeAddToDuplicateCounterMap(long dpKey, DuplicateCounter counter) {
DuplicateCounter existingDC = m_duplicateCounters.get(dpKey);
if (existingDC != null) {
// this is a collision and is bad
existingDC.logWithCollidingDuplicateCounters(counter);
VoltDB.crashGloba... | java | void safeAddToDuplicateCounterMap(long dpKey, DuplicateCounter counter) {
DuplicateCounter existingDC = m_duplicateCounters.get(dpKey);
if (existingDC != null) {
// this is a collision and is bad
existingDC.logWithCollidingDuplicateCounters(counter);
VoltDB.crashGloba... | [
"void",
"safeAddToDuplicateCounterMap",
"(",
"long",
"dpKey",
",",
"DuplicateCounter",
"counter",
")",
"{",
"DuplicateCounter",
"existingDC",
"=",
"m_duplicateCounters",
".",
"get",
"(",
"dpKey",
")",
";",
"if",
"(",
"existingDC",
"!=",
"null",
")",
"{",
"// thi... | Just using "put" on the dup counter map is unsafe.
It won't detect the case where keys collide from two different transactions. | [
"Just",
"using",
"put",
"on",
"the",
"dup",
"counter",
"map",
"is",
"unsafe",
".",
"It",
"won",
"t",
"detect",
"the",
"case",
"where",
"keys",
"collide",
"from",
"two",
"different",
"transactions",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpScheduler.java#L641-L651 |
61,332 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/dbinfo/DatabaseInformationFull.java | DatabaseInformationFull.ADMINISTRABLE_ROLE_AUTHORIZATIONS | Table ADMINISTRABLE_ROLE_AUTHORIZATIONS() {
Table t = sysTables[ADMINISTRABLE_ROLE_AUTHORIZATIONS];
if (t == null) {
t = createBlankTable(
sysTableHsqlNames[ADMINISTRABLE_ROLE_AUTHORIZATIONS]);
addColumn(t, "GRANTEE", SQL_IDENTIFIER);
addColumn(t, "... | java | Table ADMINISTRABLE_ROLE_AUTHORIZATIONS() {
Table t = sysTables[ADMINISTRABLE_ROLE_AUTHORIZATIONS];
if (t == null) {
t = createBlankTable(
sysTableHsqlNames[ADMINISTRABLE_ROLE_AUTHORIZATIONS]);
addColumn(t, "GRANTEE", SQL_IDENTIFIER);
addColumn(t, "... | [
"Table",
"ADMINISTRABLE_ROLE_AUTHORIZATIONS",
"(",
")",
"{",
"Table",
"t",
"=",
"sysTables",
"[",
"ADMINISTRABLE_ROLE_AUTHORIZATIONS",
"]",
";",
"if",
"(",
"t",
"==",
"null",
")",
"{",
"t",
"=",
"createBlankTable",
"(",
"sysTableHsqlNames",
"[",
"ADMINISTRABLE_ROL... | Returns roles that are grantable by an admin user, which means all the
roles
@return Table | [
"Returns",
"roles",
"that",
"are",
"grantable",
"by",
"an",
"admin",
"user",
"which",
"means",
"all",
"the",
"roles"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/dbinfo/DatabaseInformationFull.java#L1176-L1204 |
61,333 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/dbinfo/DatabaseInformationFull.java | DatabaseInformationFull.ROUTINE_ROUTINE_USAGE | Table ROUTINE_ROUTINE_USAGE() {
Table t = sysTables[ROUTINE_ROUTINE_USAGE];
if (t == null) {
t = createBlankTable(sysTableHsqlNames[ROUTINE_ROUTINE_USAGE]);
addColumn(t, "SPECIFIC_CATALOG", SQL_IDENTIFIER);
addColumn(t, "SPECIFIC_SCHEMA", SQL_IDENTIFIER);
... | java | Table ROUTINE_ROUTINE_USAGE() {
Table t = sysTables[ROUTINE_ROUTINE_USAGE];
if (t == null) {
t = createBlankTable(sysTableHsqlNames[ROUTINE_ROUTINE_USAGE]);
addColumn(t, "SPECIFIC_CATALOG", SQL_IDENTIFIER);
addColumn(t, "SPECIFIC_SCHEMA", SQL_IDENTIFIER);
... | [
"Table",
"ROUTINE_ROUTINE_USAGE",
"(",
")",
"{",
"Table",
"t",
"=",
"sysTables",
"[",
"ROUTINE_ROUTINE_USAGE",
"]",
";",
"if",
"(",
"t",
"==",
"null",
")",
"{",
"t",
"=",
"createBlankTable",
"(",
"sysTableHsqlNames",
"[",
"ROUTINE_ROUTINE_USAGE",
"]",
")",
"... | needs to provide list of specific referenced routines | [
"needs",
"to",
"provide",
"list",
"of",
"specific",
"referenced",
"routines"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/dbinfo/DatabaseInformationFull.java#L4034-L4115 |
61,334 | VoltDB/voltdb | src/frontend/org/voltdb/export/ExportDataSource.java | ExportDataSource.closeAndDelete | public ListenableFuture<?> closeAndDelete() {
// We're going away, so shut ourselves from the external world
m_closed = true;
m_ackMailboxRefs.set(null);
// Export mastership should have been released: force it.
m_mastershipAccepted.set(false);
// FIXME: necessary? Old... | java | public ListenableFuture<?> closeAndDelete() {
// We're going away, so shut ourselves from the external world
m_closed = true;
m_ackMailboxRefs.set(null);
// Export mastership should have been released: force it.
m_mastershipAccepted.set(false);
// FIXME: necessary? Old... | [
"public",
"ListenableFuture",
"<",
"?",
">",
"closeAndDelete",
"(",
")",
"{",
"// We're going away, so shut ourselves from the external world",
"m_closed",
"=",
"true",
";",
"m_ackMailboxRefs",
".",
"set",
"(",
"null",
")",
";",
"// Export mastership should have been releas... | This is called on updateCatalog when an exporting stream is dropped.
Note: The {@code ExportDataProcessor} must have been shut down prior
to calling this method.
@return | [
"This",
"is",
"called",
"on",
"updateCatalog",
"when",
"an",
"exporting",
"stream",
"is",
"dropped",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportDataSource.java#L902-L943 |
61,335 | VoltDB/voltdb | src/frontend/org/voltdb/export/ExportDataSource.java | ExportDataSource.setPendingContainer | public void setPendingContainer(AckingContainer container) {
Preconditions.checkNotNull(m_pendingContainer.get() != null, "Pending container must be null.");
if (m_closed) {
// A very slow export decoder must have noticed the export processor shutting down
exportLog.info("Discard... | java | public void setPendingContainer(AckingContainer container) {
Preconditions.checkNotNull(m_pendingContainer.get() != null, "Pending container must be null.");
if (m_closed) {
// A very slow export decoder must have noticed the export processor shutting down
exportLog.info("Discard... | [
"public",
"void",
"setPendingContainer",
"(",
"AckingContainer",
"container",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"m_pendingContainer",
".",
"get",
"(",
")",
"!=",
"null",
",",
"\"Pending container must be null.\"",
")",
";",
"if",
"(",
"m_closed",
... | Needs to be thread-safe, EDS executor, export decoder and site thread both touch m_pendingContainer. | [
"Needs",
"to",
"be",
"thread",
"-",
"safe",
"EDS",
"executor",
"export",
"decoder",
"and",
"site",
"thread",
"both",
"touch",
"m_pendingContainer",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportDataSource.java#L963-L972 |
61,336 | VoltDB/voltdb | src/frontend/org/voltdb/export/ExportDataSource.java | ExportDataSource.remoteAck | public void remoteAck(final long seq) {
//In replicated only master will be doing this.
m_es.execute(new Runnable() {
@Override
public void run() {
try {
// ENG-12282: A race condition between export data source
// master p... | java | public void remoteAck(final long seq) {
//In replicated only master will be doing this.
m_es.execute(new Runnable() {
@Override
public void run() {
try {
// ENG-12282: A race condition between export data source
// master p... | [
"public",
"void",
"remoteAck",
"(",
"final",
"long",
"seq",
")",
"{",
"//In replicated only master will be doing this.",
"m_es",
".",
"execute",
"(",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"try",
"{",
"// E... | Entry point for receiving acknowledgments from remote entities.
@param seq acknowledged sequence number, ALWAYS last row of a transaction, or 0. | [
"Entry",
"point",
"for",
"receiving",
"acknowledgments",
"from",
"remote",
"entities",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportDataSource.java#L1407-L1439 |
61,337 | VoltDB/voltdb | src/frontend/org/voltdb/export/ExportDataSource.java | ExportDataSource.handleDrainedSource | private void handleDrainedSource() throws IOException {
if (!inCatalog() && m_committedBuffers.isEmpty()) {
//Returning null indicates end of stream
try {
if (m_pollTask != null) {
m_pollTask.setFuture(null);
}
} catc... | java | private void handleDrainedSource() throws IOException {
if (!inCatalog() && m_committedBuffers.isEmpty()) {
//Returning null indicates end of stream
try {
if (m_pollTask != null) {
m_pollTask.setFuture(null);
}
} catc... | [
"private",
"void",
"handleDrainedSource",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"inCatalog",
"(",
")",
"&&",
"m_committedBuffers",
".",
"isEmpty",
"(",
")",
")",
"{",
"//Returning null indicates end of stream",
"try",
"{",
"if",
"(",
"m_pollTas... | Notify the generation when source is drained on an unused partition.
@throws IOException | [
"Notify",
"the",
"generation",
"when",
"source",
"is",
"drained",
"on",
"an",
"unused",
"partition",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportDataSource.java#L1460-L1474 |
61,338 | VoltDB/voltdb | src/frontend/org/voltdb/export/ExportDataSource.java | ExportDataSource.acceptMastership | public synchronized void acceptMastership() {
if (m_onMastership == null) {
if (exportLog.isDebugEnabled()) {
exportLog.debug("Mastership Runnable not yet set for table " + getTableName() + " partition " + getPartitionId());
}
return;
}
if (m_m... | java | public synchronized void acceptMastership() {
if (m_onMastership == null) {
if (exportLog.isDebugEnabled()) {
exportLog.debug("Mastership Runnable not yet set for table " + getTableName() + " partition " + getPartitionId());
}
return;
}
if (m_m... | [
"public",
"synchronized",
"void",
"acceptMastership",
"(",
")",
"{",
"if",
"(",
"m_onMastership",
"==",
"null",
")",
"{",
"if",
"(",
"exportLog",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"exportLog",
".",
"debug",
"(",
"\"Mastership Runnable not yet set for ta... | Trigger an execution of the mastership runnable by the associated
executor service | [
"Trigger",
"an",
"execution",
"of",
"the",
"mastership",
"runnable",
"by",
"the",
"associated",
"executor",
"service"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportDataSource.java#L1622-L1654 |
61,339 | VoltDB/voltdb | src/frontend/org/voltdb/export/ExportDataSource.java | ExportDataSource.setOnMastership | public void setOnMastership(Runnable toBeRunOnMastership) {
Preconditions.checkNotNull(toBeRunOnMastership, "mastership runnable is null");
m_onMastership = toBeRunOnMastership;
// If connector "replicated" property is set to true then every
// replicated export stream is its own master
... | java | public void setOnMastership(Runnable toBeRunOnMastership) {
Preconditions.checkNotNull(toBeRunOnMastership, "mastership runnable is null");
m_onMastership = toBeRunOnMastership;
// If connector "replicated" property is set to true then every
// replicated export stream is its own master
... | [
"public",
"void",
"setOnMastership",
"(",
"Runnable",
"toBeRunOnMastership",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"toBeRunOnMastership",
",",
"\"mastership runnable is null\"",
")",
";",
"m_onMastership",
"=",
"toBeRunOnMastership",
";",
"// If connector \"r... | set the runnable task that is to be executed on mastership designation
@param toBeRunOnMastership a {@link @Runnable} task
@param runEveryWhere Set if connector "replicated" property is set to true Like replicated table, every
replicated export stream is its own master. | [
"set",
"the",
"runnable",
"task",
"that",
"is",
"to",
"be",
"executed",
"on",
"mastership",
"designation"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportDataSource.java#L1663-L1673 |
61,340 | VoltDB/voltdb | src/frontend/org/voltdb/export/ExportDataSource.java | ExportDataSource.handleQueryMessage | public void handleQueryMessage(final long senderHSId, long requestId, long gapStart) {
m_es.execute(new Runnable() {
@Override
public void run() {
long lastSeq = Long.MIN_VALUE;
Pair<Long, Long> range = m_gapTracker.getRangeContaining(g... | java | public void handleQueryMessage(final long senderHSId, long requestId, long gapStart) {
m_es.execute(new Runnable() {
@Override
public void run() {
long lastSeq = Long.MIN_VALUE;
Pair<Long, Long> range = m_gapTracker.getRangeContaining(g... | [
"public",
"void",
"handleQueryMessage",
"(",
"final",
"long",
"senderHSId",
",",
"long",
"requestId",
",",
"long",
"gapStart",
")",
"{",
"m_es",
".",
"execute",
"(",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{... | Query whether a master exists for the given partition, if not try to promote the local data source. | [
"Query",
"whether",
"a",
"master",
"exists",
"for",
"the",
"given",
"partition",
"if",
"not",
"try",
"to",
"promote",
"the",
"local",
"data",
"source",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportDataSource.java#L1781-L1793 |
61,341 | VoltDB/voltdb | src/frontend/org/voltdb/export/ExportDataSource.java | ExportDataSource.resetStateInRejoinOrRecover | private void resetStateInRejoinOrRecover(long initialSequenceNumber, boolean isRejoin) {
if (isRejoin) {
if (!m_gapTracker.isEmpty()) {
m_lastReleasedSeqNo = Math.max(m_lastReleasedSeqNo, m_gapTracker.getFirstSeqNo() - 1);
}
} else {
m_lastReleasedSeqN... | java | private void resetStateInRejoinOrRecover(long initialSequenceNumber, boolean isRejoin) {
if (isRejoin) {
if (!m_gapTracker.isEmpty()) {
m_lastReleasedSeqNo = Math.max(m_lastReleasedSeqNo, m_gapTracker.getFirstSeqNo() - 1);
}
} else {
m_lastReleasedSeqN... | [
"private",
"void",
"resetStateInRejoinOrRecover",
"(",
"long",
"initialSequenceNumber",
",",
"boolean",
"isRejoin",
")",
"{",
"if",
"(",
"isRejoin",
")",
"{",
"if",
"(",
"!",
"m_gapTracker",
".",
"isEmpty",
"(",
")",
")",
"{",
"m_lastReleasedSeqNo",
"=",
"Math... | current master to tell us where to poll next buffer. | [
"current",
"master",
"to",
"tell",
"us",
"where",
"to",
"poll",
"next",
"buffer",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportDataSource.java#L1980-L1992 |
61,342 | VoltDB/voltdb | src/frontend/org/voltcore/TransactionIdManager.java | TransactionIdManager.getDateFromTransactionId | public static Date getDateFromTransactionId(long txnId) {
long time = txnId >> (COUNTER_BITS + INITIATORID_BITS);
time += VOLT_EPOCH;
return new Date(time);
} | java | public static Date getDateFromTransactionId(long txnId) {
long time = txnId >> (COUNTER_BITS + INITIATORID_BITS);
time += VOLT_EPOCH;
return new Date(time);
} | [
"public",
"static",
"Date",
"getDateFromTransactionId",
"(",
"long",
"txnId",
")",
"{",
"long",
"time",
"=",
"txnId",
">>",
"(",
"COUNTER_BITS",
"+",
"INITIATORID_BITS",
")",
";",
"time",
"+=",
"VOLT_EPOCH",
";",
"return",
"new",
"Date",
"(",
"time",
")",
... | Given a transaction id, return the time of its creation
by examining the embedded timestamp.
@param txnId The transaction id value to examine.
@return The Date object representing the time this transaction
id was created. | [
"Given",
"a",
"transaction",
"id",
"return",
"the",
"time",
"of",
"its",
"creation",
"by",
"examining",
"the",
"embedded",
"timestamp",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/TransactionIdManager.java#L233-L237 |
61,343 | VoltDB/voltdb | src/frontend/org/voltdb/RealVoltDB.java | RealVoltDB.recoverPartitions | private AbstractTopology recoverPartitions(AbstractTopology topology, String haGroup, Set<Integer> recoverPartitions) {
long version = topology.version;
if (!recoverPartitions.isEmpty()) {
// In rejoin case, partition list from the rejoining node could be out of range if the rejoining
... | java | private AbstractTopology recoverPartitions(AbstractTopology topology, String haGroup, Set<Integer> recoverPartitions) {
long version = topology.version;
if (!recoverPartitions.isEmpty()) {
// In rejoin case, partition list from the rejoining node could be out of range if the rejoining
... | [
"private",
"AbstractTopology",
"recoverPartitions",
"(",
"AbstractTopology",
"topology",
",",
"String",
"haGroup",
",",
"Set",
"<",
"Integer",
">",
"recoverPartitions",
")",
"{",
"long",
"version",
"=",
"topology",
".",
"version",
";",
"if",
"(",
"!",
"recoverPa... | recover the partition assignment from one of lost hosts in the same placement group for rejoin
Use the placement group of the recovering host to find a matched host from the lost nodes in the topology
If the partition count from the lost node is the same as the site count of the recovering host,
The partitions on the l... | [
"recover",
"the",
"partition",
"assignment",
"from",
"one",
"of",
"lost",
"hosts",
"in",
"the",
"same",
"placement",
"group",
"for",
"rejoin",
"Use",
"the",
"placement",
"group",
"of",
"the",
"recovering",
"host",
"to",
"find",
"a",
"matched",
"host",
"from"... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L1704-L1730 |
61,344 | VoltDB/voltdb | src/frontend/org/voltdb/RealVoltDB.java | RealVoltDB.stopRejoiningHost | private boolean stopRejoiningHost() {
// The host failure notification could come before mesh determination, wait for the determination
try {
m_meshDeterminationLatch.await();
} catch (InterruptedException e) {
}
if (m_rejoining) {
VoltDB.crashLocalVoltD... | java | private boolean stopRejoiningHost() {
// The host failure notification could come before mesh determination, wait for the determination
try {
m_meshDeterminationLatch.await();
} catch (InterruptedException e) {
}
if (m_rejoining) {
VoltDB.crashLocalVoltD... | [
"private",
"boolean",
"stopRejoiningHost",
"(",
")",
"{",
"// The host failure notification could come before mesh determination, wait for the determination",
"try",
"{",
"m_meshDeterminationLatch",
".",
"await",
"(",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"e",
... | If the current node hasn't finished rejoin when another node fails, fail this node to prevent locking up. | [
"If",
"the",
"current",
"node",
"hasn",
"t",
"finished",
"rejoin",
"when",
"another",
"node",
"fails",
"fail",
"this",
"node",
"to",
"prevent",
"locking",
"up",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L1811-L1825 |
61,345 | VoltDB/voltdb | src/frontend/org/voltdb/RealVoltDB.java | RealVoltDB.checkExportStreamMastership | private void checkExportStreamMastership() {
for (Initiator initiator : m_iv2Initiators.values()) {
if (initiator.getPartitionId() != MpInitiator.MP_INIT_PID) {
SpInitiator spInitiator = (SpInitiator)initiator;
if (spInitiator.isLeader()) {
ExportM... | java | private void checkExportStreamMastership() {
for (Initiator initiator : m_iv2Initiators.values()) {
if (initiator.getPartitionId() != MpInitiator.MP_INIT_PID) {
SpInitiator spInitiator = (SpInitiator)initiator;
if (spInitiator.isLeader()) {
ExportM... | [
"private",
"void",
"checkExportStreamMastership",
"(",
")",
"{",
"for",
"(",
"Initiator",
"initiator",
":",
"m_iv2Initiators",
".",
"values",
"(",
")",
")",
"{",
"if",
"(",
"initiator",
".",
"getPartitionId",
"(",
")",
"!=",
"MpInitiator",
".",
"MP_INIT_PID",
... | move back to partition leader's node. | [
"move",
"back",
"to",
"partition",
"leader",
"s",
"node",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L1872-L1881 |
61,346 | VoltDB/voltdb | src/frontend/org/voltdb/RealVoltDB.java | RealVoltDB.scheduleDailyLoggingWorkInNextCheckTime | void scheduleDailyLoggingWorkInNextCheckTime() {
DailyRollingFileAppender dailyAppender = null;
Enumeration<?> appenders = Logger.getRootLogger().getAllAppenders();
while (appenders.hasMoreElements()) {
Appender appender = (Appender) appenders.nextElement();
if (appender ... | java | void scheduleDailyLoggingWorkInNextCheckTime() {
DailyRollingFileAppender dailyAppender = null;
Enumeration<?> appenders = Logger.getRootLogger().getAllAppenders();
while (appenders.hasMoreElements()) {
Appender appender = (Appender) appenders.nextElement();
if (appender ... | [
"void",
"scheduleDailyLoggingWorkInNextCheckTime",
"(",
")",
"{",
"DailyRollingFileAppender",
"dailyAppender",
"=",
"null",
";",
"Enumeration",
"<",
"?",
">",
"appenders",
"=",
"Logger",
".",
"getRootLogger",
"(",
")",
".",
"getAllAppenders",
"(",
")",
";",
"while... | Get the next check time for a private member in log4j library, which is not a reliable idea.
It adds 30 seconds for the initial delay and uses a periodical thread to schedule the daily logging work
with this delay.
@return | [
"Get",
"the",
"next",
"check",
"time",
"for",
"a",
"private",
"member",
"in",
"log4j",
"library",
"which",
"is",
"not",
"a",
"reliable",
"idea",
".",
"It",
"adds",
"30",
"seconds",
"for",
"the",
"initial",
"delay",
"and",
"uses",
"a",
"periodical",
"thre... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L1923-L1955 |
61,347 | VoltDB/voltdb | src/frontend/org/voltdb/RealVoltDB.java | RealVoltDB.schedulePeriodicWorks | private void schedulePeriodicWorks() {
// JMX stats broadcast
m_periodicWorks.add(scheduleWork(new Runnable() {
@Override
public void run() {
// A null here was causing a steady stream of annoying but apparently inconsequential
// NPEs during a deb... | java | private void schedulePeriodicWorks() {
// JMX stats broadcast
m_periodicWorks.add(scheduleWork(new Runnable() {
@Override
public void run() {
// A null here was causing a steady stream of annoying but apparently inconsequential
// NPEs during a deb... | [
"private",
"void",
"schedulePeriodicWorks",
"(",
")",
"{",
"// JMX stats broadcast",
"m_periodicWorks",
".",
"add",
"(",
"scheduleWork",
"(",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"// A null here was causing a s... | Schedule all the periodic works | [
"Schedule",
"all",
"the",
"periodic",
"works"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L2246-L2314 |
61,348 | VoltDB/voltdb | src/frontend/org/voltdb/RealVoltDB.java | RealVoltDB.determineIfEligibleAsLeader | private boolean determineIfEligibleAsLeader(Collection<Integer> partitions, Set<Integer> partitionGroupPeers,
AbstractTopology topology) {
if (partitions.contains(Integer.valueOf(0))) {
return true;
}
for (Integer host : topology.getHostIdList(0)) {
if (partit... | java | private boolean determineIfEligibleAsLeader(Collection<Integer> partitions, Set<Integer> partitionGroupPeers,
AbstractTopology topology) {
if (partitions.contains(Integer.valueOf(0))) {
return true;
}
for (Integer host : topology.getHostIdList(0)) {
if (partit... | [
"private",
"boolean",
"determineIfEligibleAsLeader",
"(",
"Collection",
"<",
"Integer",
">",
"partitions",
",",
"Set",
"<",
"Integer",
">",
"partitionGroupPeers",
",",
"AbstractTopology",
"topology",
")",
"{",
"if",
"(",
"partitions",
".",
"contains",
"(",
"Intege... | This host can be a leader if partition 0 is on it or it is in the same partition group as a node which has
partition 0. This is because the partition group with partition 0 can never be removed by elastic remove.
@param partitions {@link List} of partitions on this host
@param partitionGroupPeers {@link List}... | [
"This",
"host",
"can",
"be",
"a",
"leader",
"if",
"partition",
"0",
"is",
"on",
"it",
"or",
"it",
"is",
"in",
"the",
"same",
"partition",
"group",
"as",
"a",
"node",
"which",
"has",
"partition",
"0",
".",
"This",
"is",
"because",
"the",
"partition",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L2325-L2336 |
61,349 | VoltDB/voltdb | src/frontend/org/voltdb/RealVoltDB.java | RealVoltDB.run | @Override
public void run() {
if (m_restoreAgent != null) {
// start restore process
m_restoreAgent.restore();
}
else {
onSnapshotRestoreCompletion();
onReplayCompletion(Long.MIN_VALUE, m_iv2InitiatorStartingTxnIds);
}
// Start... | java | @Override
public void run() {
if (m_restoreAgent != null) {
// start restore process
m_restoreAgent.restore();
}
else {
onSnapshotRestoreCompletion();
onReplayCompletion(Long.MIN_VALUE, m_iv2InitiatorStartingTxnIds);
}
// Start... | [
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"if",
"(",
"m_restoreAgent",
"!=",
"null",
")",
"{",
"// start restore process",
"m_restoreAgent",
".",
"restore",
"(",
")",
";",
"}",
"else",
"{",
"onSnapshotRestoreCompletion",
"(",
")",
";",
"onRepl... | Start all the site's event loops. That's it. | [
"Start",
"all",
"the",
"site",
"s",
"event",
"loops",
".",
"That",
"s",
"it",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L3528-L3552 |
61,350 | VoltDB/voltdb | src/frontend/org/voltdb/RealVoltDB.java | RealVoltDB.cleanUpTempCatalogJar | @Override
public void cleanUpTempCatalogJar() {
File configInfoDir = getConfigDirectory();
if (!configInfoDir.exists()) {
return;
}
File tempJar = new VoltFile(configInfoDir.getPath(),
InMemoryJarfile.TMP_CATALOG_JAR_FILENAME);
... | java | @Override
public void cleanUpTempCatalogJar() {
File configInfoDir = getConfigDirectory();
if (!configInfoDir.exists()) {
return;
}
File tempJar = new VoltFile(configInfoDir.getPath(),
InMemoryJarfile.TMP_CATALOG_JAR_FILENAME);
... | [
"@",
"Override",
"public",
"void",
"cleanUpTempCatalogJar",
"(",
")",
"{",
"File",
"configInfoDir",
"=",
"getConfigDirectory",
"(",
")",
";",
"if",
"(",
"!",
"configInfoDir",
".",
"exists",
"(",
")",
")",
"{",
"return",
";",
"}",
"File",
"tempJar",
"=",
... | Clean up the temporary jar file | [
"Clean",
"up",
"the",
"temporary",
"jar",
"file"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L3835-L3847 |
61,351 | VoltDB/voltdb | src/frontend/org/voltdb/RealVoltDB.java | RealVoltDB.shutdownInitiators | private void shutdownInitiators() {
if (m_iv2Initiators == null) {
return;
}
m_iv2Initiators.descendingMap().values().stream().forEach(p->p.shutdown());
} | java | private void shutdownInitiators() {
if (m_iv2Initiators == null) {
return;
}
m_iv2Initiators.descendingMap().values().stream().forEach(p->p.shutdown());
} | [
"private",
"void",
"shutdownInitiators",
"(",
")",
"{",
"if",
"(",
"m_iv2Initiators",
"==",
"null",
")",
"{",
"return",
";",
"}",
"m_iv2Initiators",
".",
"descendingMap",
"(",
")",
".",
"values",
"(",
")",
".",
"stream",
"(",
")",
".",
"forEach",
"(",
... | to be done on SP sites, kill SP sites first may risk MP site to wait forever. | [
"to",
"be",
"done",
"on",
"SP",
"sites",
"kill",
"SP",
"sites",
"first",
"may",
"risk",
"MP",
"site",
"to",
"wait",
"forever",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L4210-L4215 |
61,352 | VoltDB/voltdb | src/frontend/org/voltdb/RealVoltDB.java | RealVoltDB.createRuntimeReport | public void createRuntimeReport(PrintStream out) {
// This function may be running in its own thread.
out.print("MIME-Version: 1.0\n");
out.print("Content-type: multipart/mixed; boundary=\"reportsection\"");
out.print("\n\n--reportsection\nContent-Type: text/plain\n\nClientInterface Re... | java | public void createRuntimeReport(PrintStream out) {
// This function may be running in its own thread.
out.print("MIME-Version: 1.0\n");
out.print("Content-type: multipart/mixed; boundary=\"reportsection\"");
out.print("\n\n--reportsection\nContent-Type: text/plain\n\nClientInterface Re... | [
"public",
"void",
"createRuntimeReport",
"(",
"PrintStream",
"out",
")",
"{",
"// This function may be running in its own thread.",
"out",
".",
"print",
"(",
"\"MIME-Version: 1.0\\n\"",
")",
";",
"out",
".",
"print",
"(",
"\"Content-type: multipart/mixed; boundary=\\\"reports... | Debugging function - creates a record of the current state of the system.
@param out PrintStream to write report to. | [
"Debugging",
"function",
"-",
"creates",
"a",
"record",
"of",
"the",
"current",
"state",
"of",
"the",
"system",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L4221-L4231 |
61,353 | VoltDB/voltdb | src/frontend/org/voltdb/RealVoltDB.java | RealVoltDB.initializeDRProducer | private void initializeDRProducer() {
try {
if (m_producerDRGateway != null) {
m_producerDRGateway.startAndWaitForGlobalAgreement();
for (Initiator iv2init : m_iv2Initiators.values()) {
iv2init.initDRGateway(m_config.m_startAction,
... | java | private void initializeDRProducer() {
try {
if (m_producerDRGateway != null) {
m_producerDRGateway.startAndWaitForGlobalAgreement();
for (Initiator iv2init : m_iv2Initiators.values()) {
iv2init.initDRGateway(m_config.m_startAction,
... | [
"private",
"void",
"initializeDRProducer",
"(",
")",
"{",
"try",
"{",
"if",
"(",
"m_producerDRGateway",
"!=",
"null",
")",
"{",
"m_producerDRGateway",
".",
"startAndWaitForGlobalAgreement",
"(",
")",
";",
"for",
"(",
"Initiator",
"iv2init",
":",
"m_iv2Initiators",... | Initialize the DR producer so that any binary log generated on recover
will be queued. This does NOT open the DR port. That will happen after
command log replay finishes. | [
"Initialize",
"the",
"DR",
"producer",
"so",
"that",
"any",
"binary",
"log",
"generated",
"on",
"recover",
"will",
"be",
"queued",
".",
"This",
"does",
"NOT",
"open",
"the",
"DR",
"port",
".",
"That",
"will",
"happen",
"after",
"command",
"log",
"replay",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L4659-L4676 |
61,354 | VoltDB/voltdb | src/frontend/org/voltdb/RealVoltDB.java | RealVoltDB.computeMinimumHeapRqt | static public long computeMinimumHeapRqt(int tableCount, int sitesPerHost, int kfactor)
{
long baseRqt = 384;
long tableRqt = 10 * tableCount;
// K-safety Heap consumption drop to 8 MB (per node)
// Snapshot cost 32 MB (per node)
// Theoretically, 40 MB (per node) should be e... | java | static public long computeMinimumHeapRqt(int tableCount, int sitesPerHost, int kfactor)
{
long baseRqt = 384;
long tableRqt = 10 * tableCount;
// K-safety Heap consumption drop to 8 MB (per node)
// Snapshot cost 32 MB (per node)
// Theoretically, 40 MB (per node) should be e... | [
"static",
"public",
"long",
"computeMinimumHeapRqt",
"(",
"int",
"tableCount",
",",
"int",
"sitesPerHost",
",",
"int",
"kfactor",
")",
"{",
"long",
"baseRqt",
"=",
"384",
";",
"long",
"tableRqt",
"=",
"10",
"*",
"tableCount",
";",
"// K-safety Heap consumption d... | Any changes there should get reflected here and vice versa. | [
"Any",
"changes",
"there",
"should",
"get",
"reflected",
"here",
"and",
"vice",
"versa",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L4932-L4941 |
61,355 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java | RowAction.prepareCommit | synchronized void prepareCommit(Session session) {
RowActionBase action = this;
do {
if (action.session == session && action.commitTimestamp == 0) {
action.prepared = true;
}
action = action.next;
} while (action != null);
} | java | synchronized void prepareCommit(Session session) {
RowActionBase action = this;
do {
if (action.session == session && action.commitTimestamp == 0) {
action.prepared = true;
}
action = action.next;
} while (action != null);
} | [
"synchronized",
"void",
"prepareCommit",
"(",
"Session",
"session",
")",
"{",
"RowActionBase",
"action",
"=",
"this",
";",
"do",
"{",
"if",
"(",
"action",
".",
"session",
"==",
"session",
"&&",
"action",
".",
"commitTimestamp",
"==",
"0",
")",
"{",
"action... | for two-phased pre-commit | [
"for",
"two",
"-",
"phased",
"pre",
"-",
"commit"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java#L164-L175 |
61,356 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java | RowAction.rollback | synchronized void rollback(Session session, long timestamp) {
RowActionBase action = this;
do {
if (action.session == session && action.commitTimestamp == 0) {
if (action.actionTimestamp >= timestamp
|| action.actionTimestamp == 0) {
... | java | synchronized void rollback(Session session, long timestamp) {
RowActionBase action = this;
do {
if (action.session == session && action.commitTimestamp == 0) {
if (action.actionTimestamp >= timestamp
|| action.actionTimestamp == 0) {
... | [
"synchronized",
"void",
"rollback",
"(",
"Session",
"session",
",",
"long",
"timestamp",
")",
"{",
"RowActionBase",
"action",
"=",
"this",
";",
"do",
"{",
"if",
"(",
"action",
".",
"session",
"==",
"session",
"&&",
"action",
".",
"commitTimestamp",
"==",
"... | Rollback actions for a session including and after the given timestamp | [
"Rollback",
"actions",
"for",
"a",
"session",
"including",
"and",
"after",
"the",
"given",
"timestamp"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java#L194-L210 |
61,357 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java | RowAction.getCommitType | synchronized int getCommitType(long timestamp) {
RowActionBase action = this;
int type = ACTION_NONE;
do {
if (action.commitTimestamp == timestamp) {
type = action.type;
}
action = action.next;
} while (action != null);
... | java | synchronized int getCommitType(long timestamp) {
RowActionBase action = this;
int type = ACTION_NONE;
do {
if (action.commitTimestamp == timestamp) {
type = action.type;
}
action = action.next;
} while (action != null);
... | [
"synchronized",
"int",
"getCommitType",
"(",
"long",
"timestamp",
")",
"{",
"RowActionBase",
"action",
"=",
"this",
";",
"int",
"type",
"=",
"ACTION_NONE",
";",
"do",
"{",
"if",
"(",
"action",
".",
"commitTimestamp",
"==",
"timestamp",
")",
"{",
"type",
"=... | returns type of commit performed on timestamp. ACTION_NONE if none. | [
"returns",
"type",
"of",
"commit",
"performed",
"on",
"timestamp",
".",
"ACTION_NONE",
"if",
"none",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java#L215-L229 |
61,358 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java | RowAction.canCommit | synchronized boolean canCommit(Session session, OrderedHashSet set) {
RowActionBase action;
long timestamp = session.transactionTimestamp;
long commitTimestamp = 0;
final boolean readCommitted = session.isolationMode
== Sessi... | java | synchronized boolean canCommit(Session session, OrderedHashSet set) {
RowActionBase action;
long timestamp = session.transactionTimestamp;
long commitTimestamp = 0;
final boolean readCommitted = session.isolationMode
== Sessi... | [
"synchronized",
"boolean",
"canCommit",
"(",
"Session",
"session",
",",
"OrderedHashSet",
"set",
")",
"{",
"RowActionBase",
"action",
";",
"long",
"timestamp",
"=",
"session",
".",
"transactionTimestamp",
";",
"long",
"commitTimestamp",
"=",
"0",
";",
"final",
"... | returns false if another committed session has altered the same row | [
"returns",
"false",
"if",
"another",
"committed",
"session",
"has",
"altered",
"the",
"same",
"row"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java#L234-L284 |
61,359 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java | RowAction.mergeRollback | synchronized void mergeRollback(Row row) {
RowActionBase action = this;
RowActionBase head = null;
RowActionBase tail = null;
if (type == RowActionBase.ACTION_DELETE_FINAL
|| type == RowActionBase.ACTION_NONE) {
return;
}
do {
... | java | synchronized void mergeRollback(Row row) {
RowActionBase action = this;
RowActionBase head = null;
RowActionBase tail = null;
if (type == RowActionBase.ACTION_DELETE_FINAL
|| type == RowActionBase.ACTION_NONE) {
return;
}
do {
... | [
"synchronized",
"void",
"mergeRollback",
"(",
"Row",
"row",
")",
"{",
"RowActionBase",
"action",
"=",
"this",
";",
"RowActionBase",
"head",
"=",
"null",
";",
"RowActionBase",
"tail",
"=",
"null",
";",
"if",
"(",
"type",
"==",
"RowActionBase",
".",
"ACTION_DE... | merge rolled back actions | [
"merge",
"rolled",
"back",
"actions"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RowAction.java#L389-L430 |
61,360 | VoltDB/voltdb | src/frontend/org/voltdb/exportclient/HttpExportClient.java | HttpExportClient.adjustReplicationFactorForURI | private void adjustReplicationFactorForURI(HttpPut httpPut) throws URISyntaxException{
String queryString = httpPut.getURI().getQuery();
if(!StringUtils.isEmpty(queryString) && queryString.contains("op=CREATE") && (queryString.contains("replication=") || !StringUtils.isEmpty(m_blockReplication))){
... | java | private void adjustReplicationFactorForURI(HttpPut httpPut) throws URISyntaxException{
String queryString = httpPut.getURI().getQuery();
if(!StringUtils.isEmpty(queryString) && queryString.contains("op=CREATE") && (queryString.contains("replication=") || !StringUtils.isEmpty(m_blockReplication))){
... | [
"private",
"void",
"adjustReplicationFactorForURI",
"(",
"HttpPut",
"httpPut",
")",
"throws",
"URISyntaxException",
"{",
"String",
"queryString",
"=",
"httpPut",
".",
"getURI",
"(",
")",
".",
"getQuery",
"(",
")",
";",
"if",
"(",
"!",
"StringUtils",
".",
"isEm... | append replication factor to the URI for CREATE operation if the factor is not in URI
@param httpPut HttpPut for REST request
@throws URISyntaxException mis-formed URI | [
"append",
"replication",
"factor",
"to",
"the",
"URI",
"for",
"CREATE",
"operation",
"if",
"the",
"factor",
"is",
"not",
"in",
"URI"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/HttpExportClient.java#L552-L564 |
61,361 | VoltDB/voltdb | src/frontend/org/voltdb/exportclient/HttpExportClient.java | HttpExportClient.sign | private List<NameValuePair> sign(URI uri, final List<NameValuePair> params)
{
Preconditions.checkNotNull(m_secret);
final List<NameValuePair> sortedParams = Lists.newArrayList(params);
Collections.sort(sortedParams, new Comparator<NameValuePair>() {
@Override
public ... | java | private List<NameValuePair> sign(URI uri, final List<NameValuePair> params)
{
Preconditions.checkNotNull(m_secret);
final List<NameValuePair> sortedParams = Lists.newArrayList(params);
Collections.sort(sortedParams, new Comparator<NameValuePair>() {
@Override
public ... | [
"private",
"List",
"<",
"NameValuePair",
">",
"sign",
"(",
"URI",
"uri",
",",
"final",
"List",
"<",
"NameValuePair",
">",
"params",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"m_secret",
")",
";",
"final",
"List",
"<",
"NameValuePair",
">",
"sort... | Calculate the signature of the request using the specified secret key.
@param params The parameters to send in the request.
@return The parameters including the signature. | [
"Calculate",
"the",
"signature",
"of",
"the",
"request",
"using",
"the",
"specified",
"secret",
"key",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/HttpExportClient.java#L646-L692 |
61,362 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/collect/TreeTraverser.java | TreeTraverser.preOrderTraversal | public final FluentIterable<T> preOrderTraversal(final T root) {
checkNotNull(root);
return new FluentIterable<T>() {
@Override
public UnmodifiableIterator<T> iterator() {
return preOrderIterator(root);
}
};
} | java | public final FluentIterable<T> preOrderTraversal(final T root) {
checkNotNull(root);
return new FluentIterable<T>() {
@Override
public UnmodifiableIterator<T> iterator() {
return preOrderIterator(root);
}
};
} | [
"public",
"final",
"FluentIterable",
"<",
"T",
">",
"preOrderTraversal",
"(",
"final",
"T",
"root",
")",
"{",
"checkNotNull",
"(",
"root",
")",
";",
"return",
"new",
"FluentIterable",
"<",
"T",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"UnmodifiableIt... | Returns an unmodifiable iterable over the nodes in a tree structure, using pre-order
traversal. That is, each node's subtrees are traversed after the node itself is returned.
<p>No guarantees are made about the behavior of the traversal when nodes change while
iteration is in progress or when the iterators generated b... | [
"Returns",
"an",
"unmodifiable",
"iterable",
"over",
"the",
"nodes",
"in",
"a",
"tree",
"structure",
"using",
"pre",
"-",
"order",
"traversal",
".",
"That",
"is",
"each",
"node",
"s",
"subtrees",
"are",
"traversed",
"after",
"the",
"node",
"itself",
"is",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/TreeTraverser.java#L102-L110 |
61,363 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/collect/TreeTraverser.java | TreeTraverser.breadthFirstTraversal | public final FluentIterable<T> breadthFirstTraversal(final T root) {
checkNotNull(root);
return new FluentIterable<T>() {
@Override
public UnmodifiableIterator<T> iterator() {
return new BreadthFirstIterator(root);
}
};
} | java | public final FluentIterable<T> breadthFirstTraversal(final T root) {
checkNotNull(root);
return new FluentIterable<T>() {
@Override
public UnmodifiableIterator<T> iterator() {
return new BreadthFirstIterator(root);
}
};
} | [
"public",
"final",
"FluentIterable",
"<",
"T",
">",
"breadthFirstTraversal",
"(",
"final",
"T",
"root",
")",
"{",
"checkNotNull",
"(",
"root",
")",
";",
"return",
"new",
"FluentIterable",
"<",
"T",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Unmodifiab... | Returns an unmodifiable iterable over the nodes in a tree structure, using breadth-first
traversal. That is, all the nodes of depth 0 are returned, then depth 1, then 2, and so on.
<p>No guarantees are made about the behavior of the traversal when nodes change while
iteration is in progress or when the iterators gener... | [
"Returns",
"an",
"unmodifiable",
"iterable",
"over",
"the",
"nodes",
"in",
"a",
"tree",
"structure",
"using",
"breadth",
"-",
"first",
"traversal",
".",
"That",
"is",
"all",
"the",
"nodes",
"of",
"depth",
"0",
"are",
"returned",
"then",
"depth",
"1",
"then... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/TreeTraverser.java#L212-L220 |
61,364 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCDatabaseMetaData.java | JDBCDatabaseMetaData.getUserName | public String getUserName() throws SQLException {
ResultSet rs = execute("CALL USER()");
rs.next();
String result = rs.getString(1);
rs.close();
return result;
} | java | public String getUserName() throws SQLException {
ResultSet rs = execute("CALL USER()");
rs.next();
String result = rs.getString(1);
rs.close();
return result;
} | [
"public",
"String",
"getUserName",
"(",
")",
"throws",
"SQLException",
"{",
"ResultSet",
"rs",
"=",
"execute",
"(",
"\"CALL USER()\"",
")",
";",
"rs",
".",
"next",
"(",
")",
";",
"String",
"result",
"=",
"rs",
".",
"getString",
"(",
"1",
")",
";",
"rs"... | Retrieves the user name as known to this database.
@return the database user name
@exception SQLException if a database access error occurs | [
"Retrieves",
"the",
"user",
"name",
"as",
"known",
"to",
"this",
"database",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCDatabaseMetaData.java#L387-L398 |
61,365 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCDatabaseMetaData.java | JDBCDatabaseMetaData.isReadOnly | public boolean isReadOnly() throws SQLException {
ResultSet rs = execute("CALL isReadOnlyDatabase()");
rs.next();
boolean result = rs.getBoolean(1);
rs.close();
return result;
} | java | public boolean isReadOnly() throws SQLException {
ResultSet rs = execute("CALL isReadOnlyDatabase()");
rs.next();
boolean result = rs.getBoolean(1);
rs.close();
return result;
} | [
"public",
"boolean",
"isReadOnly",
"(",
")",
"throws",
"SQLException",
"{",
"ResultSet",
"rs",
"=",
"execute",
"(",
"\"CALL isReadOnlyDatabase()\"",
")",
";",
"rs",
".",
"next",
"(",
")",
";",
"boolean",
"result",
"=",
"rs",
".",
"getBoolean",
"(",
"1",
")... | Retrieves whether this database is in read-only mode.
<!-- start release-specific documentation -->
<div class="ReleaseSpecificDocumentation">
<h3>HSQLDB-Specific Information:</h3> <p>
Starting with 1.7.2, this makes
an SQL call to the new isReadOnlyDatabase function
which provides correct determination of the read-o... | [
"Retrieves",
"whether",
"this",
"database",
"is",
"in",
"read",
"-",
"only",
"mode",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCDatabaseMetaData.java#L416-L427 |
61,366 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCDatabaseMetaData.java | JDBCDatabaseMetaData.toQueryPrefixNoSelect | private StringBuffer toQueryPrefixNoSelect(String t) {
StringBuffer sb = new StringBuffer(255);
return sb.append(t).append(whereTrue);
} | java | private StringBuffer toQueryPrefixNoSelect(String t) {
StringBuffer sb = new StringBuffer(255);
return sb.append(t).append(whereTrue);
} | [
"private",
"StringBuffer",
"toQueryPrefixNoSelect",
"(",
"String",
"t",
")",
"{",
"StringBuffer",
"sb",
"=",
"new",
"StringBuffer",
"(",
"255",
")",
";",
"return",
"sb",
".",
"append",
"(",
"t",
")",
".",
"append",
"(",
"whereTrue",
")",
";",
"}"
] | Retrieves "<expression> WHERE 1=1" in string | [
"Retrieves",
"<",
";",
"expression>",
";",
"WHERE",
"1",
"=",
"1",
"in",
"string"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCDatabaseMetaData.java#L6171-L6176 |
61,367 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/ConstantValueExpression.java | ConstantValueExpression.makeExpression | public static ConstantValueExpression makeExpression(VoltType dataType, String value) {
ConstantValueExpression constantExpr = new ConstantValueExpression();
constantExpr.setValueType(dataType);
constantExpr.setValue(value);
return constantExpr;
} | java | public static ConstantValueExpression makeExpression(VoltType dataType, String value) {
ConstantValueExpression constantExpr = new ConstantValueExpression();
constantExpr.setValueType(dataType);
constantExpr.setValue(value);
return constantExpr;
} | [
"public",
"static",
"ConstantValueExpression",
"makeExpression",
"(",
"VoltType",
"dataType",
",",
"String",
"value",
")",
"{",
"ConstantValueExpression",
"constantExpr",
"=",
"new",
"ConstantValueExpression",
"(",
")",
";",
"constantExpr",
".",
"setValueType",
"(",
"... | Create a new CVE for a given type and value
@param dataType
@param value
@return | [
"Create",
"a",
"new",
"CVE",
"for",
"a",
"given",
"type",
"and",
"value"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/ConstantValueExpression.java#L493-L498 |
61,368 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/StatementDML.java | StatementDML.executeUpdateStatement | Result executeUpdateStatement(Session session) {
int count = 0;
Expression[] colExpressions = updateExpressions;
HashMappedList rowset = new HashMappedList();
Type[] colTypes = baseTable.getColumnTypes();
RangeIteratorBase it = RangeVa... | java | Result executeUpdateStatement(Session session) {
int count = 0;
Expression[] colExpressions = updateExpressions;
HashMappedList rowset = new HashMappedList();
Type[] colTypes = baseTable.getColumnTypes();
RangeIteratorBase it = RangeVa... | [
"Result",
"executeUpdateStatement",
"(",
"Session",
"session",
")",
"{",
"int",
"count",
"=",
"0",
";",
"Expression",
"[",
"]",
"colExpressions",
"=",
"updateExpressions",
";",
"HashMappedList",
"rowset",
"=",
"new",
"HashMappedList",
"(",
")",
";",
"Type",
"[... | Executes an UPDATE statement. It is assumed that the argument
is of the correct type.
@return the result of executing the statement | [
"Executes",
"an",
"UPDATE",
"statement",
".",
"It",
"is",
"assumed",
"that",
"the",
"argument",
"is",
"of",
"the",
"correct",
"type",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementDML.java#L341-L392 |
61,369 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/StatementDML.java | StatementDML.executeMergeStatement | Result executeMergeStatement(Session session) {
Result resultOut = null;
RowSetNavigator generatedNavigator = null;
PersistentStore store = session.sessionData.getRowStore(baseTable);
if (generatedIndexes != null) {
resultOut = Result.newUpdateCountResult(... | java | Result executeMergeStatement(Session session) {
Result resultOut = null;
RowSetNavigator generatedNavigator = null;
PersistentStore store = session.sessionData.getRowStore(baseTable);
if (generatedIndexes != null) {
resultOut = Result.newUpdateCountResult(... | [
"Result",
"executeMergeStatement",
"(",
"Session",
"session",
")",
"{",
"Result",
"resultOut",
"=",
"null",
";",
"RowSetNavigator",
"generatedNavigator",
"=",
"null",
";",
"PersistentStore",
"store",
"=",
"session",
".",
"sessionData",
".",
"getRowStore",
"(",
"ba... | Executes a MERGE statement. It is assumed that the argument
is of the correct type.
@return Result object | [
"Executes",
"a",
"MERGE",
"statement",
".",
"It",
"is",
"assumed",
"that",
"the",
"argument",
"is",
"of",
"the",
"correct",
"type",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementDML.java#L498-L598 |
61,370 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/StatementDML.java | StatementDML.executeDeleteStatement | Result executeDeleteStatement(Session session) {
int count = 0;
RowSetNavigatorLinkedList oldRows = new RowSetNavigatorLinkedList();
RangeIterator it = RangeVariable.getIterator(session,
targetRangeVariables);
while (it.next()) {
Row curr... | java | Result executeDeleteStatement(Session session) {
int count = 0;
RowSetNavigatorLinkedList oldRows = new RowSetNavigatorLinkedList();
RangeIterator it = RangeVariable.getIterator(session,
targetRangeVariables);
while (it.next()) {
Row curr... | [
"Result",
"executeDeleteStatement",
"(",
"Session",
"session",
")",
"{",
"int",
"count",
"=",
"0",
";",
"RowSetNavigatorLinkedList",
"oldRows",
"=",
"new",
"RowSetNavigatorLinkedList",
"(",
")",
";",
"RangeIterator",
"it",
"=",
"RangeVariable",
".",
"getIterator",
... | Executes a DELETE statement. It is assumed that the argument is
of the correct type.
@return the result of executing the statement | [
"Executes",
"a",
"DELETE",
"statement",
".",
"It",
"is",
"assumed",
"that",
"the",
"argument",
"is",
"of",
"the",
"correct",
"type",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementDML.java#L706-L726 |
61,371 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/StatementDML.java | StatementDML.delete | int delete(Session session, Table table, RowSetNavigator oldRows) {
if (table.fkMainConstraints.length == 0) {
deleteRows(session, table, oldRows);
oldRows.beforeFirst();
if (table.hasTrigger(Trigger.DELETE_AFTER)) {
table.fireAfterTriggers(session, Trigger.... | java | int delete(Session session, Table table, RowSetNavigator oldRows) {
if (table.fkMainConstraints.length == 0) {
deleteRows(session, table, oldRows);
oldRows.beforeFirst();
if (table.hasTrigger(Trigger.DELETE_AFTER)) {
table.fireAfterTriggers(session, Trigger.... | [
"int",
"delete",
"(",
"Session",
"session",
",",
"Table",
"table",
",",
"RowSetNavigator",
"oldRows",
")",
"{",
"if",
"(",
"table",
".",
"fkMainConstraints",
".",
"length",
"==",
"0",
")",
"{",
"deleteRows",
"(",
"session",
",",
"table",
",",
"oldRows",
... | Highest level multiple row delete method. Corresponds to an SQL
DELETE. | [
"Highest",
"level",
"multiple",
"row",
"delete",
"method",
".",
"Corresponds",
"to",
"an",
"SQL",
"DELETE",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementDML.java#L736-L814 |
61,372 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/StatementDML.java | StatementDML.mergeUpdate | static void mergeUpdate(HashMappedList rowSet, Row row, Object[] newData,
int[] cols) {
Object[] data = (Object[]) rowSet.get(row);
if (data != null) {
for (int j = 0; j < cols.length; j++) {
data[cols[j]] = newData[cols[j]];
}
... | java | static void mergeUpdate(HashMappedList rowSet, Row row, Object[] newData,
int[] cols) {
Object[] data = (Object[]) rowSet.get(row);
if (data != null) {
for (int j = 0; j < cols.length; j++) {
data[cols[j]] = newData[cols[j]];
}
... | [
"static",
"void",
"mergeUpdate",
"(",
"HashMappedList",
"rowSet",
",",
"Row",
"row",
",",
"Object",
"[",
"]",
"newData",
",",
"int",
"[",
"]",
"cols",
")",
"{",
"Object",
"[",
"]",
"data",
"=",
"(",
"Object",
"[",
"]",
")",
"rowSet",
".",
"get",
"(... | Merges a triggered change with a previous triggered change, or adds to
list. | [
"Merges",
"a",
"triggered",
"change",
"with",
"a",
"previous",
"triggered",
"change",
"or",
"adds",
"to",
"list",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementDML.java#L1243-L1255 |
61,373 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/StatementDML.java | StatementDML.mergeKeepUpdate | static boolean mergeKeepUpdate(Session session, HashMappedList rowSet,
int[] cols, Type[] colTypes, Row row,
Object[] newData) {
Object[] data = (Object[]) rowSet.get(row);
if (data != null) {
if (IndexAVL
... | java | static boolean mergeKeepUpdate(Session session, HashMappedList rowSet,
int[] cols, Type[] colTypes, Row row,
Object[] newData) {
Object[] data = (Object[]) rowSet.get(row);
if (data != null) {
if (IndexAVL
... | [
"static",
"boolean",
"mergeKeepUpdate",
"(",
"Session",
"session",
",",
"HashMappedList",
"rowSet",
",",
"int",
"[",
"]",
"cols",
",",
"Type",
"[",
"]",
"colTypes",
",",
"Row",
"row",
",",
"Object",
"[",
"]",
"newData",
")",
"{",
"Object",
"[",
"]",
"d... | Merge the full triggered change with the updated row, or add to list.
Return false if changes conflict. | [
"Merge",
"the",
"full",
"triggered",
"change",
"with",
"the",
"updated",
"row",
"or",
"add",
"to",
"list",
".",
"Return",
"false",
"if",
"changes",
"conflict",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementDML.java#L1261-L1285 |
61,374 | VoltDB/voltdb | src/frontend/org/voltdb/exportclient/ExportDecoderBase.java | ExportDecoderBase.decodeRow | protected ExportRowData decodeRow(byte[] rowData) throws IOException {
ExportRow row = ExportRow.decodeRow(m_legacyRow, getPartition(), m_startTS, rowData);
return new ExportRowData(row.values, row.partitionValue, row.partitionId);
} | java | protected ExportRowData decodeRow(byte[] rowData) throws IOException {
ExportRow row = ExportRow.decodeRow(m_legacyRow, getPartition(), m_startTS, rowData);
return new ExportRowData(row.values, row.partitionValue, row.partitionId);
} | [
"protected",
"ExportRowData",
"decodeRow",
"(",
"byte",
"[",
"]",
"rowData",
")",
"throws",
"IOException",
"{",
"ExportRow",
"row",
"=",
"ExportRow",
".",
"decodeRow",
"(",
"m_legacyRow",
",",
"getPartition",
"(",
")",
",",
"m_startTS",
",",
"rowData",
")",
... | Decode a byte array of row data into ExportRowData
@param rowData
@return ExportRowData
@throws IOException | [
"Decode",
"a",
"byte",
"array",
"of",
"row",
"data",
"into",
"ExportRowData"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/ExportDecoderBase.java#L119-L122 |
61,375 | VoltDB/voltdb | src/frontend/org/voltdb/exportclient/ExportDecoderBase.java | ExportDecoderBase.writeRow | public boolean writeRow(Object row[], CSVWriter writer, boolean skipinternal,
BinaryEncoding binaryEncoding, SimpleDateFormat dateFormatter) {
int firstfield = getFirstField(skipinternal);
try {
String[] fields = new String[m_tableSchema.size() - firstfield];
for (in... | java | public boolean writeRow(Object row[], CSVWriter writer, boolean skipinternal,
BinaryEncoding binaryEncoding, SimpleDateFormat dateFormatter) {
int firstfield = getFirstField(skipinternal);
try {
String[] fields = new String[m_tableSchema.size() - firstfield];
for (in... | [
"public",
"boolean",
"writeRow",
"(",
"Object",
"row",
"[",
"]",
",",
"CSVWriter",
"writer",
",",
"boolean",
"skipinternal",
",",
"BinaryEncoding",
"binaryEncoding",
",",
"SimpleDateFormat",
"dateFormatter",
")",
"{",
"int",
"firstfield",
"=",
"getFirstField",
"("... | This is for legacy connector. | [
"This",
"is",
"for",
"legacy",
"connector",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/ExportDecoderBase.java#L125-L155 |
61,376 | VoltDB/voltdb | src/frontend/org/voltdb/exportclient/ExportDecoderBase.java | ExportDecoderBase.setPartitionColumnName | public final int setPartitionColumnName(String partitionColumnName) {
if (partitionColumnName == null || partitionColumnName.trim().isEmpty()) {
return PARTITION_ID_INDEX;
}
int idx = -1;
for (String name : m_source.columnNames) {
if (name.equalsIgnoreCase(partiti... | java | public final int setPartitionColumnName(String partitionColumnName) {
if (partitionColumnName == null || partitionColumnName.trim().isEmpty()) {
return PARTITION_ID_INDEX;
}
int idx = -1;
for (String name : m_source.columnNames) {
if (name.equalsIgnoreCase(partiti... | [
"public",
"final",
"int",
"setPartitionColumnName",
"(",
"String",
"partitionColumnName",
")",
"{",
"if",
"(",
"partitionColumnName",
"==",
"null",
"||",
"partitionColumnName",
".",
"trim",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"PARTITION_ID_IN... | Used for override of column for partitioning. This is for legacy connector only. | [
"Used",
"for",
"override",
"of",
"column",
"for",
"partitioning",
".",
"This",
"is",
"for",
"legacy",
"connector",
"only",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/ExportDecoderBase.java#L192-L211 |
61,377 | VoltDB/voltdb | src/frontend/org/voltcore/utils/ShutdownHooks.java | ShutdownHooks.registerShutdownHook | public static void registerShutdownHook(int priority, boolean runOnCrash, Runnable action)
{
m_instance.addHook(priority, runOnCrash, action);
//Any hook registered lets print crash messsage.
ShutdownHooks.m_crashMessage = true;
} | java | public static void registerShutdownHook(int priority, boolean runOnCrash, Runnable action)
{
m_instance.addHook(priority, runOnCrash, action);
//Any hook registered lets print crash messsage.
ShutdownHooks.m_crashMessage = true;
} | [
"public",
"static",
"void",
"registerShutdownHook",
"(",
"int",
"priority",
",",
"boolean",
"runOnCrash",
",",
"Runnable",
"action",
")",
"{",
"m_instance",
".",
"addHook",
"(",
"priority",
",",
"runOnCrash",
",",
"action",
")",
";",
"//Any hook registered lets pr... | Register an action to be run when the JVM exits.
@param priority The priority level at which this action should be run. Lower values will run earlier.
@param runOnCrash Whether or not this action should be performed if the server is shutting down
due to a call to crashVoltDB()
@param action A Runnable containing th... | [
"Register",
"an",
"action",
"to",
"be",
"run",
"when",
"the",
"JVM",
"exits",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/utils/ShutdownHooks.java#L67-L72 |
61,378 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/ClientCnxn.java | ClientCnxn.getRemoteSocketAddress | SocketAddress getRemoteSocketAddress() {
// a lot could go wrong here, so rather than put in a bunch of code
// to check for nulls all down the chain let's do it the simple
// yet bulletproof way
try {
return ((SocketChannel) sendThread.sockKey.channel()).socket()
... | java | SocketAddress getRemoteSocketAddress() {
// a lot could go wrong here, so rather than put in a bunch of code
// to check for nulls all down the chain let's do it the simple
// yet bulletproof way
try {
return ((SocketChannel) sendThread.sockKey.channel()).socket()
... | [
"SocketAddress",
"getRemoteSocketAddress",
"(",
")",
"{",
"// a lot could go wrong here, so rather than put in a bunch of code",
"// to check for nulls all down the chain let's do it the simple",
"// yet bulletproof way",
"try",
"{",
"return",
"(",
"(",
"SocketChannel",
")",
"sendThrea... | Returns the address to which the socket is connected.
@return ip address of the remote side of the connection or null if not
connected | [
"Returns",
"the",
"address",
"to",
"which",
"the",
"socket",
"is",
"connected",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/ClientCnxn.java#L210-L220 |
61,379 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/ClientCnxn.java | ClientCnxn.getLocalSocketAddress | SocketAddress getLocalSocketAddress() {
// a lot could go wrong here, so rather than put in a bunch of code
// to check for nulls all down the chain let's do it the simple
// yet bulletproof way
try {
return ((SocketChannel) sendThread.sockKey.channel()).socket()
... | java | SocketAddress getLocalSocketAddress() {
// a lot could go wrong here, so rather than put in a bunch of code
// to check for nulls all down the chain let's do it the simple
// yet bulletproof way
try {
return ((SocketChannel) sendThread.sockKey.channel()).socket()
... | [
"SocketAddress",
"getLocalSocketAddress",
"(",
")",
"{",
"// a lot could go wrong here, so rather than put in a bunch of code",
"// to check for nulls all down the chain let's do it the simple",
"// yet bulletproof way",
"try",
"{",
"return",
"(",
"(",
"SocketChannel",
")",
"sendThread... | Returns the local address to which the socket is bound.
@return ip address of the remote side of the connection or null if not
connected | [
"Returns",
"the",
"local",
"address",
"to",
"which",
"the",
"socket",
"is",
"bound",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/ClientCnxn.java#L228-L238 |
61,380 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/ClientCnxn.java | ClientCnxn.makeThreadName | private static String makeThreadName(String suffix) {
String name = Thread.currentThread().getName()
.replaceAll("-EventThread", "");
return name + suffix;
} | java | private static String makeThreadName(String suffix) {
String name = Thread.currentThread().getName()
.replaceAll("-EventThread", "");
return name + suffix;
} | [
"private",
"static",
"String",
"makeThreadName",
"(",
"String",
"suffix",
")",
"{",
"String",
"name",
"=",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getName",
"(",
")",
".",
"replaceAll",
"(",
"\"-EventThread\"",
",",
"\"\"",
")",
";",
"return",
"nam... | Guard against creating "-EventThread-EventThread-EventThread-..." thread
names when ZooKeeper object is being created from within a watcher. See
ZOOKEEPER-795 for details. | [
"Guard",
"against",
"creating",
"-",
"EventThread",
"-",
"EventThread",
"-",
"EventThread",
"-",
"...",
"thread",
"names",
"when",
"ZooKeeper",
"object",
"is",
"being",
"created",
"from",
"within",
"a",
"watcher",
".",
"See",
"ZOOKEEPER",
"-",
"795",
"for",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/ClientCnxn.java#L451-L455 |
61,381 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/JDBCXAResource.java | JDBCXAResource.commit | public void commit(Xid xid, boolean onePhase) throws XAException {
// Comment out following debug statement before public release:
System.err.println("Performing a " + (onePhase ? "1-phase"
: "2-phase") + " commit on "
... | java | public void commit(Xid xid, boolean onePhase) throws XAException {
// Comment out following debug statement before public release:
System.err.println("Performing a " + (onePhase ? "1-phase"
: "2-phase") + " commit on "
... | [
"public",
"void",
"commit",
"(",
"Xid",
"xid",
",",
"boolean",
"onePhase",
")",
"throws",
"XAException",
"{",
"// Comment out following debug statement before public release:",
"System",
".",
"err",
".",
"println",
"(",
"\"Performing a \"",
"+",
"(",
"onePhase",
"?",
... | Per the JDBC 3.0 spec, this commits the transaction for the
specified Xid, not necessarily for the transaction associated
with this XAResource object. | [
"Per",
"the",
"JDBC",
"3",
".",
"0",
"spec",
"this",
"commits",
"the",
"transaction",
"for",
"the",
"specified",
"Xid",
"not",
"necessarily",
"for",
"the",
"transaction",
"associated",
"with",
"this",
"XAResource",
"object",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/JDBCXAResource.java#L150-L164 |
61,382 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/JDBCXAResource.java | JDBCXAResource.isSameRM | public boolean isSameRM(XAResource xares) throws XAException {
if (!(xares instanceof JDBCXAResource)) {
return false;
}
return xaDataSource == ((JDBCXAResource) xares).getXADataSource();
} | java | public boolean isSameRM(XAResource xares) throws XAException {
if (!(xares instanceof JDBCXAResource)) {
return false;
}
return xaDataSource == ((JDBCXAResource) xares).getXADataSource();
} | [
"public",
"boolean",
"isSameRM",
"(",
"XAResource",
"xares",
")",
"throws",
"XAException",
"{",
"if",
"(",
"!",
"(",
"xares",
"instanceof",
"JDBCXAResource",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"xaDataSource",
"==",
"(",
"(",
"JDBCXAResourc... | Stub. See implementation comment in the method for why this is
not implemented yet.
@return false. | [
"Stub",
".",
"See",
"implementation",
"comment",
"in",
"the",
"method",
"for",
"why",
"this",
"is",
"not",
"implemented",
"yet",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/JDBCXAResource.java#L280-L287 |
61,383 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/JDBCXAResource.java | JDBCXAResource.prepare | public int prepare(Xid xid) throws XAException {
validateXid(xid);
/**
* @todo: This is where the real 2-phase work should be done to
* determine if a commit done here would succeed or not.
*/
/**
* @todo: May improve performance to return XA_RDONLY whene... | java | public int prepare(Xid xid) throws XAException {
validateXid(xid);
/**
* @todo: This is where the real 2-phase work should be done to
* determine if a commit done here would succeed or not.
*/
/**
* @todo: May improve performance to return XA_RDONLY whene... | [
"public",
"int",
"prepare",
"(",
"Xid",
"xid",
")",
"throws",
"XAException",
"{",
"validateXid",
"(",
"xid",
")",
";",
"/**\n * @todo: This is where the real 2-phase work should be done to\n * determine if a commit done here would succeed or not.\n */",
"/**\... | Vote on whether to commit the global transaction.
@throws XAException to vote negative.
@return commitType of XA_RDONLY or XA_OK. (Actually only XA_OK now). | [
"Vote",
"on",
"whether",
"to",
"commit",
"the",
"global",
"transaction",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/JDBCXAResource.java#L295-L320 |
61,384 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/JDBCXAResource.java | JDBCXAResource.rollback | public void rollback(Xid xid) throws XAException {
JDBCXAResource resource = xaDataSource.getResource(xid);
if (resource == null) {
throw new XAException(
"The XADataSource has no such Xid in prepared state: " + xid);
}
resource.rollbackThis();
} | java | public void rollback(Xid xid) throws XAException {
JDBCXAResource resource = xaDataSource.getResource(xid);
if (resource == null) {
throw new XAException(
"The XADataSource has no such Xid in prepared state: " + xid);
}
resource.rollbackThis();
} | [
"public",
"void",
"rollback",
"(",
"Xid",
"xid",
")",
"throws",
"XAException",
"{",
"JDBCXAResource",
"resource",
"=",
"xaDataSource",
".",
"getResource",
"(",
"xid",
")",
";",
"if",
"(",
"resource",
"==",
"null",
")",
"{",
"throw",
"new",
"XAException",
"... | Per the JDBC 3.0 spec, this rolls back the transaction for the
specified Xid, not necessarily for the transaction associated
with this XAResource object. | [
"Per",
"the",
"JDBC",
"3",
".",
"0",
"spec",
"this",
"rolls",
"back",
"the",
"transaction",
"for",
"the",
"specified",
"Xid",
"not",
"necessarily",
"for",
"the",
"transaction",
"associated",
"with",
"this",
"XAResource",
"object",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/JDBCXAResource.java#L338-L348 |
61,385 | VoltDB/voltdb | third_party/java/src/org/apache/commons_voltpatches/cli/Option.java | Option.processValue | private void processValue(String value)
{
// this Option has a separator character
if (hasValueSeparator())
{
// get the separator character
char sep = getValueSeparator();
// store the index for the value separator
int index = value.indexOf(s... | java | private void processValue(String value)
{
// this Option has a separator character
if (hasValueSeparator())
{
// get the separator character
char sep = getValueSeparator();
// store the index for the value separator
int index = value.indexOf(s... | [
"private",
"void",
"processValue",
"(",
"String",
"value",
")",
"{",
"// this Option has a separator character",
"if",
"(",
"hasValueSeparator",
"(",
")",
")",
"{",
"// get the separator character",
"char",
"sep",
"=",
"getValueSeparator",
"(",
")",
";",
"// store the... | Processes the value. If this Option has a value separator
the value will have to be parsed into individual tokens. When
n-1 tokens have been processed and there are more value separators
in the value, parsing is ceased and the remaining characters are
added as a single token.
@param value The String to be processed.... | [
"Processes",
"the",
"value",
".",
"If",
"this",
"Option",
"has",
"a",
"value",
"separator",
"the",
"value",
"will",
"have",
"to",
"be",
"parsed",
"into",
"individual",
"tokens",
".",
"When",
"n",
"-",
"1",
"tokens",
"have",
"been",
"processed",
"and",
"t... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/commons_voltpatches/cli/Option.java#L451-L484 |
61,386 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/util/concurrent/Monitor.java | Monitor.enterWhenUninterruptibly | public boolean enterWhenUninterruptibly(Guard guard, long time, TimeUnit unit) {
final long timeoutNanos = toSafeNanos(time, unit);
if (guard.monitor != this) {
throw new IllegalMonitorStateException();
}
final ReentrantLock lock = this.lock;
long startTime = 0L;
boolean signalBeforeWaitin... | java | public boolean enterWhenUninterruptibly(Guard guard, long time, TimeUnit unit) {
final long timeoutNanos = toSafeNanos(time, unit);
if (guard.monitor != this) {
throw new IllegalMonitorStateException();
}
final ReentrantLock lock = this.lock;
long startTime = 0L;
boolean signalBeforeWaitin... | [
"public",
"boolean",
"enterWhenUninterruptibly",
"(",
"Guard",
"guard",
",",
"long",
"time",
",",
"TimeUnit",
"unit",
")",
"{",
"final",
"long",
"timeoutNanos",
"=",
"toSafeNanos",
"(",
"time",
",",
"unit",
")",
";",
"if",
"(",
"guard",
".",
"monitor",
"!=... | Enters this monitor when the guard is satisfied. Blocks at most the given time, including both
the time to acquire the lock and the time to wait for the guard to be satisfied.
@return whether the monitor was entered, which guarantees that the guard is now satisfied | [
"Enters",
"this",
"monitor",
"when",
"the",
"guard",
"is",
"satisfied",
".",
"Blocks",
"at",
"most",
"the",
"given",
"time",
"including",
"both",
"the",
"time",
"to",
"acquire",
"the",
"lock",
"and",
"the",
"time",
"to",
"wait",
"for",
"the",
"guard",
"t... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/util/concurrent/Monitor.java#L543-L601 |
61,387 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/util/concurrent/Monitor.java | Monitor.enterIfInterruptibly | public boolean enterIfInterruptibly(Guard guard, long time, TimeUnit unit)
throws InterruptedException {
if (guard.monitor != this) {
throw new IllegalMonitorStateException();
}
final ReentrantLock lock = this.lock;
if (!lock.tryLock(time, unit)) {
return false;
}
boolean sati... | java | public boolean enterIfInterruptibly(Guard guard, long time, TimeUnit unit)
throws InterruptedException {
if (guard.monitor != this) {
throw new IllegalMonitorStateException();
}
final ReentrantLock lock = this.lock;
if (!lock.tryLock(time, unit)) {
return false;
}
boolean sati... | [
"public",
"boolean",
"enterIfInterruptibly",
"(",
"Guard",
"guard",
",",
"long",
"time",
",",
"TimeUnit",
"unit",
")",
"throws",
"InterruptedException",
"{",
"if",
"(",
"guard",
".",
"monitor",
"!=",
"this",
")",
"{",
"throw",
"new",
"IllegalMonitorStateExceptio... | Enters this monitor if the guard is satisfied. Blocks at most the given time acquiring the
lock, but does not wait for the guard to be satisfied, and may be interrupted.
@return whether the monitor was entered, which guarantees that the guard is now satisfied | [
"Enters",
"this",
"monitor",
"if",
"the",
"guard",
"is",
"satisfied",
".",
"Blocks",
"at",
"most",
"the",
"given",
"time",
"acquiring",
"the",
"lock",
"but",
"does",
"not",
"wait",
"for",
"the",
"guard",
"to",
"be",
"satisfied",
"and",
"may",
"be",
"inte... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/util/concurrent/Monitor.java#L680-L698 |
61,388 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/util/concurrent/Monitor.java | Monitor.waitFor | public boolean waitFor(Guard guard, long time, TimeUnit unit) throws InterruptedException {
final long timeoutNanos = toSafeNanos(time, unit);
if (!((guard.monitor == this) & lock.isHeldByCurrentThread())) {
throw new IllegalMonitorStateException();
}
if (guard.isSatisfied()) {
return true;
... | java | public boolean waitFor(Guard guard, long time, TimeUnit unit) throws InterruptedException {
final long timeoutNanos = toSafeNanos(time, unit);
if (!((guard.monitor == this) & lock.isHeldByCurrentThread())) {
throw new IllegalMonitorStateException();
}
if (guard.isSatisfied()) {
return true;
... | [
"public",
"boolean",
"waitFor",
"(",
"Guard",
"guard",
",",
"long",
"time",
",",
"TimeUnit",
"unit",
")",
"throws",
"InterruptedException",
"{",
"final",
"long",
"timeoutNanos",
"=",
"toSafeNanos",
"(",
"time",
",",
"unit",
")",
";",
"if",
"(",
"!",
"(",
... | Waits for the guard to be satisfied. Waits at most the given time, and may be interrupted. May
be called only by a thread currently occupying this monitor.
@return whether the guard is now satisfied
@throws InterruptedException if interrupted while waiting | [
"Waits",
"for",
"the",
"guard",
"to",
"be",
"satisfied",
".",
"Waits",
"at",
"most",
"the",
"given",
"time",
"and",
"may",
"be",
"interrupted",
".",
"May",
"be",
"called",
"only",
"by",
"a",
"thread",
"currently",
"occupying",
"this",
"monitor",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/util/concurrent/Monitor.java#L762-L774 |
61,389 | VoltDB/voltdb | src/frontend/org/voltdb/rejoin/StreamSnapshotAckSender.java | StreamSnapshotAckSender.ack | public void ack(long hsId, boolean isEOS, long targetId, int blockIndex) {
rejoinLog.debug("Queue ack for hsId:" + hsId + " isEOS: " +
isEOS + " targetId:" + targetId + " blockIndex: " + blockIndex);
m_blockIndices.offer(Pair.of(hsId, new RejoinDataAckMessage(isEOS, targetId, blockIndex)... | java | public void ack(long hsId, boolean isEOS, long targetId, int blockIndex) {
rejoinLog.debug("Queue ack for hsId:" + hsId + " isEOS: " +
isEOS + " targetId:" + targetId + " blockIndex: " + blockIndex);
m_blockIndices.offer(Pair.of(hsId, new RejoinDataAckMessage(isEOS, targetId, blockIndex)... | [
"public",
"void",
"ack",
"(",
"long",
"hsId",
",",
"boolean",
"isEOS",
",",
"long",
"targetId",
",",
"int",
"blockIndex",
")",
"{",
"rejoinLog",
".",
"debug",
"(",
"\"Queue ack for hsId:\"",
"+",
"hsId",
"+",
"\" isEOS: \"",
"+",
"isEOS",
"+",
"\" targetId:\... | Ack with a positive block index.
@param hsId The mailbox to send the ack to
@param blockIndex | [
"Ack",
"with",
"a",
"positive",
"block",
"index",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/rejoin/StreamSnapshotAckSender.java#L50-L54 |
61,390 | VoltDB/voltdb | src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java | JDBC4ResultSet.absolute | @Override
public boolean absolute(int row) throws SQLException {
checkClosed();
if (rowCount == 0) {
if (row == 0) {
return true;
}
return false;
}
if (row == 0) {
beforeFirst();
return true;
}
... | java | @Override
public boolean absolute(int row) throws SQLException {
checkClosed();
if (rowCount == 0) {
if (row == 0) {
return true;
}
return false;
}
if (row == 0) {
beforeFirst();
return true;
}
... | [
"@",
"Override",
"public",
"boolean",
"absolute",
"(",
"int",
"row",
")",
"throws",
"SQLException",
"{",
"checkClosed",
"(",
")",
";",
"if",
"(",
"rowCount",
"==",
"0",
")",
"{",
"if",
"(",
"row",
"==",
"0",
")",
"{",
"return",
"true",
";",
"}",
"r... | Moves the cursor to the given row number in this ResultSet object. | [
"Moves",
"the",
"cursor",
"to",
"the",
"given",
"row",
"number",
"in",
"this",
"ResultSet",
"object",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L99-L141 |
61,391 | VoltDB/voltdb | src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java | JDBC4ResultSet.findColumn | @Override
public int findColumn(String columnLabel) throws SQLException {
checkClosed();
try {
return table.getColumnIndex(columnLabel) + 1;
} catch (IllegalArgumentException iax) {
throw SQLError.get(iax, SQLError.COLUMN_NOT_FOUND, columnLabel);
} catch (Exce... | java | @Override
public int findColumn(String columnLabel) throws SQLException {
checkClosed();
try {
return table.getColumnIndex(columnLabel) + 1;
} catch (IllegalArgumentException iax) {
throw SQLError.get(iax, SQLError.COLUMN_NOT_FOUND, columnLabel);
} catch (Exce... | [
"@",
"Override",
"public",
"int",
"findColumn",
"(",
"String",
"columnLabel",
")",
"throws",
"SQLException",
"{",
"checkClosed",
"(",
")",
";",
"try",
"{",
"return",
"table",
".",
"getColumnIndex",
"(",
"columnLabel",
")",
"+",
"1",
";",
"}",
"catch",
"(",... | Maps the given ResultSet column label to its ResultSet column index. | [
"Maps",
"the",
"given",
"ResultSet",
"column",
"label",
"to",
"its",
"ResultSet",
"column",
"index",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L187-L197 |
61,392 | VoltDB/voltdb | src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java | JDBC4ResultSet.getBigDecimal | @Override
public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
checkColumnBounds(columnIndex);
try {
final VoltType type = table.getColumnType(columnIndex - 1);
BigDecimal decimalValue = null;
switch(type) {
case TINYINT:
... | java | @Override
public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
checkColumnBounds(columnIndex);
try {
final VoltType type = table.getColumnType(columnIndex - 1);
BigDecimal decimalValue = null;
switch(type) {
case TINYINT:
... | [
"@",
"Override",
"public",
"BigDecimal",
"getBigDecimal",
"(",
"int",
"columnIndex",
")",
"throws",
"SQLException",
"{",
"checkColumnBounds",
"(",
"columnIndex",
")",
";",
"try",
"{",
"final",
"VoltType",
"type",
"=",
"table",
".",
"getColumnType",
"(",
"columnI... | ResultSet object as a java.math.BigDecimal with full precision. | [
"ResultSet",
"object",
"as",
"a",
"java",
".",
"math",
".",
"BigDecimal",
"with",
"full",
"precision",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L256-L289 |
61,393 | VoltDB/voltdb | src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java | JDBC4ResultSet.getBinaryStream | @Override
public InputStream getBinaryStream(int columnIndex) throws SQLException {
checkColumnBounds(columnIndex);
try {
return new ByteArrayInputStream(
table.getStringAsBytes(columnIndex - 1));
} catch (Exception x) {
throw SQLError.get(x);
... | java | @Override
public InputStream getBinaryStream(int columnIndex) throws SQLException {
checkColumnBounds(columnIndex);
try {
return new ByteArrayInputStream(
table.getStringAsBytes(columnIndex - 1));
} catch (Exception x) {
throw SQLError.get(x);
... | [
"@",
"Override",
"public",
"InputStream",
"getBinaryStream",
"(",
"int",
"columnIndex",
")",
"throws",
"SQLException",
"{",
"checkColumnBounds",
"(",
"columnIndex",
")",
";",
"try",
"{",
"return",
"new",
"ByteArrayInputStream",
"(",
"table",
".",
"getStringAsBytes",... | ResultSet object as a stream of uninterpreted bytes. | [
"ResultSet",
"object",
"as",
"a",
"stream",
"of",
"uninterpreted",
"bytes",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L317-L326 |
61,394 | VoltDB/voltdb | src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java | JDBC4ResultSet.getBlob | @Override
public Blob getBlob(int columnIndex) throws SQLException {
checkColumnBounds(columnIndex);
try {
return new SerialBlob(table.getStringAsBytes(columnIndex - 1));
} catch (Exception x) {
throw SQLError.get(x);
}
} | java | @Override
public Blob getBlob(int columnIndex) throws SQLException {
checkColumnBounds(columnIndex);
try {
return new SerialBlob(table.getStringAsBytes(columnIndex - 1));
} catch (Exception x) {
throw SQLError.get(x);
}
} | [
"@",
"Override",
"public",
"Blob",
"getBlob",
"(",
"int",
"columnIndex",
")",
"throws",
"SQLException",
"{",
"checkColumnBounds",
"(",
"columnIndex",
")",
";",
"try",
"{",
"return",
"new",
"SerialBlob",
"(",
"table",
".",
"getStringAsBytes",
"(",
"columnIndex",
... | ResultSet object as a Blob object in the Java programming language. | [
"ResultSet",
"object",
"as",
"a",
"Blob",
"object",
"in",
"the",
"Java",
"programming",
"language",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L337-L345 |
61,395 | VoltDB/voltdb | src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java | JDBC4ResultSet.getBoolean | @Override
public boolean getBoolean(int columnIndex) throws SQLException {
checkColumnBounds(columnIndex);
// TODO: Tempting to apply a != 0 operation on numbers and
// .equals("true") on strings, but... hacky
try {
return (new Long(table.getLong(columnIndex - 1))).intVal... | java | @Override
public boolean getBoolean(int columnIndex) throws SQLException {
checkColumnBounds(columnIndex);
// TODO: Tempting to apply a != 0 operation on numbers and
// .equals("true") on strings, but... hacky
try {
return (new Long(table.getLong(columnIndex - 1))).intVal... | [
"@",
"Override",
"public",
"boolean",
"getBoolean",
"(",
"int",
"columnIndex",
")",
"throws",
"SQLException",
"{",
"checkColumnBounds",
"(",
"columnIndex",
")",
";",
"// TODO: Tempting to apply a != 0 operation on numbers and",
"// .equals(\"true\") on strings, but... hacky",
"... | ResultSet object as a boolean in the Java programming language. | [
"ResultSet",
"object",
"as",
"a",
"boolean",
"in",
"the",
"Java",
"programming",
"language",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L396-L406 |
61,396 | VoltDB/voltdb | src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java | JDBC4ResultSet.getByte | @Override
public byte getByte(int columnIndex) throws SQLException {
checkColumnBounds(columnIndex);
try {
Long longValue = getPrivateInteger(columnIndex);
if (longValue > Byte.MAX_VALUE || longValue < Byte.MIN_VALUE) {
throw new SQLException("Value out of byt... | java | @Override
public byte getByte(int columnIndex) throws SQLException {
checkColumnBounds(columnIndex);
try {
Long longValue = getPrivateInteger(columnIndex);
if (longValue > Byte.MAX_VALUE || longValue < Byte.MIN_VALUE) {
throw new SQLException("Value out of byt... | [
"@",
"Override",
"public",
"byte",
"getByte",
"(",
"int",
"columnIndex",
")",
"throws",
"SQLException",
"{",
"checkColumnBounds",
"(",
"columnIndex",
")",
";",
"try",
"{",
"Long",
"longValue",
"=",
"getPrivateInteger",
"(",
"columnIndex",
")",
";",
"if",
"(",
... | ResultSet object as a byte in the Java programming language. | [
"ResultSet",
"object",
"as",
"a",
"byte",
"in",
"the",
"Java",
"programming",
"language",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L417-L429 |
61,397 | VoltDB/voltdb | src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java | JDBC4ResultSet.getBytes | @Override
public byte[] getBytes(int columnIndex) throws SQLException {
checkColumnBounds(columnIndex);
try {
if (table.getColumnType(columnIndex - 1) == VoltType.STRING)
return table.getStringAsBytes(columnIndex - 1);
else if (table.getColumnType(columnIndex ... | java | @Override
public byte[] getBytes(int columnIndex) throws SQLException {
checkColumnBounds(columnIndex);
try {
if (table.getColumnType(columnIndex - 1) == VoltType.STRING)
return table.getStringAsBytes(columnIndex - 1);
else if (table.getColumnType(columnIndex ... | [
"@",
"Override",
"public",
"byte",
"[",
"]",
"getBytes",
"(",
"int",
"columnIndex",
")",
"throws",
"SQLException",
"{",
"checkColumnBounds",
"(",
"columnIndex",
")",
";",
"try",
"{",
"if",
"(",
"table",
".",
"getColumnType",
"(",
"columnIndex",
"-",
"1",
"... | ResultSet object as a byte array in the Java programming language. | [
"ResultSet",
"object",
"as",
"a",
"byte",
"array",
"in",
"the",
"Java",
"programming",
"language",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L440-L456 |
61,398 | VoltDB/voltdb | src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java | JDBC4ResultSet.getClob | @Override
public Clob getClob(int columnIndex) throws SQLException {
checkColumnBounds(columnIndex);
try {
return new SerialClob(table.getString(columnIndex - 1)
.toCharArray());
} catch (Exception x) {
throw SQLError.get(x);
}
} | java | @Override
public Clob getClob(int columnIndex) throws SQLException {
checkColumnBounds(columnIndex);
try {
return new SerialClob(table.getString(columnIndex - 1)
.toCharArray());
} catch (Exception x) {
throw SQLError.get(x);
}
} | [
"@",
"Override",
"public",
"Clob",
"getClob",
"(",
"int",
"columnIndex",
")",
"throws",
"SQLException",
"{",
"checkColumnBounds",
"(",
"columnIndex",
")",
";",
"try",
"{",
"return",
"new",
"SerialClob",
"(",
"table",
".",
"getString",
"(",
"columnIndex",
"-",
... | ResultSet object as a Clob object in the Java programming language. | [
"ResultSet",
"object",
"as",
"a",
"Clob",
"object",
"in",
"the",
"Java",
"programming",
"language",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L489-L498 |
61,399 | VoltDB/voltdb | src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java | JDBC4ResultSet.getFloat | @Override
public float getFloat(int columnIndex) throws SQLException {
checkColumnBounds(columnIndex);
try {
final VoltType type = table.getColumnType(columnIndex - 1);
Double doubleValue = null;
switch(type) {
case TINYINT:
doubleValue... | java | @Override
public float getFloat(int columnIndex) throws SQLException {
checkColumnBounds(columnIndex);
try {
final VoltType type = table.getColumnType(columnIndex - 1);
Double doubleValue = null;
switch(type) {
case TINYINT:
doubleValue... | [
"@",
"Override",
"public",
"float",
"getFloat",
"(",
"int",
"columnIndex",
")",
"throws",
"SQLException",
"{",
"checkColumnBounds",
"(",
"columnIndex",
")",
";",
"try",
"{",
"final",
"VoltType",
"type",
"=",
"table",
".",
"getColumnType",
"(",
"columnIndex",
"... | ResultSet object as a float in the Java programming language. | [
"ResultSet",
"object",
"as",
"a",
"float",
"in",
"the",
"Java",
"programming",
"language",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ResultSet.java#L623-L661 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.