id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
62,300 | VoltDB/voltdb | src/frontend/org/voltdb/VoltTable.java | VoltTable.semiDeepCopy | VoltTable semiDeepCopy() {
assert(verifyTableInvariants());
// share the immutable metadata if it's present for tests
final VoltTable cloned = new VoltTable(m_extraMetadata);
cloned.m_colCount = m_colCount;
cloned.m_rowCount = m_rowCount;
cloned.m_rowStart = m_rowStart;
... | java | VoltTable semiDeepCopy() {
assert(verifyTableInvariants());
// share the immutable metadata if it's present for tests
final VoltTable cloned = new VoltTable(m_extraMetadata);
cloned.m_colCount = m_colCount;
cloned.m_rowCount = m_rowCount;
cloned.m_rowStart = m_rowStart;
... | [
"VoltTable",
"semiDeepCopy",
"(",
")",
"{",
"assert",
"(",
"verifyTableInvariants",
"(",
")",
")",
";",
"// share the immutable metadata if it's present for tests",
"final",
"VoltTable",
"cloned",
"=",
"new",
"VoltTable",
"(",
"m_extraMetadata",
")",
";",
"cloned",
".... | Non-public method to duplicate a table.
It's possible this might be useful to end-users of VoltDB, but we should
talk about naming and semantics first, don't just make this public. | [
"Non",
"-",
"public",
"method",
"to",
"duplicate",
"a",
"table",
".",
"It",
"s",
"possible",
"this",
"might",
"be",
"useful",
"to",
"end",
"-",
"users",
"of",
"VoltDB",
"but",
"we",
"should",
"talk",
"about",
"naming",
"and",
"semantics",
"first",
"don",... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltTable.java#L1942-L1966 |
62,301 | VoltDB/voltdb | src/frontend/org/voltdb/VoltTable.java | VoltTable.getTableSchema | public ColumnInfo[] getTableSchema() {
ColumnInfo[] schema = new ColumnInfo[m_colCount];
for (int i = 0; i < m_colCount; i++) {
ColumnInfo col = new ColumnInfo(getColumnName(i), getColumnType(i));
schema[i] = col;
}
return schema;
} | java | public ColumnInfo[] getTableSchema() {
ColumnInfo[] schema = new ColumnInfo[m_colCount];
for (int i = 0; i < m_colCount; i++) {
ColumnInfo col = new ColumnInfo(getColumnName(i), getColumnType(i));
schema[i] = col;
}
return schema;
} | [
"public",
"ColumnInfo",
"[",
"]",
"getTableSchema",
"(",
")",
"{",
"ColumnInfo",
"[",
"]",
"schema",
"=",
"new",
"ColumnInfo",
"[",
"m_colCount",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"m_colCount",
";",
"i",
"++",
")",
"{",
"Co... | Get the schema of the table. Can be fed into another table's constructor.
@return An ordered array of {@link ColumnInfo} instances for each table column. | [
"Get",
"the",
"schema",
"of",
"the",
"table",
".",
"Can",
"be",
"fed",
"into",
"another",
"table",
"s",
"constructor",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltTable.java#L2193-L2200 |
62,302 | VoltDB/voltdb | src/frontend/org/voltdb/export/processors/GuestProcessor.java | GuestProcessor.checkProcessorConfig | @Override
public void checkProcessorConfig(Properties properties) {
String exportClientClass = properties.getProperty(EXPORT_TO_TYPE);
Preconditions.checkNotNull(exportClientClass, "export to type is undefined or custom export plugin class missing.");
try {
final Class<?> client... | java | @Override
public void checkProcessorConfig(Properties properties) {
String exportClientClass = properties.getProperty(EXPORT_TO_TYPE);
Preconditions.checkNotNull(exportClientClass, "export to type is undefined or custom export plugin class missing.");
try {
final Class<?> client... | [
"@",
"Override",
"public",
"void",
"checkProcessorConfig",
"(",
"Properties",
"properties",
")",
"{",
"String",
"exportClientClass",
"=",
"properties",
".",
"getProperty",
"(",
"EXPORT_TO_TYPE",
")",
";",
"Preconditions",
".",
"checkNotNull",
"(",
"exportClientClass",... | Pass processor specific processor configuration properties for checking | [
"Pass",
"processor",
"specific",
"processor",
"configuration",
"properties",
"for",
"checking"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/processors/GuestProcessor.java#L166-L178 |
62,303 | VoltDB/voltdb | src/frontend/org/voltdb/export/processors/GuestProcessor.java | GuestProcessor.extractCommittedSpHandle | private long extractCommittedSpHandle(ExportRow row, long committedSeqNo) {
long ret = 0;
if (committedSeqNo == ExportDataSource.NULL_COMMITTED_SEQNO) {
return ret;
}
// Get the rows's sequence number (3rd column)
long seqNo = (long) row.values[2];
if (seqNo ... | java | private long extractCommittedSpHandle(ExportRow row, long committedSeqNo) {
long ret = 0;
if (committedSeqNo == ExportDataSource.NULL_COMMITTED_SEQNO) {
return ret;
}
// Get the rows's sequence number (3rd column)
long seqNo = (long) row.values[2];
if (seqNo ... | [
"private",
"long",
"extractCommittedSpHandle",
"(",
"ExportRow",
"row",
",",
"long",
"committedSeqNo",
")",
"{",
"long",
"ret",
"=",
"0",
";",
"if",
"(",
"committedSeqNo",
"==",
"ExportDataSource",
".",
"NULL_COMMITTED_SEQNO",
")",
"{",
"return",
"ret",
";",
"... | If the row is the last committed row, return the SpHandle, otherwise return 0
@param row the export row
@param committedSeqNo the sequence number of the last committed row
@return | [
"If",
"the",
"row",
"is",
"the",
"last",
"committed",
"row",
"return",
"the",
"SpHandle",
"otherwise",
"return",
"0"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/processors/GuestProcessor.java#L506-L521 |
62,304 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/MaterializedViewProcessor.java | MaterializedViewProcessor.processMaterializedViewWarnings | public void processMaterializedViewWarnings(Database db, HashMap<Table, String> matViewMap) throws VoltCompilerException {
for (Table table : db.getTables()) {
for (MaterializedViewInfo mvInfo : table.getViews()) {
for (Statement stmt : mvInfo.getFallbackquerystmts()) {
... | java | public void processMaterializedViewWarnings(Database db, HashMap<Table, String> matViewMap) throws VoltCompilerException {
for (Table table : db.getTables()) {
for (MaterializedViewInfo mvInfo : table.getViews()) {
for (Statement stmt : mvInfo.getFallbackquerystmts()) {
... | [
"public",
"void",
"processMaterializedViewWarnings",
"(",
"Database",
"db",
",",
"HashMap",
"<",
"Table",
",",
"String",
">",
"matViewMap",
")",
"throws",
"VoltCompilerException",
"{",
"for",
"(",
"Table",
"table",
":",
"db",
".",
"getTables",
"(",
")",
")",
... | Process materialized view warnings. | [
"Process",
"materialized",
"view",
"warnings",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/MaterializedViewProcessor.java#L774-L806 |
62,305 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/MaterializedViewProcessor.java | MaterializedViewProcessor.getMaterializedViewInfo | public static MaterializedViewInfo getMaterializedViewInfo(Table tbl) {
MaterializedViewInfo mvInfo = null;
Table source = tbl.getMaterializer();
if (source != null) {
mvInfo = source.getViews().get(tbl.getTypeName());
}
return mvInfo;
} | java | public static MaterializedViewInfo getMaterializedViewInfo(Table tbl) {
MaterializedViewInfo mvInfo = null;
Table source = tbl.getMaterializer();
if (source != null) {
mvInfo = source.getViews().get(tbl.getTypeName());
}
return mvInfo;
} | [
"public",
"static",
"MaterializedViewInfo",
"getMaterializedViewInfo",
"(",
"Table",
"tbl",
")",
"{",
"MaterializedViewInfo",
"mvInfo",
"=",
"null",
";",
"Table",
"source",
"=",
"tbl",
".",
"getMaterializer",
"(",
")",
";",
"if",
"(",
"source",
"!=",
"null",
"... | If the argument table is a single-table materialized view,
then return the attendant MaterializedViewInfo object. Otherwise
return null. | [
"If",
"the",
"argument",
"table",
"is",
"a",
"single",
"-",
"table",
"materialized",
"view",
"then",
"return",
"the",
"attendant",
"MaterializedViewInfo",
"object",
".",
"Otherwise",
"return",
"null",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/MaterializedViewProcessor.java#L1095-L1102 |
62,306 | VoltDB/voltdb | src/frontend/org/voltdb/planner/ActivePlanRepository.java | ActivePlanRepository.getFragmentIdForPlanHash | public static long getFragmentIdForPlanHash(byte[] planHash) {
Sha1Wrapper key = new Sha1Wrapper(planHash);
FragInfo frag = null;
synchronized (FragInfo.class) {
frag = m_plansByHash.get(key);
}
assert(frag != null);
return frag.fragId;
} | java | public static long getFragmentIdForPlanHash(byte[] planHash) {
Sha1Wrapper key = new Sha1Wrapper(planHash);
FragInfo frag = null;
synchronized (FragInfo.class) {
frag = m_plansByHash.get(key);
}
assert(frag != null);
return frag.fragId;
} | [
"public",
"static",
"long",
"getFragmentIdForPlanHash",
"(",
"byte",
"[",
"]",
"planHash",
")",
"{",
"Sha1Wrapper",
"key",
"=",
"new",
"Sha1Wrapper",
"(",
"planHash",
")",
";",
"FragInfo",
"frag",
"=",
"null",
";",
"synchronized",
"(",
"FragInfo",
".",
"clas... | Get the site-local fragment id for a given plan identified by 20-byte sha-1 hash | [
"Get",
"the",
"site",
"-",
"local",
"fragment",
"id",
"for",
"a",
"given",
"plan",
"identified",
"by",
"20",
"-",
"byte",
"sha",
"-",
"1",
"hash"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ActivePlanRepository.java#L68-L76 |
62,307 | VoltDB/voltdb | src/frontend/org/voltdb/planner/ActivePlanRepository.java | ActivePlanRepository.getStmtTextForPlanHash | public static String getStmtTextForPlanHash(byte[] planHash) {
Sha1Wrapper key = new Sha1Wrapper(planHash);
FragInfo frag = null;
synchronized (FragInfo.class) {
frag = m_plansByHash.get(key);
}
assert(frag != null);
// SQL statement text is not stored in the ... | java | public static String getStmtTextForPlanHash(byte[] planHash) {
Sha1Wrapper key = new Sha1Wrapper(planHash);
FragInfo frag = null;
synchronized (FragInfo.class) {
frag = m_plansByHash.get(key);
}
assert(frag != null);
// SQL statement text is not stored in the ... | [
"public",
"static",
"String",
"getStmtTextForPlanHash",
"(",
"byte",
"[",
"]",
"planHash",
")",
"{",
"Sha1Wrapper",
"key",
"=",
"new",
"Sha1Wrapper",
"(",
"planHash",
")",
";",
"FragInfo",
"frag",
"=",
"null",
";",
"synchronized",
"(",
"FragInfo",
".",
"clas... | Get the statement text for the fragment identified by its hash | [
"Get",
"the",
"statement",
"text",
"for",
"the",
"fragment",
"identified",
"by",
"its",
"hash"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ActivePlanRepository.java#L81-L94 |
62,308 | VoltDB/voltdb | src/frontend/org/voltdb/planner/ActivePlanRepository.java | ActivePlanRepository.loadOrAddRefPlanFragment | public static long loadOrAddRefPlanFragment(byte[] planHash, byte[] plan, String stmtText) {
Sha1Wrapper key = new Sha1Wrapper(planHash);
synchronized (FragInfo.class) {
FragInfo frag = m_plansByHash.get(key);
if (frag == null) {
frag = new FragInfo(key, plan, m_n... | java | public static long loadOrAddRefPlanFragment(byte[] planHash, byte[] plan, String stmtText) {
Sha1Wrapper key = new Sha1Wrapper(planHash);
synchronized (FragInfo.class) {
FragInfo frag = m_plansByHash.get(key);
if (frag == null) {
frag = new FragInfo(key, plan, m_n... | [
"public",
"static",
"long",
"loadOrAddRefPlanFragment",
"(",
"byte",
"[",
"]",
"planHash",
",",
"byte",
"[",
"]",
"plan",
",",
"String",
"stmtText",
")",
"{",
"Sha1Wrapper",
"key",
"=",
"new",
"Sha1Wrapper",
"(",
"planHash",
")",
";",
"synchronized",
"(",
... | Get the site-local fragment id for a given plan identified by 20-byte sha-1 hash
If the plan isn't known to this SPC, load it up. Otherwise addref it. | [
"Get",
"the",
"site",
"-",
"local",
"fragment",
"id",
"for",
"a",
"given",
"plan",
"identified",
"by",
"20",
"-",
"byte",
"sha",
"-",
"1",
"hash",
"If",
"the",
"plan",
"isn",
"t",
"known",
"to",
"this",
"SPC",
"load",
"it",
"up",
".",
"Otherwise",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ActivePlanRepository.java#L100-L129 |
62,309 | VoltDB/voltdb | src/frontend/org/voltdb/planner/ActivePlanRepository.java | ActivePlanRepository.planForFragmentId | public static byte[] planForFragmentId(long fragmentId) {
assert(fragmentId > 0);
FragInfo frag = null;
synchronized (FragInfo.class) {
frag = m_plansById.get(fragmentId);
}
assert(frag != null);
return frag.plan;
} | java | public static byte[] planForFragmentId(long fragmentId) {
assert(fragmentId > 0);
FragInfo frag = null;
synchronized (FragInfo.class) {
frag = m_plansById.get(fragmentId);
}
assert(frag != null);
return frag.plan;
} | [
"public",
"static",
"byte",
"[",
"]",
"planForFragmentId",
"(",
"long",
"fragmentId",
")",
"{",
"assert",
"(",
"fragmentId",
">",
"0",
")",
";",
"FragInfo",
"frag",
"=",
"null",
";",
"synchronized",
"(",
"FragInfo",
".",
"class",
")",
"{",
"frag",
"=",
... | Get the full JSON plan associated with a given site-local fragment id.
Called by the EE | [
"Get",
"the",
"full",
"JSON",
"plan",
"associated",
"with",
"a",
"given",
"site",
"-",
"local",
"fragment",
"id",
".",
"Called",
"by",
"the",
"EE"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ActivePlanRepository.java#L231-L240 |
62,310 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/AbstractExpression.java | AbstractExpression.bindingToIndexedExpression | public List<AbstractExpression> bindingToIndexedExpression(
AbstractExpression expr) {
// Defer the result construction for as long as possible on the
// assumption that this function mostly gets applied to eliminate
// negative cases.
if (m_type != expr.m_type) {
... | java | public List<AbstractExpression> bindingToIndexedExpression(
AbstractExpression expr) {
// Defer the result construction for as long as possible on the
// assumption that this function mostly gets applied to eliminate
// negative cases.
if (m_type != expr.m_type) {
... | [
"public",
"List",
"<",
"AbstractExpression",
">",
"bindingToIndexedExpression",
"(",
"AbstractExpression",
"expr",
")",
"{",
"// Defer the result construction for as long as possible on the",
"// assumption that this function mostly gets applied to eliminate",
"// negative cases.",
"if",... | strict expression equality that didn't involve parameters. | [
"strict",
"expression",
"equality",
"that",
"didn",
"t",
"involve",
"parameters",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractExpression.java#L482-L566 |
62,311 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/AbstractExpression.java | AbstractExpression.toJSONArrayFromSortList | public static void toJSONArrayFromSortList(
JSONStringer stringer,
List<AbstractExpression> sortExpressions,
List<SortDirectionType> sortDirections) throws JSONException {
stringer.key(SortMembers.SORT_COLUMNS);
stringer.array();
int listSize = sortExpressions... | java | public static void toJSONArrayFromSortList(
JSONStringer stringer,
List<AbstractExpression> sortExpressions,
List<SortDirectionType> sortDirections) throws JSONException {
stringer.key(SortMembers.SORT_COLUMNS);
stringer.array();
int listSize = sortExpressions... | [
"public",
"static",
"void",
"toJSONArrayFromSortList",
"(",
"JSONStringer",
"stringer",
",",
"List",
"<",
"AbstractExpression",
">",
"sortExpressions",
",",
"List",
"<",
"SortDirectionType",
">",
"sortDirections",
")",
"throws",
"JSONException",
"{",
"stringer",
".",
... | Given a JSONStringer and a sequence of sort expressions and directions,
serialize the sort expressions. These will be in an array which is
the value of SortMembers.SORT_COLUMNS in the current object of
the JSONString. The JSONString should be in object state, not
array state.
@param stringer The stringer use... | [
"Given",
"a",
"JSONStringer",
"and",
"a",
"sequence",
"of",
"sort",
"expressions",
"and",
"directions",
"serialize",
"the",
"sort",
"expressions",
".",
"These",
"will",
"be",
"in",
"an",
"array",
"which",
"is",
"the",
"value",
"of",
"SortMembers",
".",
"SORT... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractExpression.java#L648-L667 |
62,312 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/AbstractExpression.java | AbstractExpression.loadSortListFromJSONArray | public static void loadSortListFromJSONArray(
List<AbstractExpression> sortExpressions,
List<SortDirectionType> sortDirections,
JSONObject jobj) throws JSONException {
if (jobj.has(SortMembers.SORT_COLUMNS)) {
sortExpressions.clear();
if (sortDirection... | java | public static void loadSortListFromJSONArray(
List<AbstractExpression> sortExpressions,
List<SortDirectionType> sortDirections,
JSONObject jobj) throws JSONException {
if (jobj.has(SortMembers.SORT_COLUMNS)) {
sortExpressions.clear();
if (sortDirection... | [
"public",
"static",
"void",
"loadSortListFromJSONArray",
"(",
"List",
"<",
"AbstractExpression",
">",
"sortExpressions",
",",
"List",
"<",
"SortDirectionType",
">",
"sortDirections",
",",
"JSONObject",
"jobj",
")",
"throws",
"JSONException",
"{",
"if",
"(",
"jobj",
... | Load two lists from a JSONObject.
One list is for sort expressions and the other is for sort directions.
The lists are cleared before they are filled in.
This is the inverse of toJSONArrayFromSortList.
The JSONObject should be in object state, not array state.
It should have a member named SORT_COLUMNS,
which is an ar... | [
"Load",
"two",
"lists",
"from",
"a",
"JSONObject",
".",
"One",
"list",
"is",
"for",
"sort",
"expressions",
"and",
"the",
"other",
"is",
"for",
"sort",
"directions",
".",
"The",
"lists",
"are",
"cleared",
"before",
"they",
"are",
"filled",
"in",
".",
"Thi... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractExpression.java#L752-L776 |
62,313 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/AbstractExpression.java | AbstractExpression.loadFromJSONArrayChild | public static List<AbstractExpression> loadFromJSONArrayChild(
List<AbstractExpression> starter,
JSONObject parent,
String label,
StmtTableScan tableScan) throws JSONException {
if (parent.isNull(label)) {
return null;
}
JSONArray jarr... | java | public static List<AbstractExpression> loadFromJSONArrayChild(
List<AbstractExpression> starter,
JSONObject parent,
String label,
StmtTableScan tableScan) throws JSONException {
if (parent.isNull(label)) {
return null;
}
JSONArray jarr... | [
"public",
"static",
"List",
"<",
"AbstractExpression",
">",
"loadFromJSONArrayChild",
"(",
"List",
"<",
"AbstractExpression",
">",
"starter",
",",
"JSONObject",
"parent",
",",
"String",
"label",
",",
"StmtTableScan",
"tableScan",
")",
"throws",
"JSONException",
"{",... | For TVEs, it is only serialized column index and table index.
In order to match expression,
there needs more information to revert back the table name,
table alisa and column name.
By adding @param tableScan, the TVE will load table name,
table alias and column name for TVE.
@param starter
@param parent
@param label
@p... | [
"For",
"TVEs",
"it",
"is",
"only",
"serialized",
"column",
"index",
"and",
"table",
"index",
".",
"In",
"order",
"to",
"match",
"expression",
"there",
"needs",
"more",
"information",
"to",
"revert",
"back",
"the",
"table",
"name",
"table",
"alisa",
"and",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractExpression.java#L812-L823 |
62,314 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/AbstractExpression.java | AbstractExpression.replaceWithTVE | public AbstractExpression replaceWithTVE(
Map<AbstractExpression, Integer> aggTableIndexMap,
Map<Integer, ParsedColInfo> indexToColumnMap) {
Integer ii = aggTableIndexMap.get(this);
if (ii != null) {
ParsedColInfo col = indexToColumnMap.get(ii);
TupleValue... | java | public AbstractExpression replaceWithTVE(
Map<AbstractExpression, Integer> aggTableIndexMap,
Map<Integer, ParsedColInfo> indexToColumnMap) {
Integer ii = aggTableIndexMap.get(this);
if (ii != null) {
ParsedColInfo col = indexToColumnMap.get(ii);
TupleValue... | [
"public",
"AbstractExpression",
"replaceWithTVE",
"(",
"Map",
"<",
"AbstractExpression",
",",
"Integer",
">",
"aggTableIndexMap",
",",
"Map",
"<",
"Integer",
",",
"ParsedColInfo",
">",
"indexToColumnMap",
")",
"{",
"Integer",
"ii",
"=",
"aggTableIndexMap",
".",
"g... | This function recursively replaces any subexpression matching an entry in
aggTableIndexMap with an equivalent TVE.
Its column index and alias are also built up here.
@param aggTableIndexMap
@param indexToColumnMap
@return | [
"This",
"function",
"recursively",
"replaces",
"any",
"subexpression",
"matching",
"an",
"entry",
"in",
"aggTableIndexMap",
"with",
"an",
"equivalent",
"TVE",
".",
"Its",
"column",
"index",
"and",
"alias",
"are",
"also",
"built",
"up",
"here",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractExpression.java#L848-L900 |
62,315 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/AbstractExpression.java | AbstractExpression.hasAnySubexpressionWithPredicate | public boolean hasAnySubexpressionWithPredicate(SubexprFinderPredicate pred) {
if (pred.matches(this)) {
return true;
}
if (m_left != null && m_left.hasAnySubexpressionWithPredicate(pred)) {
return true;
}
if (m_right != null && m_right.hasAnySubexpressi... | java | public boolean hasAnySubexpressionWithPredicate(SubexprFinderPredicate pred) {
if (pred.matches(this)) {
return true;
}
if (m_left != null && m_left.hasAnySubexpressionWithPredicate(pred)) {
return true;
}
if (m_right != null && m_right.hasAnySubexpressi... | [
"public",
"boolean",
"hasAnySubexpressionWithPredicate",
"(",
"SubexprFinderPredicate",
"pred",
")",
"{",
"if",
"(",
"pred",
".",
"matches",
"(",
"this",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"m_left",
"!=",
"null",
"&&",
"m_left",
".",
"ha... | Searches the expression tree rooted at this for nodes for which "pred"
evaluates to true.
@param pred Predicate object instantiated by caller
@return true if the predicate ever returns true, false otherwise | [
"Searches",
"the",
"expression",
"tree",
"rooted",
"at",
"this",
"for",
"nodes",
"for",
"which",
"pred",
"evaluates",
"to",
"true",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractExpression.java#L1061-L1083 |
62,316 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/AbstractExpression.java | AbstractExpression.refineOperandType | void refineOperandType(VoltType valueType) {
if (m_valueType != VoltType.NUMERIC) {
return;
}
if (valueType == VoltType.DECIMAL) {
m_valueType = VoltType.DECIMAL;
m_valueSize = VoltType.DECIMAL.getLengthInBytesForFixedTypes();
}
else {
... | java | void refineOperandType(VoltType valueType) {
if (m_valueType != VoltType.NUMERIC) {
return;
}
if (valueType == VoltType.DECIMAL) {
m_valueType = VoltType.DECIMAL;
m_valueSize = VoltType.DECIMAL.getLengthInBytesForFixedTypes();
}
else {
... | [
"void",
"refineOperandType",
"(",
"VoltType",
"valueType",
")",
"{",
"if",
"(",
"m_valueType",
"!=",
"VoltType",
".",
"NUMERIC",
")",
"{",
"return",
";",
"}",
"if",
"(",
"valueType",
"==",
"VoltType",
".",
"DECIMAL",
")",
"{",
"m_valueType",
"=",
"VoltType... | Helper function to patch up NUMERIC typed constant operands and
the functions and operators that they parameterize. | [
"Helper",
"function",
"to",
"patch",
"up",
"NUMERIC",
"typed",
"constant",
"operands",
"and",
"the",
"functions",
"and",
"operators",
"that",
"they",
"parameterize",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractExpression.java#L1138-L1151 |
62,317 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/AbstractExpression.java | AbstractExpression.finalizeChildValueTypes | protected final void finalizeChildValueTypes() {
if (m_left != null) {
m_left.finalizeValueTypes();
updateContentDeterminismMessage(m_left.getContentDeterminismMessage());
}
if (m_right != null) {
m_right.finalizeValueTypes();
updateContentDetermin... | java | protected final void finalizeChildValueTypes() {
if (m_left != null) {
m_left.finalizeValueTypes();
updateContentDeterminismMessage(m_left.getContentDeterminismMessage());
}
if (m_right != null) {
m_right.finalizeValueTypes();
updateContentDetermin... | [
"protected",
"final",
"void",
"finalizeChildValueTypes",
"(",
")",
"{",
"if",
"(",
"m_left",
"!=",
"null",
")",
"{",
"m_left",
".",
"finalizeValueTypes",
"(",
")",
";",
"updateContentDeterminismMessage",
"(",
"m_left",
".",
"getContentDeterminismMessage",
"(",
")"... | Do the recursive part of finalizeValueTypes as requested. Note that this
updates the content non-determinism state. | [
"Do",
"the",
"recursive",
"part",
"of",
"finalizeValueTypes",
"as",
"requested",
".",
"Note",
"that",
"this",
"updates",
"the",
"content",
"non",
"-",
"determinism",
"state",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractExpression.java#L1216-L1231 |
62,318 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/AbstractExpression.java | AbstractExpression.resolveChildrenForTable | protected final void resolveChildrenForTable(Table table) {
if (m_left != null) {
m_left.resolveForTable(table);
}
if (m_right != null) {
m_right.resolveForTable(table);
}
if (m_args != null) {
for (AbstractExpression argument : m_args) {
... | java | protected final void resolveChildrenForTable(Table table) {
if (m_left != null) {
m_left.resolveForTable(table);
}
if (m_right != null) {
m_right.resolveForTable(table);
}
if (m_args != null) {
for (AbstractExpression argument : m_args) {
... | [
"protected",
"final",
"void",
"resolveChildrenForTable",
"(",
"Table",
"table",
")",
"{",
"if",
"(",
"m_left",
"!=",
"null",
")",
"{",
"m_left",
".",
"resolveForTable",
"(",
"table",
")",
";",
"}",
"if",
"(",
"m_right",
"!=",
"null",
")",
"{",
"m_right",... | Walk the expression tree, resolving TVEs and function
expressions as we go. | [
"Walk",
"the",
"expression",
"tree",
"resolving",
"TVEs",
"and",
"function",
"expressions",
"as",
"we",
"go",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractExpression.java#L1249-L1261 |
62,319 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/AbstractExpression.java | AbstractExpression.isValidExprForIndexesAndMVs | public boolean isValidExprForIndexesAndMVs(StringBuffer msg, boolean isMV) {
if (containsFunctionById(FunctionSQL.voltGetCurrentTimestampId())) {
msg.append("cannot include the function NOW or CURRENT_TIMESTAMP.");
return false;
} else if (hasAnySubexpressionOfClass(AggregateExpr... | java | public boolean isValidExprForIndexesAndMVs(StringBuffer msg, boolean isMV) {
if (containsFunctionById(FunctionSQL.voltGetCurrentTimestampId())) {
msg.append("cannot include the function NOW or CURRENT_TIMESTAMP.");
return false;
} else if (hasAnySubexpressionOfClass(AggregateExpr... | [
"public",
"boolean",
"isValidExprForIndexesAndMVs",
"(",
"StringBuffer",
"msg",
",",
"boolean",
"isMV",
")",
"{",
"if",
"(",
"containsFunctionById",
"(",
"FunctionSQL",
".",
"voltGetCurrentTimestampId",
"(",
")",
")",
")",
"{",
"msg",
".",
"append",
"(",
"\"cann... | Return true if the given expression usable as part of an index or MV's
group by and where clause expression.
If false, put the tail of an error message in the string buffer. The
string buffer will be initialized with the name of the index.
@param expr The expression to check
@param msg The StringBuffer to pack with t... | [
"Return",
"true",
"if",
"the",
"given",
"expression",
"usable",
"as",
"part",
"of",
"an",
"index",
"or",
"MV",
"s",
"group",
"by",
"and",
"where",
"clause",
"expression",
".",
"If",
"false",
"put",
"the",
"tail",
"of",
"an",
"error",
"message",
"in",
"... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractExpression.java#L1301-L1324 |
62,320 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/AbstractExpression.java | AbstractExpression.validateExprsForIndexesAndMVs | public static boolean validateExprsForIndexesAndMVs(List<AbstractExpression> checkList, StringBuffer msg, boolean isMV) {
for (AbstractExpression expr : checkList) {
if (!expr.isValidExprForIndexesAndMVs(msg, isMV)) {
return false;
}
}
return true;
} | java | public static boolean validateExprsForIndexesAndMVs(List<AbstractExpression> checkList, StringBuffer msg, boolean isMV) {
for (AbstractExpression expr : checkList) {
if (!expr.isValidExprForIndexesAndMVs(msg, isMV)) {
return false;
}
}
return true;
} | [
"public",
"static",
"boolean",
"validateExprsForIndexesAndMVs",
"(",
"List",
"<",
"AbstractExpression",
">",
"checkList",
",",
"StringBuffer",
"msg",
",",
"boolean",
"isMV",
")",
"{",
"for",
"(",
"AbstractExpression",
"expr",
":",
"checkList",
")",
"{",
"if",
"(... | Return true if the all of the expressions in the list can be part of
an index expression or in group by and where clause of MV. As with
validateExprForIndexesAndMVs for individual expression, the StringBuffer
parameter, msg, contains the name of the index. Error messages should
be appended to it.
@param checkList
@p... | [
"Return",
"true",
"if",
"the",
"all",
"of",
"the",
"expressions",
"in",
"the",
"list",
"can",
"be",
"part",
"of",
"an",
"index",
"expression",
"or",
"in",
"group",
"by",
"and",
"where",
"clause",
"of",
"MV",
".",
"As",
"with",
"validateExprForIndexesAndMVs... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractExpression.java#L1390-L1397 |
62,321 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/AbstractExpression.java | AbstractExpression.containsFunctionById | private boolean containsFunctionById(int functionId) {
if (this instanceof AbstractValueExpression) {
return false;
}
List<AbstractExpression> functionsList = findAllFunctionSubexpressions();
for (AbstractExpression funcExpr: functionsList) {
assert(funcExpr inst... | java | private boolean containsFunctionById(int functionId) {
if (this instanceof AbstractValueExpression) {
return false;
}
List<AbstractExpression> functionsList = findAllFunctionSubexpressions();
for (AbstractExpression funcExpr: functionsList) {
assert(funcExpr inst... | [
"private",
"boolean",
"containsFunctionById",
"(",
"int",
"functionId",
")",
"{",
"if",
"(",
"this",
"instanceof",
"AbstractValueExpression",
")",
"{",
"return",
"false",
";",
"}",
"List",
"<",
"AbstractExpression",
">",
"functionsList",
"=",
"findAllFunctionSubexpr... | This function will recursively find any function expression with ID functionId.
If found, return true. Otherwise, return false.
@param expr
@param functionId
@return | [
"This",
"function",
"will",
"recursively",
"find",
"any",
"function",
"expression",
"with",
"ID",
"functionId",
".",
"If",
"found",
"return",
"true",
".",
"Otherwise",
"return",
"false",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractExpression.java#L1407-L1421 |
62,322 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/AbstractExpression.java | AbstractExpression.isValueTypeIndexable | public boolean isValueTypeIndexable(StringBuffer msg) {
if (!m_valueType.isIndexable()) {
msg.append("expression of type " + m_valueType.getName());
return false;
}
return true;
} | java | public boolean isValueTypeIndexable(StringBuffer msg) {
if (!m_valueType.isIndexable()) {
msg.append("expression of type " + m_valueType.getName());
return false;
}
return true;
} | [
"public",
"boolean",
"isValueTypeIndexable",
"(",
"StringBuffer",
"msg",
")",
"{",
"if",
"(",
"!",
"m_valueType",
".",
"isIndexable",
"(",
")",
")",
"{",
"msg",
".",
"append",
"(",
"\"expression of type \"",
"+",
"m_valueType",
".",
"getName",
"(",
")",
")",... | Returns true iff the expression is indexable.
If the expression is not indexable, expression information
gets populated in the msg string buffer passed in.
@param msg
@return | [
"Returns",
"true",
"iff",
"the",
"expression",
"is",
"indexable",
".",
"If",
"the",
"expression",
"is",
"not",
"indexable",
"expression",
"information",
"gets",
"populated",
"in",
"the",
"msg",
"string",
"buffer",
"passed",
"in",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractExpression.java#L1435-L1441 |
62,323 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/AbstractExpression.java | AbstractExpression.isValueTypeUniqueIndexable | public boolean isValueTypeUniqueIndexable(StringBuffer msg) {
// This call to isValueTypeIndexable is needed because
// all comparison, all conjunction, and some operator expressions
// need to refine it to compensate for their false claims that
// their value types (actually non-indexab... | java | public boolean isValueTypeUniqueIndexable(StringBuffer msg) {
// This call to isValueTypeIndexable is needed because
// all comparison, all conjunction, and some operator expressions
// need to refine it to compensate for their false claims that
// their value types (actually non-indexab... | [
"public",
"boolean",
"isValueTypeUniqueIndexable",
"(",
"StringBuffer",
"msg",
")",
"{",
"// This call to isValueTypeIndexable is needed because",
"// all comparison, all conjunction, and some operator expressions",
"// need to refine it to compensate for their false claims that",
"// their va... | Returns true iff the expression is indexable in a unique index.
If the expression is not indexable, expression information
gets populated in the msg string buffer passed in.
@param msg
@return | [
"Returns",
"true",
"iff",
"the",
"expression",
"is",
"indexable",
"in",
"a",
"unique",
"index",
".",
"If",
"the",
"expression",
"is",
"not",
"indexable",
"expression",
"information",
"gets",
"populated",
"in",
"the",
"msg",
"string",
"buffer",
"passed",
"in",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractExpression.java#L1450-L1466 |
62,324 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/AbstractExpression.java | AbstractExpression.findUnsafeOperatorsForDDL | public void findUnsafeOperatorsForDDL(UnsafeOperatorsForDDL ops) {
if ( ! m_type.isSafeForDDL()) {
ops.add(m_type.symbol());
}
if (m_left != null) {
m_left.findUnsafeOperatorsForDDL(ops);
}
if (m_right != null) {
m_right.findUnsafeOperatorsForD... | java | public void findUnsafeOperatorsForDDL(UnsafeOperatorsForDDL ops) {
if ( ! m_type.isSafeForDDL()) {
ops.add(m_type.symbol());
}
if (m_left != null) {
m_left.findUnsafeOperatorsForDDL(ops);
}
if (m_right != null) {
m_right.findUnsafeOperatorsForD... | [
"public",
"void",
"findUnsafeOperatorsForDDL",
"(",
"UnsafeOperatorsForDDL",
"ops",
")",
"{",
"if",
"(",
"!",
"m_type",
".",
"isSafeForDDL",
"(",
")",
")",
"{",
"ops",
".",
"add",
"(",
"m_type",
".",
"symbol",
"(",
")",
")",
";",
"}",
"if",
"(",
"m_lef... | Returns true iff this expression is allowable when creating
materialized views on nonempty tables. We have marked all
the ExpressionType enumerals and all the function id integers
which are safe. These are marked statically. So we just
recurse through the tree, looking at operation types and
function types until we ... | [
"Returns",
"true",
"iff",
"this",
"expression",
"is",
"allowable",
"when",
"creating",
"materialized",
"views",
"on",
"nonempty",
"tables",
".",
"We",
"have",
"marked",
"all",
"the",
"ExpressionType",
"enumerals",
"and",
"all",
"the",
"function",
"id",
"integers... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractExpression.java#L1501-L1516 |
62,325 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/AbstractExpression.java | AbstractExpression.getFirstArgument | public AbstractExpression getFirstArgument() {
if (m_left != null) {
assert(m_args == null);
return m_left;
}
if (m_args != null && m_args.size() > 0) {
assert(m_left == null && m_right == null);
return m_args.get(0);
}
return null;... | java | public AbstractExpression getFirstArgument() {
if (m_left != null) {
assert(m_args == null);
return m_left;
}
if (m_args != null && m_args.size() > 0) {
assert(m_left == null && m_right == null);
return m_args.get(0);
}
return null;... | [
"public",
"AbstractExpression",
"getFirstArgument",
"(",
")",
"{",
"if",
"(",
"m_left",
"!=",
"null",
")",
"{",
"assert",
"(",
"m_args",
"==",
"null",
")",
";",
"return",
"m_left",
";",
"}",
"if",
"(",
"m_args",
"!=",
"null",
"&&",
"m_args",
".",
"size... | Ferret out the first argument. This can be m_left or else
the first element of m_args. | [
"Ferret",
"out",
"the",
"first",
"argument",
".",
"This",
"can",
"be",
"m_left",
"or",
"else",
"the",
"first",
"element",
"of",
"m_args",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractExpression.java#L1535-L1545 |
62,326 | VoltDB/voltdb | src/frontend/org/voltdb/client/ConnectionUtil.java | ConnectionUtil.getHashedPassword | public static byte[] getHashedPassword(ClientAuthScheme scheme, String password) {
if (password == null) {
return null;
}
MessageDigest md = null;
try {
md = MessageDigest.getInstance(ClientAuthScheme.getDigestScheme(scheme));
} catch (NoSuchAlgorithmExce... | java | public static byte[] getHashedPassword(ClientAuthScheme scheme, String password) {
if (password == null) {
return null;
}
MessageDigest md = null;
try {
md = MessageDigest.getInstance(ClientAuthScheme.getDigestScheme(scheme));
} catch (NoSuchAlgorithmExce... | [
"public",
"static",
"byte",
"[",
"]",
"getHashedPassword",
"(",
"ClientAuthScheme",
"scheme",
",",
"String",
"password",
")",
"{",
"if",
"(",
"password",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"MessageDigest",
"md",
"=",
"null",
";",
"try",
... | Get a hashed password using SHA-1 in a consistent way.
@param scheme hashing scheme for password.
@param password The password to encode.
@return The bytes of the hashed password. | [
"Get",
"a",
"hashed",
"password",
"using",
"SHA",
"-",
"1",
"in",
"a",
"consistent",
"way",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/ConnectionUtil.java#L223-L238 |
62,327 | VoltDB/voltdb | src/frontend/org/voltdb/client/ConnectionUtil.java | ConnectionUtil.getAuthenticatedConnection | public static Object[] getAuthenticatedConnection(String host, String username,
byte[] hashedPassword, int port,
final Subject subject, ClientAuthScheme scheme,
... | java | public static Object[] getAuthenticatedConnection(String host, String username,
byte[] hashedPassword, int port,
final Subject subject, ClientAuthScheme scheme,
... | [
"public",
"static",
"Object",
"[",
"]",
"getAuthenticatedConnection",
"(",
"String",
"host",
",",
"String",
"username",
",",
"byte",
"[",
"]",
"hashedPassword",
",",
"int",
"port",
",",
"final",
"Subject",
"subject",
",",
"ClientAuthScheme",
"scheme",
",",
"lo... | Create a connection to a Volt server and authenticate the connection.
@param host
@param username
@param hashedPassword
@param port
@param subject
@throws IOException
@returns An array of objects. The first is an
authenticated socket channel, the second. is an array of 4 longs -
Integer hostId, Long connectionId, Long ... | [
"Create",
"a",
"connection",
"to",
"a",
"Volt",
"server",
"and",
"authenticate",
"the",
"connection",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/ConnectionUtil.java#L253-L259 |
62,328 | VoltDB/voltdb | src/frontend/org/voltdb/SnapshotInitiationInfo.java | SnapshotInitiationInfo.getJSONObjectForZK | public JSONObject getJSONObjectForZK() throws JSONException
{
final JSONObject jsObj = new JSONObject();
jsObj.put(SnapshotUtil.JSON_PATH, m_path);
jsObj.put(SnapshotUtil.JSON_PATH_TYPE, m_stype.toString());
jsObj.put(SnapshotUtil.JSON_NONCE, m_nonce);
jsObj.put(SnapshotUtil.... | java | public JSONObject getJSONObjectForZK() throws JSONException
{
final JSONObject jsObj = new JSONObject();
jsObj.put(SnapshotUtil.JSON_PATH, m_path);
jsObj.put(SnapshotUtil.JSON_PATH_TYPE, m_stype.toString());
jsObj.put(SnapshotUtil.JSON_NONCE, m_nonce);
jsObj.put(SnapshotUtil.... | [
"public",
"JSONObject",
"getJSONObjectForZK",
"(",
")",
"throws",
"JSONException",
"{",
"final",
"JSONObject",
"jsObj",
"=",
"new",
"JSONObject",
"(",
")",
";",
"jsObj",
".",
"put",
"(",
"SnapshotUtil",
".",
"JSON_PATH",
",",
"m_path",
")",
";",
"jsObj",
"."... | When we write to ZK to request the snapshot, generate the JSON which will be written to the node's data. | [
"When",
"we",
"write",
"to",
"ZK",
"to",
"request",
"the",
"snapshot",
"generate",
"the",
"JSON",
"which",
"will",
"be",
"written",
"to",
"the",
"node",
"s",
"data",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/SnapshotInitiationInfo.java#L293-L304 |
62,329 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogSizing.java | CatalogSizing.getCatalogSizes | public static DatabaseSizes getCatalogSizes(Database dbCatalog, boolean isXDCR) {
DatabaseSizes dbSizes = new DatabaseSizes();
for (Table table: dbCatalog.getTables()) {
dbSizes.addTable(getTableSize(table, isXDCR));
}
return dbSizes;
} | java | public static DatabaseSizes getCatalogSizes(Database dbCatalog, boolean isXDCR) {
DatabaseSizes dbSizes = new DatabaseSizes();
for (Table table: dbCatalog.getTables()) {
dbSizes.addTable(getTableSize(table, isXDCR));
}
return dbSizes;
} | [
"public",
"static",
"DatabaseSizes",
"getCatalogSizes",
"(",
"Database",
"dbCatalog",
",",
"boolean",
"isXDCR",
")",
"{",
"DatabaseSizes",
"dbSizes",
"=",
"new",
"DatabaseSizes",
"(",
")",
";",
"for",
"(",
"Table",
"table",
":",
"dbCatalog",
".",
"getTables",
... | Produce a sizing of all significant database objects.
@param dbCatalog database catalog
@param isXDCR Is XDCR enabled
@return database size result object tree | [
"Produce",
"a",
"sizing",
"of",
"all",
"significant",
"database",
"objects",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogSizing.java#L394-L400 |
62,330 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/tar/TarGenerator.java | TarGenerator.main | static public void main(String[] sa)
throws IOException, TarMalformatException {
if (sa.length < 1) {
System.out.println(RB.singleton.getString(RB.TARGENERATOR_SYNTAX,
DbBackup.class.getName()));
System.exit(0);
}
TarGenerator generator = new Tar... | java | static public void main(String[] sa)
throws IOException, TarMalformatException {
if (sa.length < 1) {
System.out.println(RB.singleton.getString(RB.TARGENERATOR_SYNTAX,
DbBackup.class.getName()));
System.exit(0);
}
TarGenerator generator = new Tar... | [
"static",
"public",
"void",
"main",
"(",
"String",
"[",
"]",
"sa",
")",
"throws",
"IOException",
",",
"TarMalformatException",
"{",
"if",
"(",
"sa",
".",
"length",
"<",
"1",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"RB",
".",
"singleton",
... | Creates specified tar file to contain specified files, or stdin,
using default blocks-per-record and replacing tar file if it already
exists. | [
"Creates",
"specified",
"tar",
"file",
"to",
"contain",
"specified",
"files",
"or",
"stdin",
"using",
"default",
"blocks",
"-",
"per",
"-",
"record",
"and",
"replacing",
"tar",
"file",
"if",
"it",
"already",
"exists",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/tar/TarGenerator.java#L60-L80 |
62,331 | VoltDB/voltdb | src/frontend/org/voltdb/client/ClientUtils.java | ClientUtils.fileToBytes | public static byte[] fileToBytes(File path) throws IOException {
FileInputStream fin = new FileInputStream(path);
byte[] buffer = new byte[(int) fin.getChannel().size()];
try {
if (fin.read(buffer) == -1) {
throw new IOException("File " + path.getAbsolutePath() + " is... | java | public static byte[] fileToBytes(File path) throws IOException {
FileInputStream fin = new FileInputStream(path);
byte[] buffer = new byte[(int) fin.getChannel().size()];
try {
if (fin.read(buffer) == -1) {
throw new IOException("File " + path.getAbsolutePath() + " is... | [
"public",
"static",
"byte",
"[",
"]",
"fileToBytes",
"(",
"File",
"path",
")",
"throws",
"IOException",
"{",
"FileInputStream",
"fin",
"=",
"new",
"FileInputStream",
"(",
"path",
")",
";",
"byte",
"[",
"]",
"buffer",
"=",
"new",
"byte",
"[",
"(",
"int",
... | Serialize a file into bytes. Used to serialize catalog and deployment
file for UpdateApplicationCatalog on the client.
@param path
@return a byte array of the file
@throws IOException
If there are errors reading the file | [
"Serialize",
"a",
"file",
"into",
"bytes",
".",
"Used",
"to",
"serialize",
"catalog",
"and",
"deployment",
"file",
"for",
"UpdateApplicationCatalog",
"on",
"the",
"client",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/ClientUtils.java#L65-L76 |
62,332 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/NibbleDeleteMP.java | NibbleDeleteMP.run | public VoltTable run(SystemProcedureExecutionContext ctx,
String tableName, String columnName,
String compStr, VoltTable parameter, long chunksize)
{
return nibbleDeleteCommon(ctx,
tableName,
... | java | public VoltTable run(SystemProcedureExecutionContext ctx,
String tableName, String columnName,
String compStr, VoltTable parameter, long chunksize)
{
return nibbleDeleteCommon(ctx,
tableName,
... | [
"public",
"VoltTable",
"run",
"(",
"SystemProcedureExecutionContext",
"ctx",
",",
"String",
"tableName",
",",
"String",
"columnName",
",",
"String",
"compStr",
",",
"VoltTable",
"parameter",
",",
"long",
"chunksize",
")",
"{",
"return",
"nibbleDeleteCommon",
"(",
... | Nibble delete procedure for replicated tables
@param ctx Internal API provided to all system procedures
@param tableName Name of persistent partitioned table
@param columnName A column in the given table that its value can be used to provide
order for delete action. (Unique or non-unique) index is expected
... | [
"Nibble",
"delete",
"procedure",
"for",
"replicated",
"tables"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/NibbleDeleteMP.java#L38-L49 |
62,333 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CSVTableSaveFile.java | CSVTableSaveFile.read | public byte[] read() throws IOException {
if (m_exception.get() != null) {
throw m_exception.get();
}
byte bytes[] = null;
if (m_activeConverters.get() == 0) {
bytes = m_available.poll();
} else {
try {
bytes = m_available.take... | java | public byte[] read() throws IOException {
if (m_exception.get() != null) {
throw m_exception.get();
}
byte bytes[] = null;
if (m_activeConverters.get() == 0) {
bytes = m_available.poll();
} else {
try {
bytes = m_available.take... | [
"public",
"byte",
"[",
"]",
"read",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"m_exception",
".",
"get",
"(",
")",
"!=",
"null",
")",
"{",
"throw",
"m_exception",
".",
"get",
"(",
")",
";",
"}",
"byte",
"bytes",
"[",
"]",
"=",
"null",
";... | Returns a more CSV data in UTF-8 format. Returns null when there is no
more data. May block.
@return null if there is no more data or a byte array contain some number
of complete CSV lines
@throws IOException | [
"Returns",
"a",
"more",
"CSV",
"data",
"in",
"UTF",
"-",
"8",
"format",
".",
"Returns",
"null",
"when",
"there",
"is",
"no",
"more",
"data",
".",
"May",
"block",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CSVTableSaveFile.java#L68-L87 |
62,334 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/VoltCompiler.java | VoltCompiler.compileFromDDL | public boolean compileFromDDL(final String jarOutputPath, final String... ddlFilePaths) {
if (ddlFilePaths.length == 0) {
compilerLog.error("At least one DDL file is required.");
return false;
}
List<VoltCompilerReader> ddlReaderList;
try {
ddlReaderLi... | java | public boolean compileFromDDL(final String jarOutputPath, final String... ddlFilePaths) {
if (ddlFilePaths.length == 0) {
compilerLog.error("At least one DDL file is required.");
return false;
}
List<VoltCompilerReader> ddlReaderList;
try {
ddlReaderLi... | [
"public",
"boolean",
"compileFromDDL",
"(",
"final",
"String",
"jarOutputPath",
",",
"final",
"String",
"...",
"ddlFilePaths",
")",
"{",
"if",
"(",
"ddlFilePaths",
".",
"length",
"==",
"0",
")",
"{",
"compilerLog",
".",
"error",
"(",
"\"At least one DDL file is ... | Compile from a set of DDL files.
@param jarOutputPath The location to put the finished JAR to.
@param ddlFilePaths The array of DDL files to compile (at least one is required).
@return true if successful
@throws VoltCompilerException | [
"Compile",
"from",
"a",
"set",
"of",
"DDL",
"files",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltCompiler.java#L514-L528 |
62,335 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/VoltCompiler.java | VoltCompiler.compileDDLString | public boolean compileDDLString(String ddl, String jarPath) {
final File schemaFile = VoltProjectBuilder.writeStringToTempFile(ddl);
schemaFile.deleteOnExit();
final String schemaPath = schemaFile.getPath();
return compileFromDDL(jarPath, schemaPath);
} | java | public boolean compileDDLString(String ddl, String jarPath) {
final File schemaFile = VoltProjectBuilder.writeStringToTempFile(ddl);
schemaFile.deleteOnExit();
final String schemaPath = schemaFile.getPath();
return compileFromDDL(jarPath, schemaPath);
} | [
"public",
"boolean",
"compileDDLString",
"(",
"String",
"ddl",
",",
"String",
"jarPath",
")",
"{",
"final",
"File",
"schemaFile",
"=",
"VoltProjectBuilder",
".",
"writeStringToTempFile",
"(",
"ddl",
")",
";",
"schemaFile",
".",
"deleteOnExit",
"(",
")",
";",
"... | Compile from DDL in a single string
@param ddl The inline DDL text
@param jarPath The location to put the finished JAR to.
@return true if successful
@throws VoltCompilerException | [
"Compile",
"from",
"DDL",
"in",
"a",
"single",
"string"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltCompiler.java#L599-L605 |
62,336 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/VoltCompiler.java | VoltCompiler.compileEmptyCatalog | public boolean compileEmptyCatalog(final String jarOutputPath) {
// Use a special DDL reader to provide the contents.
List<VoltCompilerReader> ddlReaderList = new ArrayList<>(1);
ddlReaderList.add(new VoltCompilerStringReader("ddl.sql", m_emptyDDLComment));
// Seed it with the DDL so tha... | java | public boolean compileEmptyCatalog(final String jarOutputPath) {
// Use a special DDL reader to provide the contents.
List<VoltCompilerReader> ddlReaderList = new ArrayList<>(1);
ddlReaderList.add(new VoltCompilerStringReader("ddl.sql", m_emptyDDLComment));
// Seed it with the DDL so tha... | [
"public",
"boolean",
"compileEmptyCatalog",
"(",
"final",
"String",
"jarOutputPath",
")",
"{",
"// Use a special DDL reader to provide the contents.",
"List",
"<",
"VoltCompilerReader",
">",
"ddlReaderList",
"=",
"new",
"ArrayList",
"<>",
"(",
"1",
")",
";",
"ddlReaderL... | Compile empty catalog jar
@param jarOutputPath output jar path
@return true if successful | [
"Compile",
"empty",
"catalog",
"jar"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltCompiler.java#L612-L627 |
62,337 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/VoltCompiler.java | VoltCompiler.debugVerifyCatalog | private void debugVerifyCatalog(InMemoryJarfile origJarFile, Catalog origCatalog)
{
final VoltCompiler autoGenCompiler = new VoltCompiler(m_isXDCR);
// Make the new compiler use the original jarfile's classloader so it can
// pull in the class files for procedures and imports
autoGen... | java | private void debugVerifyCatalog(InMemoryJarfile origJarFile, Catalog origCatalog)
{
final VoltCompiler autoGenCompiler = new VoltCompiler(m_isXDCR);
// Make the new compiler use the original jarfile's classloader so it can
// pull in the class files for procedures and imports
autoGen... | [
"private",
"void",
"debugVerifyCatalog",
"(",
"InMemoryJarfile",
"origJarFile",
",",
"Catalog",
"origCatalog",
")",
"{",
"final",
"VoltCompiler",
"autoGenCompiler",
"=",
"new",
"VoltCompiler",
"(",
"m_isXDCR",
")",
";",
"// Make the new compiler use the original jarfile's c... | Internal method that takes the generated DDL from the catalog and builds a new catalog.
The generated catalog is diffed with the original catalog to verify compilation and
catalog generation consistency. | [
"Internal",
"method",
"that",
"takes",
"the",
"generated",
"DDL",
"from",
"the",
"catalog",
"and",
"builds",
"a",
"new",
"catalog",
".",
"The",
"generated",
"catalog",
"is",
"diffed",
"with",
"the",
"original",
"catalog",
"to",
"verify",
"compilation",
"and",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltCompiler.java#L647-L695 |
62,338 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/VoltCompiler.java | VoltCompiler.replayFailedCatalogRebuildUnderDebug | private Catalog replayFailedCatalogRebuildUnderDebug(
VoltCompiler autoGenCompiler,
List<VoltCompilerReader> autogenReaderList,
InMemoryJarfile autoGenJarOutput)
{
// Be sure to set RETRY_FAILED_CATALOG_REBUILD_UNDER_DEBUG = true to enable
// this last ditch retry... | java | private Catalog replayFailedCatalogRebuildUnderDebug(
VoltCompiler autoGenCompiler,
List<VoltCompilerReader> autogenReaderList,
InMemoryJarfile autoGenJarOutput)
{
// Be sure to set RETRY_FAILED_CATALOG_REBUILD_UNDER_DEBUG = true to enable
// this last ditch retry... | [
"private",
"Catalog",
"replayFailedCatalogRebuildUnderDebug",
"(",
"VoltCompiler",
"autoGenCompiler",
",",
"List",
"<",
"VoltCompilerReader",
">",
"autogenReaderList",
",",
"InMemoryJarfile",
"autoGenJarOutput",
")",
"{",
"// Be sure to set RETRY_FAILED_CATALOG_REBUILD_UNDER_DEBUG ... | Take two steps back to retry and potentially debug a catalog rebuild
that generated an unintended change. This code is PURPOSELY redundant
with the mainline call in debugVerifyCatalog above.
Keep the two calls in synch and only redirect through this function
in the post-mortem replay after the other call created a flaw... | [
"Take",
"two",
"steps",
"back",
"to",
"retry",
"and",
"potentially",
"debug",
"a",
"catalog",
"rebuild",
"that",
"generated",
"an",
"unintended",
"change",
".",
"This",
"code",
"is",
"PURPOSELY",
"redundant",
"with",
"the",
"mainline",
"call",
"in",
"debugVeri... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltCompiler.java#L703-L717 |
62,339 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/VoltCompiler.java | VoltCompiler.getExplainPlans | HashMap<String, byte[]> getExplainPlans(Catalog catalog) {
HashMap<String, byte[]> retval = new HashMap<>();
Database db = getCatalogDatabase(m_catalog);
assert(db != null);
for (Procedure proc : db.getProcedures()) {
for (Statement stmt : proc.getStatements()) {
... | java | HashMap<String, byte[]> getExplainPlans(Catalog catalog) {
HashMap<String, byte[]> retval = new HashMap<>();
Database db = getCatalogDatabase(m_catalog);
assert(db != null);
for (Procedure proc : db.getProcedures()) {
for (Statement stmt : proc.getStatements()) {
... | [
"HashMap",
"<",
"String",
",",
"byte",
"[",
"]",
">",
"getExplainPlans",
"(",
"Catalog",
"catalog",
")",
"{",
"HashMap",
"<",
"String",
",",
"byte",
"[",
"]",
">",
"retval",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"Database",
"db",
"=",
"getCatal... | Get textual explain plan info for each plan from the
catalog to be shoved into the catalog jarfile. | [
"Get",
"textual",
"explain",
"plan",
"info",
"for",
"each",
"plan",
"from",
"the",
"catalog",
"to",
"be",
"shoved",
"into",
"the",
"catalog",
"jarfile",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltCompiler.java#L872-L887 |
62,340 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/VoltCompiler.java | VoltCompiler.compileCatalogInternal | private Catalog compileCatalogInternal(
final VoltCompilerReader cannonicalDDLIfAny,
final Catalog previousCatalogIfAny,
final List<VoltCompilerReader> ddlReaderList,
final InMemoryJarfile jarOutput)
{
m_catalog = new Catalog();
// Initialize the catal... | java | private Catalog compileCatalogInternal(
final VoltCompilerReader cannonicalDDLIfAny,
final Catalog previousCatalogIfAny,
final List<VoltCompilerReader> ddlReaderList,
final InMemoryJarfile jarOutput)
{
m_catalog = new Catalog();
// Initialize the catal... | [
"private",
"Catalog",
"compileCatalogInternal",
"(",
"final",
"VoltCompilerReader",
"cannonicalDDLIfAny",
",",
"final",
"Catalog",
"previousCatalogIfAny",
",",
"final",
"List",
"<",
"VoltCompilerReader",
">",
"ddlReaderList",
",",
"final",
"InMemoryJarfile",
"jarOutput",
... | Internal method for compiling the catalog.
@param database catalog-related info parsed from a project file
@param ddlReaderList Reader objects for ddl files.
@param jarOutput The in-memory jar to populate or null if the caller doesn't provide one.
@return true if successful | [
"Internal",
"method",
"for",
"compiling",
"the",
"catalog",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltCompiler.java#L932-L961 |
62,341 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/VoltCompiler.java | VoltCompiler.addExtraClasses | private void addExtraClasses(final InMemoryJarfile jarOutput) throws VoltCompilerException {
List<String> addedClasses = new ArrayList<>();
for (String className : m_addedClasses) {
/*
* Only add the class if it isn't already in the output jar.
* The jar will be p... | java | private void addExtraClasses(final InMemoryJarfile jarOutput) throws VoltCompilerException {
List<String> addedClasses = new ArrayList<>();
for (String className : m_addedClasses) {
/*
* Only add the class if it isn't already in the output jar.
* The jar will be p... | [
"private",
"void",
"addExtraClasses",
"(",
"final",
"InMemoryJarfile",
"jarOutput",
")",
"throws",
"VoltCompilerException",
"{",
"List",
"<",
"String",
">",
"addedClasses",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"String",
"className",
":",
"... | Once the DDL file is over, take all of the extra classes found and add them to the jar. | [
"Once",
"the",
"DDL",
"file",
"is",
"over",
"take",
"all",
"of",
"the",
"extra",
"classes",
"found",
"and",
"add",
"them",
"to",
"the",
"jar",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltCompiler.java#L1215-L1243 |
62,342 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/VoltCompiler.java | VoltCompiler.harvestCapturedDetail | public List<String> harvestCapturedDetail() {
List<String> harvested = m_capturedDiagnosticDetail;
m_capturedDiagnosticDetail = null;
return harvested;
} | java | public List<String> harvestCapturedDetail() {
List<String> harvested = m_capturedDiagnosticDetail;
m_capturedDiagnosticDetail = null;
return harvested;
} | [
"public",
"List",
"<",
"String",
">",
"harvestCapturedDetail",
"(",
")",
"{",
"List",
"<",
"String",
">",
"harvested",
"=",
"m_capturedDiagnosticDetail",
";",
"m_capturedDiagnosticDetail",
"=",
"null",
";",
"return",
"harvested",
";",
"}"
] | Access recent plan output, for diagnostic purposes | [
"Access",
"recent",
"plan",
"output",
"for",
"diagnostic",
"purposes"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltCompiler.java#L1321-L1325 |
62,343 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/VoltCompiler.java | VoltCompiler.getKeyPrefix | String getKeyPrefix(StatementPartitioning partitioning, DeterminismMode detMode, String joinOrder) {
// no caching for inferred yet
if (partitioning.isInferred()) {
return null;
}
String joinOrderPrefix = "#";
if (joinOrder != null) {
joinOrderPrefix += j... | java | String getKeyPrefix(StatementPartitioning partitioning, DeterminismMode detMode, String joinOrder) {
// no caching for inferred yet
if (partitioning.isInferred()) {
return null;
}
String joinOrderPrefix = "#";
if (joinOrder != null) {
joinOrderPrefix += j... | [
"String",
"getKeyPrefix",
"(",
"StatementPartitioning",
"partitioning",
",",
"DeterminismMode",
"detMode",
",",
"String",
"joinOrder",
")",
"{",
"// no caching for inferred yet",
"if",
"(",
"partitioning",
".",
"isInferred",
"(",
")",
")",
"{",
"return",
"null",
";"... | Key prefix includes attributes that make a cached statement usable if they match
For example, if the SQL is the same, but the partitioning isn't, then the statements
aren't actually interchangeable. | [
"Key",
"prefix",
"includes",
"attributes",
"that",
"make",
"a",
"cached",
"statement",
"usable",
"if",
"they",
"match"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltCompiler.java#L2266-L2280 |
62,344 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/VoltCompiler.java | VoltCompiler.getCachedStatement | Statement getCachedStatement(String keyPrefix, String sql) {
String key = keyPrefix + sql;
Statement candidate = m_previousCatalogStmts.get(key);
if (candidate == null) {
++m_stmtCacheMisses;
return null;
}
// check that no underlying tables have been mo... | java | Statement getCachedStatement(String keyPrefix, String sql) {
String key = keyPrefix + sql;
Statement candidate = m_previousCatalogStmts.get(key);
if (candidate == null) {
++m_stmtCacheMisses;
return null;
}
// check that no underlying tables have been mo... | [
"Statement",
"getCachedStatement",
"(",
"String",
"keyPrefix",
",",
"String",
"sql",
")",
"{",
"String",
"key",
"=",
"keyPrefix",
"+",
"sql",
";",
"Statement",
"candidate",
"=",
"m_previousCatalogStmts",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"candidat... | Look for a match from the previous catalog that matches the key + sql | [
"Look",
"for",
"a",
"match",
"from",
"the",
"previous",
"catalog",
"that",
"matches",
"the",
"key",
"+",
"sql"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltCompiler.java#L2292-L2321 |
62,345 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/HashRangeExpressionBuilder.java | HashRangeExpressionBuilder.put | public HashRangeExpressionBuilder put(Integer value1, Integer value2) {
m_builder.put(value1, value2);
return this;
} | java | public HashRangeExpressionBuilder put(Integer value1, Integer value2) {
m_builder.put(value1, value2);
return this;
} | [
"public",
"HashRangeExpressionBuilder",
"put",
"(",
"Integer",
"value1",
",",
"Integer",
"value2",
")",
"{",
"m_builder",
".",
"put",
"(",
"value1",
",",
"value2",
")",
";",
"return",
"this",
";",
"}"
] | Add a value pair.
@param value1
@param value2 | [
"Add",
"a",
"value",
"pair",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/HashRangeExpressionBuilder.java#L41-L44 |
62,346 | VoltDB/voltdb | src/frontend/org/voltdb/expressions/HashRangeExpressionBuilder.java | HashRangeExpressionBuilder.build | public HashRangeExpression build(Integer hashColumnIndex) {
Map<Integer, Integer> ranges = m_builder.build();
HashRangeExpression predicate = new HashRangeExpression();
predicate.setRanges(ranges);
predicate.setHashColumnIndex(hashColumnIndex);
return predicate;
} | java | public HashRangeExpression build(Integer hashColumnIndex) {
Map<Integer, Integer> ranges = m_builder.build();
HashRangeExpression predicate = new HashRangeExpression();
predicate.setRanges(ranges);
predicate.setHashColumnIndex(hashColumnIndex);
return predicate;
} | [
"public",
"HashRangeExpression",
"build",
"(",
"Integer",
"hashColumnIndex",
")",
"{",
"Map",
"<",
"Integer",
",",
"Integer",
">",
"ranges",
"=",
"m_builder",
".",
"build",
"(",
")",
";",
"HashRangeExpression",
"predicate",
"=",
"new",
"HashRangeExpression",
"("... | Generate a hash range expression.
@return hash range expression | [
"Generate",
"a",
"hash",
"range",
"expression",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/HashRangeExpressionBuilder.java#L50-L56 |
62,347 | VoltDB/voltdb | src/frontend/org/voltcore/agreement/RestrictedPriorityQueue.java | RestrictedPriorityQueue.poll | @Override
public OrderableTransaction poll() {
OrderableTransaction retval = null;
updateQueueState();
if (m_state == QueueState.UNBLOCKED) {
retval = super.peek();
super.poll();
// not BLOCKED_EMPTY
assert(retval != null);
}
re... | java | @Override
public OrderableTransaction poll() {
OrderableTransaction retval = null;
updateQueueState();
if (m_state == QueueState.UNBLOCKED) {
retval = super.peek();
super.poll();
// not BLOCKED_EMPTY
assert(retval != null);
}
re... | [
"@",
"Override",
"public",
"OrderableTransaction",
"poll",
"(",
")",
"{",
"OrderableTransaction",
"retval",
"=",
"null",
";",
"updateQueueState",
"(",
")",
";",
"if",
"(",
"m_state",
"==",
"QueueState",
".",
"UNBLOCKED",
")",
"{",
"retval",
"=",
"super",
"."... | Only return transaction state objects that are ready to run. | [
"Only",
"return",
"transaction",
"state",
"objects",
"that",
"are",
"ready",
"to",
"run",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/RestrictedPriorityQueue.java#L93-L104 |
62,348 | VoltDB/voltdb | src/frontend/org/voltcore/agreement/RestrictedPriorityQueue.java | RestrictedPriorityQueue.add | @Override
public boolean add(OrderableTransaction txnState) {
if (m_initiatorData.containsKey(txnState.initiatorHSId) == false) {
return false;
}
boolean retval = super.add(txnState);
// update the queue state
if (retval) updateQueueState();
return retval;... | java | @Override
public boolean add(OrderableTransaction txnState) {
if (m_initiatorData.containsKey(txnState.initiatorHSId) == false) {
return false;
}
boolean retval = super.add(txnState);
// update the queue state
if (retval) updateQueueState();
return retval;... | [
"@",
"Override",
"public",
"boolean",
"add",
"(",
"OrderableTransaction",
"txnState",
")",
"{",
"if",
"(",
"m_initiatorData",
".",
"containsKey",
"(",
"txnState",
".",
"initiatorHSId",
")",
"==",
"false",
")",
"{",
"return",
"false",
";",
"}",
"boolean",
"re... | Drop data for unknown initiators. This is the only valid add interface. | [
"Drop",
"data",
"for",
"unknown",
"initiators",
".",
"This",
"is",
"the",
"only",
"valid",
"add",
"interface",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/RestrictedPriorityQueue.java#L124-L133 |
62,349 | VoltDB/voltdb | src/frontend/org/voltcore/agreement/RestrictedPriorityQueue.java | RestrictedPriorityQueue.noteTransactionRecievedAndReturnLastSeen | public long noteTransactionRecievedAndReturnLastSeen(long initiatorHSId, long txnId,
long lastSafeTxnIdFromInitiator)
{
// System.out.printf("Site %d got heartbeat message from initiator %d with txnid/safeid: %d/%d\n",
// m_siteId, initiatorSiteId, txnId, lastSafeTxnIdF... | java | public long noteTransactionRecievedAndReturnLastSeen(long initiatorHSId, long txnId,
long lastSafeTxnIdFromInitiator)
{
// System.out.printf("Site %d got heartbeat message from initiator %d with txnid/safeid: %d/%d\n",
// m_siteId, initiatorSiteId, txnId, lastSafeTxnIdF... | [
"public",
"long",
"noteTransactionRecievedAndReturnLastSeen",
"(",
"long",
"initiatorHSId",
",",
"long",
"txnId",
",",
"long",
"lastSafeTxnIdFromInitiator",
")",
"{",
"// System.out.printf(\"Site %d got heartbeat message from initiator %d with txnid/safeid: %d/%d\\n\",",
"// ... | Update the information stored about the latest transaction
seen from each initiator. Compute the newest safe transaction id. | [
"Update",
"the",
"information",
"stored",
"about",
"the",
"latest",
"transaction",
"seen",
"from",
"each",
"initiator",
".",
"Compute",
"the",
"newest",
"safe",
"transaction",
"id",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/RestrictedPriorityQueue.java#L146-L188 |
62,350 | VoltDB/voltdb | src/frontend/org/voltcore/agreement/RestrictedPriorityQueue.java | RestrictedPriorityQueue.gotFaultForInitiator | public void gotFaultForInitiator(long initiatorId) {
// calculate the next minimum transaction w/o our dead friend
noteTransactionRecievedAndReturnLastSeen(initiatorId, Long.MAX_VALUE, DtxnConstants.DUMMY_LAST_SEEN_TXN_ID);
// remove initiator from minimum. txnid scoreboard
LastInitiato... | java | public void gotFaultForInitiator(long initiatorId) {
// calculate the next minimum transaction w/o our dead friend
noteTransactionRecievedAndReturnLastSeen(initiatorId, Long.MAX_VALUE, DtxnConstants.DUMMY_LAST_SEEN_TXN_ID);
// remove initiator from minimum. txnid scoreboard
LastInitiato... | [
"public",
"void",
"gotFaultForInitiator",
"(",
"long",
"initiatorId",
")",
"{",
"// calculate the next minimum transaction w/o our dead friend",
"noteTransactionRecievedAndReturnLastSeen",
"(",
"initiatorId",
",",
"Long",
".",
"MAX_VALUE",
",",
"DtxnConstants",
".",
"DUMMY_LAST... | Remove all pending transactions from the specified initiator
and do not require heartbeats from that initiator to proceed.
@param initiatorId id of the failed initiator. | [
"Remove",
"all",
"pending",
"transactions",
"from",
"the",
"specified",
"initiator",
"and",
"do",
"not",
"require",
"heartbeats",
"from",
"that",
"initiator",
"to",
"proceed",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/RestrictedPriorityQueue.java#L195-L202 |
62,351 | VoltDB/voltdb | src/frontend/org/voltcore/agreement/RestrictedPriorityQueue.java | RestrictedPriorityQueue.ensureInitiatorIsKnown | public int ensureInitiatorIsKnown(long initiatorId) {
int newInitiatorCount = 0;
if (m_initiatorData.get(initiatorId) == null) {
m_initiatorData.put(initiatorId, new LastInitiatorData());
newInitiatorCount++;
}
return newInitiatorCount;
} | java | public int ensureInitiatorIsKnown(long initiatorId) {
int newInitiatorCount = 0;
if (m_initiatorData.get(initiatorId) == null) {
m_initiatorData.put(initiatorId, new LastInitiatorData());
newInitiatorCount++;
}
return newInitiatorCount;
} | [
"public",
"int",
"ensureInitiatorIsKnown",
"(",
"long",
"initiatorId",
")",
"{",
"int",
"newInitiatorCount",
"=",
"0",
";",
"if",
"(",
"m_initiatorData",
".",
"get",
"(",
"initiatorId",
")",
"==",
"null",
")",
"{",
"m_initiatorData",
".",
"put",
"(",
"initia... | After a catalog change, double check that all initators in the catalog
that are known to be "up" are here, in the RPQ's list.
@param initiatorId Initiator present in the catalog.
@return The number of initiators that weren't known | [
"After",
"a",
"catalog",
"change",
"double",
"check",
"that",
"all",
"initators",
"in",
"the",
"catalog",
"that",
"are",
"known",
"to",
"be",
"up",
"are",
"here",
"in",
"the",
"RPQ",
"s",
"list",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/RestrictedPriorityQueue.java#L214-L221 |
62,352 | VoltDB/voltdb | src/frontend/org/voltcore/agreement/RestrictedPriorityQueue.java | RestrictedPriorityQueue.getNewestSafeTransactionForInitiator | public Long getNewestSafeTransactionForInitiator(Long initiatorId) {
LastInitiatorData lid = m_initiatorData.get(initiatorId);
if (lid == null) {
return null;
}
return lid.m_lastSafeTxnId;
} | java | public Long getNewestSafeTransactionForInitiator(Long initiatorId) {
LastInitiatorData lid = m_initiatorData.get(initiatorId);
if (lid == null) {
return null;
}
return lid.m_lastSafeTxnId;
} | [
"public",
"Long",
"getNewestSafeTransactionForInitiator",
"(",
"Long",
"initiatorId",
")",
"{",
"LastInitiatorData",
"lid",
"=",
"m_initiatorData",
".",
"get",
"(",
"initiatorId",
")",
";",
"if",
"(",
"lid",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
... | Return the largest confirmed txn id for the initiator given.
Used to figure out what to do after an initiator fails.
@param initiatorId The id of the initiator that has failed. | [
"Return",
"the",
"largest",
"confirmed",
"txn",
"id",
"for",
"the",
"initiator",
"given",
".",
"Used",
"to",
"figure",
"out",
"what",
"to",
"do",
"after",
"an",
"initiator",
"fails",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/RestrictedPriorityQueue.java#L235-L241 |
62,353 | VoltDB/voltdb | src/frontend/org/voltcore/agreement/RestrictedPriorityQueue.java | RestrictedPriorityQueue.safeToRecover | public Long safeToRecover() {
boolean safe = true;
for (LastInitiatorData data : m_initiatorData.values()) {
final long lastSeenTxnId = data.m_lastSeenTxnId;
if (lastSeenTxnId == DtxnConstants.DUMMY_LAST_SEEN_TXN_ID) {
safe = false;
}
}
... | java | public Long safeToRecover() {
boolean safe = true;
for (LastInitiatorData data : m_initiatorData.values()) {
final long lastSeenTxnId = data.m_lastSeenTxnId;
if (lastSeenTxnId == DtxnConstants.DUMMY_LAST_SEEN_TXN_ID) {
safe = false;
}
}
... | [
"public",
"Long",
"safeToRecover",
"(",
")",
"{",
"boolean",
"safe",
"=",
"true",
";",
"for",
"(",
"LastInitiatorData",
"data",
":",
"m_initiatorData",
".",
"values",
"(",
")",
")",
"{",
"final",
"long",
"lastSeenTxnId",
"=",
"data",
".",
"m_lastSeenTxnId",
... | Determine if it is safe to recover and if it is, what txnid it is safe to recover at.
Recovery is initiated by the recovering source partition. It can't be initiated until the recovering
partition has heard from every initiator. This is because it is not possible to pick a point
in the global txn ordering for the recov... | [
"Determine",
"if",
"it",
"is",
"safe",
"to",
"recover",
"and",
"if",
"it",
"is",
"what",
"txnid",
"it",
"is",
"safe",
"to",
"recover",
"at",
".",
"Recovery",
"is",
"initiated",
"by",
"the",
"recovering",
"source",
"partition",
".",
"It",
"can",
"t",
"b... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/RestrictedPriorityQueue.java#L365-L397 |
62,354 | VoltDB/voltdb | src/frontend/org/voltdb/HTTPClientInterface.java | HTTPClientInterface.unauthenticate | public void unauthenticate(HttpServletRequest request) {
if (HTTP_DONT_USE_SESSION) return;
HttpSession session = request.getSession(false);
if (session != null) {
session.removeAttribute(AUTH_USER_SESSION_KEY);
session.invalidate();
}
} | java | public void unauthenticate(HttpServletRequest request) {
if (HTTP_DONT_USE_SESSION) return;
HttpSession session = request.getSession(false);
if (session != null) {
session.removeAttribute(AUTH_USER_SESSION_KEY);
session.invalidate();
}
} | [
"public",
"void",
"unauthenticate",
"(",
"HttpServletRequest",
"request",
")",
"{",
"if",
"(",
"HTTP_DONT_USE_SESSION",
")",
"return",
";",
"HttpSession",
"session",
"=",
"request",
".",
"getSession",
"(",
"false",
")",
";",
"if",
"(",
"session",
"!=",
"null",... | reuses it and happily validates it. | [
"reuses",
"it",
"and",
"happily",
"validates",
"it",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/HTTPClientInterface.java#L552-L559 |
62,355 | VoltDB/voltdb | src/frontend/org/voltdb/HTTPClientInterface.java | HTTPClientInterface.authenticate | public AuthenticationResult authenticate(HttpServletRequest request) {
HttpSession session = null;
AuthenticationResult authResult = null;
if (!HTTP_DONT_USE_SESSION && !m_dontUseSession) {
try {
session = request.getSession();
if (session != null) {
... | java | public AuthenticationResult authenticate(HttpServletRequest request) {
HttpSession session = null;
AuthenticationResult authResult = null;
if (!HTTP_DONT_USE_SESSION && !m_dontUseSession) {
try {
session = request.getSession();
if (session != null) {
... | [
"public",
"AuthenticationResult",
"authenticate",
"(",
"HttpServletRequest",
"request",
")",
"{",
"HttpSession",
"session",
"=",
"null",
";",
"AuthenticationResult",
"authResult",
"=",
"null",
";",
"if",
"(",
"!",
"HTTP_DONT_USE_SESSION",
"&&",
"!",
"m_dontUseSession"... | Look to get session if no session found or created fallback to always authenticate mode. | [
"Look",
"to",
"get",
"session",
"if",
"no",
"session",
"found",
"or",
"created",
"fallback",
"to",
"always",
"authenticate",
"mode",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/HTTPClientInterface.java#L562-L595 |
62,356 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/FunctionSQL.java | FunctionSQL.newSQLFunction | public static FunctionSQL newSQLFunction(String token,
CompileContext context) {
int id = regularFuncMap.get(token, -1);
if (id == -1) {
id = valueFuncMap.get(token, -1);
}
if (id == -1) {
return null;
}
FunctionSQL function = new F... | java | public static FunctionSQL newSQLFunction(String token,
CompileContext context) {
int id = regularFuncMap.get(token, -1);
if (id == -1) {
id = valueFuncMap.get(token, -1);
}
if (id == -1) {
return null;
}
FunctionSQL function = new F... | [
"public",
"static",
"FunctionSQL",
"newSQLFunction",
"(",
"String",
"token",
",",
"CompileContext",
"context",
")",
"{",
"int",
"id",
"=",
"regularFuncMap",
".",
"get",
"(",
"token",
",",
"-",
"1",
")",
";",
"if",
"(",
"id",
"==",
"-",
"1",
")",
"{",
... | End of VoltDB extension | [
"End",
"of",
"VoltDB",
"extension"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/FunctionSQL.java#L222-L246 |
62,357 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/ZKDatabase.java | ZKDatabase.processTxn | public ProcessTxnResult processTxn(TxnHeader hdr, Record txn) {
return dataTree.processTxn(hdr, txn);
} | java | public ProcessTxnResult processTxn(TxnHeader hdr, Record txn) {
return dataTree.processTxn(hdr, txn);
} | [
"public",
"ProcessTxnResult",
"processTxn",
"(",
"TxnHeader",
"hdr",
",",
"Record",
"txn",
")",
"{",
"return",
"dataTree",
".",
"processTxn",
"(",
"hdr",
",",
"txn",
")",
";",
"}"
] | the process txn on the data
@param hdr the txnheader for the txn
@param txn the transaction that needs to be processed
@return the result of processing the transaction on this
datatree/zkdatabase | [
"the",
"process",
"txn",
"on",
"the",
"data"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/ZKDatabase.java#L176-L178 |
62,358 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/ZKDatabase.java | ZKDatabase.statNode | public Stat statNode(String path, ServerCnxn serverCnxn) throws KeeperException.NoNodeException {
return dataTree.statNode(path, serverCnxn);
} | java | public Stat statNode(String path, ServerCnxn serverCnxn) throws KeeperException.NoNodeException {
return dataTree.statNode(path, serverCnxn);
} | [
"public",
"Stat",
"statNode",
"(",
"String",
"path",
",",
"ServerCnxn",
"serverCnxn",
")",
"throws",
"KeeperException",
".",
"NoNodeException",
"{",
"return",
"dataTree",
".",
"statNode",
"(",
"path",
",",
"serverCnxn",
")",
";",
"}"
] | stat the path
@param path the path for which stat is to be done
@param serverCnxn the servercnxn attached to this request
@return the stat of this node
@throws KeeperException.NoNodeException | [
"stat",
"the",
"path"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/ZKDatabase.java#L187-L189 |
62,359 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/ZKDatabase.java | ZKDatabase.getData | public byte[] getData(String path, Stat stat, Watcher watcher)
throws KeeperException.NoNodeException {
return dataTree.getData(path, stat, watcher);
} | java | public byte[] getData(String path, Stat stat, Watcher watcher)
throws KeeperException.NoNodeException {
return dataTree.getData(path, stat, watcher);
} | [
"public",
"byte",
"[",
"]",
"getData",
"(",
"String",
"path",
",",
"Stat",
"stat",
",",
"Watcher",
"watcher",
")",
"throws",
"KeeperException",
".",
"NoNodeException",
"{",
"return",
"dataTree",
".",
"getData",
"(",
"path",
",",
"stat",
",",
"watcher",
")"... | get data and stat for a path
@param path the path being queried
@param stat the stat for this path
@param watcher the watcher function
@return
@throws KeeperException.NoNodeException | [
"get",
"data",
"and",
"stat",
"for",
"a",
"path"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/ZKDatabase.java#L217-L220 |
62,360 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/ZKDatabase.java | ZKDatabase.setWatches | public void setWatches(long relativeZxid, List<String> dataWatches,
List<String> existWatches, List<String> childWatches, Watcher watcher) {
dataTree.setWatches(relativeZxid, dataWatches, existWatches, childWatches, watcher);
} | java | public void setWatches(long relativeZxid, List<String> dataWatches,
List<String> existWatches, List<String> childWatches, Watcher watcher) {
dataTree.setWatches(relativeZxid, dataWatches, existWatches, childWatches, watcher);
} | [
"public",
"void",
"setWatches",
"(",
"long",
"relativeZxid",
",",
"List",
"<",
"String",
">",
"dataWatches",
",",
"List",
"<",
"String",
">",
"existWatches",
",",
"List",
"<",
"String",
">",
"childWatches",
",",
"Watcher",
"watcher",
")",
"{",
"dataTree",
... | set watches on the datatree
@param relativeZxid the relative zxid that client has seen
@param dataWatches the data watches the client wants to reset
@param existWatches the exists watches the client wants to reset
@param childWatches the child watches the client wants to reset
@param watcher the watcher function | [
"set",
"watches",
"on",
"the",
"datatree"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/ZKDatabase.java#L230-L233 |
62,361 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/ZKDatabase.java | ZKDatabase.getACL | public List<ACL> getACL(String path, Stat stat) throws NoNodeException {
return dataTree.getACL(path, stat);
} | java | public List<ACL> getACL(String path, Stat stat) throws NoNodeException {
return dataTree.getACL(path, stat);
} | [
"public",
"List",
"<",
"ACL",
">",
"getACL",
"(",
"String",
"path",
",",
"Stat",
"stat",
")",
"throws",
"NoNodeException",
"{",
"return",
"dataTree",
".",
"getACL",
"(",
"path",
",",
"stat",
")",
";",
"}"
] | get acl for a path
@param path the path to query for acl
@param stat the stat for the node
@return the acl list for this path
@throws NoNodeException | [
"get",
"acl",
"for",
"a",
"path"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/ZKDatabase.java#L242-L244 |
62,362 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/ZKDatabase.java | ZKDatabase.getChildren | public List<String> getChildren(String path, Stat stat, Watcher watcher)
throws KeeperException.NoNodeException {
return dataTree.getChildren(path, stat, watcher);
} | java | public List<String> getChildren(String path, Stat stat, Watcher watcher)
throws KeeperException.NoNodeException {
return dataTree.getChildren(path, stat, watcher);
} | [
"public",
"List",
"<",
"String",
">",
"getChildren",
"(",
"String",
"path",
",",
"Stat",
"stat",
",",
"Watcher",
"watcher",
")",
"throws",
"KeeperException",
".",
"NoNodeException",
"{",
"return",
"dataTree",
".",
"getChildren",
"(",
"path",
",",
"stat",
","... | get children list for this path
@param path the path of the node
@param stat the stat of the node
@param watcher the watcher function for this path
@return the list of children for this path
@throws KeeperException.NoNodeException | [
"get",
"children",
"list",
"for",
"this",
"path"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/ZKDatabase.java#L254-L257 |
62,363 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/SiteTaskerQueue.java | SiteTaskerQueue.take | public SiteTasker take() throws InterruptedException
{
SiteTasker task = m_tasks.poll();
if (task == null) {
m_starvationTracker.beginStarvation();
} else {
m_queueDepthTracker.pollUpdate(task.getQueueOfferTime());
return task;
}
try {
... | java | public SiteTasker take() throws InterruptedException
{
SiteTasker task = m_tasks.poll();
if (task == null) {
m_starvationTracker.beginStarvation();
} else {
m_queueDepthTracker.pollUpdate(task.getQueueOfferTime());
return task;
}
try {
... | [
"public",
"SiteTasker",
"take",
"(",
")",
"throws",
"InterruptedException",
"{",
"SiteTasker",
"task",
"=",
"m_tasks",
".",
"poll",
"(",
")",
";",
"if",
"(",
"task",
"==",
"null",
")",
"{",
"m_starvationTracker",
".",
"beginStarvation",
"(",
")",
";",
"}",... | Block on the site tasker queue. | [
"Block",
"on",
"the",
"site",
"tasker",
"queue",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SiteTaskerQueue.java#L54-L72 |
62,364 | VoltDB/voltdb | src/frontend/org/voltdb/iv2/SiteTaskerQueue.java | SiteTaskerQueue.poll | public SiteTasker poll()
{
SiteTasker task = m_tasks.poll();
if (task != null) {
m_queueDepthTracker.pollUpdate(task.getQueueOfferTime());
}
return task;
} | java | public SiteTasker poll()
{
SiteTasker task = m_tasks.poll();
if (task != null) {
m_queueDepthTracker.pollUpdate(task.getQueueOfferTime());
}
return task;
} | [
"public",
"SiteTasker",
"poll",
"(",
")",
"{",
"SiteTasker",
"task",
"=",
"m_tasks",
".",
"poll",
"(",
")",
";",
"if",
"(",
"task",
"!=",
"null",
")",
"{",
"m_queueDepthTracker",
".",
"pollUpdate",
"(",
"task",
".",
"getQueueOfferTime",
"(",
")",
")",
... | Non-blocking poll on the site tasker queue. | [
"Non",
"-",
"blocking",
"poll",
"on",
"the",
"site",
"tasker",
"queue",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/SiteTaskerQueue.java#L75-L82 |
62,365 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/io/Files.java | Files.newWriter | public static BufferedWriter newWriter(File file, Charset charset) throws FileNotFoundException {
checkNotNull(file);
checkNotNull(charset);
return new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), charset));
} | java | public static BufferedWriter newWriter(File file, Charset charset) throws FileNotFoundException {
checkNotNull(file);
checkNotNull(charset);
return new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), charset));
} | [
"public",
"static",
"BufferedWriter",
"newWriter",
"(",
"File",
"file",
",",
"Charset",
"charset",
")",
"throws",
"FileNotFoundException",
"{",
"checkNotNull",
"(",
"file",
")",
";",
"checkNotNull",
"(",
"charset",
")",
";",
"return",
"new",
"BufferedWriter",
"(... | Returns a buffered writer that writes to a file using the given character set.
@param file the file to write to
@param charset the charset used to encode the output stream; see {@link StandardCharsets} for
helpful predefined constants
@return the buffered writer | [
"Returns",
"a",
"buffered",
"writer",
"that",
"writes",
"to",
"a",
"file",
"using",
"the",
"given",
"character",
"set",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/io/Files.java#L95-L99 |
62,366 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/io/Files.java | Files.write | private static void write(CharSequence from, File to, Charset charset, boolean append)
throws IOException {
asCharSink(to, charset, modes(append)).write(from);
} | java | private static void write(CharSequence from, File to, Charset charset, boolean append)
throws IOException {
asCharSink(to, charset, modes(append)).write(from);
} | [
"private",
"static",
"void",
"write",
"(",
"CharSequence",
"from",
",",
"File",
"to",
",",
"Charset",
"charset",
",",
"boolean",
"append",
")",
"throws",
"IOException",
"{",
"asCharSink",
"(",
"to",
",",
"charset",
",",
"modes",
"(",
"append",
")",
")",
... | Private helper method. Writes a character sequence to a file, optionally appending.
@param from the character sequence to append
@param to the destination file
@param charset the charset used to encode the output stream; see {@link StandardCharsets} for
helpful predefined constants
@param append true to append, false ... | [
"Private",
"helper",
"method",
".",
"Writes",
"a",
"character",
"sequence",
"to",
"a",
"file",
"optionally",
"appending",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/io/Files.java#L343-L346 |
62,367 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/io/Files.java | Files.copy | public static void copy(File from, Charset charset, Appendable to) throws IOException {
asCharSource(from, charset).copyTo(to);
} | java | public static void copy(File from, Charset charset, Appendable to) throws IOException {
asCharSource(from, charset).copyTo(to);
} | [
"public",
"static",
"void",
"copy",
"(",
"File",
"from",
",",
"Charset",
"charset",
",",
"Appendable",
"to",
")",
"throws",
"IOException",
"{",
"asCharSource",
"(",
"from",
",",
"charset",
")",
".",
"copyTo",
"(",
"to",
")",
";",
"}"
] | Copies all characters from a file to an appendable object, using the given character set.
@param from the source file
@param charset the charset used to decode the input stream; see {@link StandardCharsets} for
helpful predefined constants
@param to the appendable object
@throws IOException if an I/O error occurs | [
"Copies",
"all",
"characters",
"from",
"a",
"file",
"to",
"an",
"appendable",
"object",
"using",
"the",
"given",
"character",
"set",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/io/Files.java#L357-L359 |
62,368 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/io/Files.java | Files.equal | public static boolean equal(File file1, File file2) throws IOException {
checkNotNull(file1);
checkNotNull(file2);
if (file1 == file2 || file1.equals(file2)) {
return true;
}
/*
* Some operating systems may return zero as the length for files denoting system-dependent
* entities suc... | java | public static boolean equal(File file1, File file2) throws IOException {
checkNotNull(file1);
checkNotNull(file2);
if (file1 == file2 || file1.equals(file2)) {
return true;
}
/*
* Some operating systems may return zero as the length for files denoting system-dependent
* entities suc... | [
"public",
"static",
"boolean",
"equal",
"(",
"File",
"file1",
",",
"File",
"file2",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"file1",
")",
";",
"checkNotNull",
"(",
"file2",
")",
";",
"if",
"(",
"file1",
"==",
"file2",
"||",
"file1",
".",
... | Returns true if the files contains the same bytes.
@throws IOException if an I/O error occurs | [
"Returns",
"true",
"if",
"the",
"files",
"contains",
"the",
"same",
"bytes",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/io/Files.java#L366-L384 |
62,369 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/io/Files.java | Files.readLines | public static List<String> readLines(File file, Charset charset) throws IOException {
// don't use asCharSource(file, charset).readLines() because that returns
// an immutable list, which would change the behavior of this method
return readLines(
file,
charset,
new LineProcessor<List... | java | public static List<String> readLines(File file, Charset charset) throws IOException {
// don't use asCharSource(file, charset).readLines() because that returns
// an immutable list, which would change the behavior of this method
return readLines(
file,
charset,
new LineProcessor<List... | [
"public",
"static",
"List",
"<",
"String",
">",
"readLines",
"(",
"File",
"file",
",",
"Charset",
"charset",
")",
"throws",
"IOException",
"{",
"// don't use asCharSource(file, charset).readLines() because that returns",
"// an immutable list, which would change the behavior of t... | Reads all of the lines from a file. The lines do not include line-termination characters, but
do include other leading and trailing whitespace.
<p>This method returns a mutable {@code List}. For an {@code ImmutableList}, use
{@code Files.asCharSource(file, charset).readLines()}.
@param file the file to read from
@par... | [
"Reads",
"all",
"of",
"the",
"lines",
"from",
"a",
"file",
".",
"The",
"lines",
"do",
"not",
"include",
"line",
"-",
"termination",
"characters",
"but",
"do",
"include",
"other",
"leading",
"and",
"trailing",
"whitespace",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/io/Files.java#L517-L537 |
62,370 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/io/Files.java | Files.readBytes | @CanIgnoreReturnValue // some processors won't return a useful result
public static <T> T readBytes(File file, ByteProcessor<T> processor) throws IOException {
return asByteSource(file).read(processor);
} | java | @CanIgnoreReturnValue // some processors won't return a useful result
public static <T> T readBytes(File file, ByteProcessor<T> processor) throws IOException {
return asByteSource(file).read(processor);
} | [
"@",
"CanIgnoreReturnValue",
"// some processors won't return a useful result",
"public",
"static",
"<",
"T",
">",
"T",
"readBytes",
"(",
"File",
"file",
",",
"ByteProcessor",
"<",
"T",
">",
"processor",
")",
"throws",
"IOException",
"{",
"return",
"asByteSource",
"... | Process the bytes of a file.
<p>(If this seems too complicated, maybe you're looking for {@link #toByteArray}.)
@param file the file to read
@param processor the object to which the bytes of the file are passed.
@return the result of the byte processor
@throws IOException if an I/O error occurs | [
"Process",
"the",
"bytes",
"of",
"a",
"file",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/io/Files.java#L566-L569 |
62,371 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/RangeVariableResolver.java | RangeVariableResolver.decomposeCondition | static Expression decomposeCondition(Expression e,
HsqlArrayList conditions) {
if (e == null) {
return Expression.EXPR_TRUE;
}
Expression arg1 = e.getLeftNode();
Expression arg2 = e.getRightNode();
int type = e.getType... | java | static Expression decomposeCondition(Expression e,
HsqlArrayList conditions) {
if (e == null) {
return Expression.EXPR_TRUE;
}
Expression arg1 = e.getLeftNode();
Expression arg2 = e.getRightNode();
int type = e.getType... | [
"static",
"Expression",
"decomposeCondition",
"(",
"Expression",
"e",
",",
"HsqlArrayList",
"conditions",
")",
"{",
"if",
"(",
"e",
"==",
"null",
")",
"{",
"return",
"Expression",
".",
"EXPR_TRUE",
";",
"}",
"Expression",
"arg1",
"=",
"e",
".",
"getLeftNode"... | Divides AND conditions and assigns | [
"Divides",
"AND",
"conditions",
"and",
"assigns"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RangeVariableResolver.java#L142-L189 |
62,372 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/RangeVariableResolver.java | RangeVariableResolver.assignToLists | void assignToLists() {
int lastOuterIndex = -1;
for (int i = 0; i < rangeVariables.length; i++) {
if (rangeVariables[i].isLeftJoin
|| rangeVariables[i].isRightJoin) {
lastOuterIndex = i;
}
if (lastOuterIndex == i) {
... | java | void assignToLists() {
int lastOuterIndex = -1;
for (int i = 0; i < rangeVariables.length; i++) {
if (rangeVariables[i].isLeftJoin
|| rangeVariables[i].isRightJoin) {
lastOuterIndex = i;
}
if (lastOuterIndex == i) {
... | [
"void",
"assignToLists",
"(",
")",
"{",
"int",
"lastOuterIndex",
"=",
"-",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"rangeVariables",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"rangeVariables",
"[",
"i",
"]",
".",
"isL... | Assigns the conditions to separate lists | [
"Assigns",
"the",
"conditions",
"to",
"separate",
"lists"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RangeVariableResolver.java#L194-L218 |
62,373 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/RangeVariableResolver.java | RangeVariableResolver.assignToLists | void assignToLists(Expression e, HsqlArrayList[] expressionLists,
int first) {
set.clear();
e.collectRangeVariables(rangeVariables, set);
int index = rangeVarSet.getLargestIndex(set);
// condition is independent of tables if no range variable is found
if... | java | void assignToLists(Expression e, HsqlArrayList[] expressionLists,
int first) {
set.clear();
e.collectRangeVariables(rangeVariables, set);
int index = rangeVarSet.getLargestIndex(set);
// condition is independent of tables if no range variable is found
if... | [
"void",
"assignToLists",
"(",
"Expression",
"e",
",",
"HsqlArrayList",
"[",
"]",
"expressionLists",
",",
"int",
"first",
")",
"{",
"set",
".",
"clear",
"(",
")",
";",
"e",
".",
"collectRangeVariables",
"(",
"rangeVariables",
",",
"set",
")",
";",
"int",
... | Assigns a single condition to the relevant list of conditions
Parameter first indicates the first range variable to which condition
can be assigned | [
"Assigns",
"a",
"single",
"condition",
"to",
"the",
"relevant",
"list",
"of",
"conditions"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RangeVariableResolver.java#L226-L245 |
62,374 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/RangeVariableResolver.java | RangeVariableResolver.assignToRangeVariables | void assignToRangeVariables() {
for (int i = 0; i < rangeVariables.length; i++) {
boolean isOuter = rangeVariables[i].isLeftJoin
|| rangeVariables[i].isRightJoin;
if (isOuter) {
assignToRangeVariable(rangeVariables[i], i,
... | java | void assignToRangeVariables() {
for (int i = 0; i < rangeVariables.length; i++) {
boolean isOuter = rangeVariables[i].isLeftJoin
|| rangeVariables[i].isRightJoin;
if (isOuter) {
assignToRangeVariable(rangeVariables[i], i,
... | [
"void",
"assignToRangeVariables",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"rangeVariables",
".",
"length",
";",
"i",
"++",
")",
"{",
"boolean",
"isOuter",
"=",
"rangeVariables",
"[",
"i",
"]",
".",
"isLeftJoin",
"||",
"rangeVari... | Assigns conditions to range variables and converts suitable IN conditions
to table lookup. | [
"Assigns",
"conditions",
"to",
"range",
"variables",
"and",
"converts",
"suitable",
"IN",
"conditions",
"to",
"table",
"lookup",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RangeVariableResolver.java#L333-L385 |
62,375 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/RangeVariableResolver.java | RangeVariableResolver.setInConditionsAsTables | void setInConditionsAsTables() {
for (int i = rangeVariables.length - 1; i >= 0; i--) {
RangeVariable rangeVar = rangeVariables[i];
Expression in = inExpressions[i];
if (in != null) {
Index index = rangeVar.rangeTable.getIndexForColumn(
... | java | void setInConditionsAsTables() {
for (int i = rangeVariables.length - 1; i >= 0; i--) {
RangeVariable rangeVar = rangeVariables[i];
Expression in = inExpressions[i];
if (in != null) {
Index index = rangeVar.rangeTable.getIndexForColumn(
... | [
"void",
"setInConditionsAsTables",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"rangeVariables",
".",
"length",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"RangeVariable",
"rangeVar",
"=",
"rangeVariables",
"[",
"i",
"]",
";",
"Expression... | Converts an IN conditions into a JOIN | [
"Converts",
"an",
"IN",
"conditions",
"into",
"a",
"JOIN"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RangeVariableResolver.java#L613-L643 |
62,376 | VoltDB/voltdb | src/frontend/org/voltdb/largequery/LargeBlockTask.java | LargeBlockTask.getStoreTask | public static LargeBlockTask getStoreTask(BlockId blockId, ByteBuffer block) {
return new LargeBlockTask() {
@Override
public LargeBlockResponse call() throws Exception {
Exception theException = null;
try {
LargeBlockManager.getInstanc... | java | public static LargeBlockTask getStoreTask(BlockId blockId, ByteBuffer block) {
return new LargeBlockTask() {
@Override
public LargeBlockResponse call() throws Exception {
Exception theException = null;
try {
LargeBlockManager.getInstanc... | [
"public",
"static",
"LargeBlockTask",
"getStoreTask",
"(",
"BlockId",
"blockId",
",",
"ByteBuffer",
"block",
")",
"{",
"return",
"new",
"LargeBlockTask",
"(",
")",
"{",
"@",
"Override",
"public",
"LargeBlockResponse",
"call",
"(",
")",
"throws",
"Exception",
"{"... | Get a new "store" task
@param blockId The block id of the block to store
@param block A ByteBuffer containing the block data
@return An instance of LargeBlockTask that will store a block | [
"Get",
"a",
"new",
"store",
"task"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/largequery/LargeBlockTask.java#L38-L53 |
62,377 | VoltDB/voltdb | src/frontend/org/voltdb/largequery/LargeBlockTask.java | LargeBlockTask.getReleaseTask | public static LargeBlockTask getReleaseTask(BlockId blockId) {
return new LargeBlockTask() {
@Override
public LargeBlockResponse call() throws Exception {
Exception theException = null;
try {
LargeBlockManager.getInstance().releaseBlock... | java | public static LargeBlockTask getReleaseTask(BlockId blockId) {
return new LargeBlockTask() {
@Override
public LargeBlockResponse call() throws Exception {
Exception theException = null;
try {
LargeBlockManager.getInstance().releaseBlock... | [
"public",
"static",
"LargeBlockTask",
"getReleaseTask",
"(",
"BlockId",
"blockId",
")",
"{",
"return",
"new",
"LargeBlockTask",
"(",
")",
"{",
"@",
"Override",
"public",
"LargeBlockResponse",
"call",
"(",
")",
"throws",
"Exception",
"{",
"Exception",
"theException... | Get a new "release" task
@param blockId The block id of the block to release
@return An instance of LargeBlockTask that will release a block | [
"Get",
"a",
"new",
"release",
"task"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/largequery/LargeBlockTask.java#L60-L75 |
62,378 | VoltDB/voltdb | src/frontend/org/voltdb/largequery/LargeBlockTask.java | LargeBlockTask.getLoadTask | public static LargeBlockTask getLoadTask(BlockId blockId, ByteBuffer block) {
return new LargeBlockTask() {
@Override
public LargeBlockResponse call() throws Exception {
Exception theException = null;
try {
LargeBlockManager.getInstance... | java | public static LargeBlockTask getLoadTask(BlockId blockId, ByteBuffer block) {
return new LargeBlockTask() {
@Override
public LargeBlockResponse call() throws Exception {
Exception theException = null;
try {
LargeBlockManager.getInstance... | [
"public",
"static",
"LargeBlockTask",
"getLoadTask",
"(",
"BlockId",
"blockId",
",",
"ByteBuffer",
"block",
")",
"{",
"return",
"new",
"LargeBlockTask",
"(",
")",
"{",
"@",
"Override",
"public",
"LargeBlockResponse",
"call",
"(",
")",
"throws",
"Exception",
"{",... | Get a new "load" task
@param blockId The block id of the block to load
@param block A ByteBuffer to write data intox
@return An instance of LargeBlockTask that will load a block | [
"Get",
"a",
"new",
"load",
"task"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/largequery/LargeBlockTask.java#L83-L98 |
62,379 | VoltDB/voltdb | src/frontend/org/voltcore/utils/Pair.java | Pair.of | public static <T, U> Pair<T, U> of(T x, U y) {
return new Pair<T, U>(x, y);
} | java | public static <T, U> Pair<T, U> of(T x, U y) {
return new Pair<T, U>(x, y);
} | [
"public",
"static",
"<",
"T",
",",
"U",
">",
"Pair",
"<",
"T",
",",
"U",
">",
"of",
"(",
"T",
"x",
",",
"U",
"y",
")",
"{",
"return",
"new",
"Pair",
"<",
"T",
",",
"U",
">",
"(",
"x",
",",
"y",
")",
";",
"}"
] | Convenience class method for constructing pairs using Java's generic type
inference. | [
"Convenience",
"class",
"method",
"for",
"constructing",
"pairs",
"using",
"Java",
"s",
"generic",
"type",
"inference",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/utils/Pair.java#L105-L107 |
62,380 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Routine.java | Routine.newRoutine | public static Routine newRoutine(Method method) {
Routine routine = new Routine(SchemaObject.FUNCTION);
int offset = 0;
Class[] params = method.getParameterTypes();
String className = method.getDeclaringClass().getName();
StringBuffer sb =... | java | public static Routine newRoutine(Method method) {
Routine routine = new Routine(SchemaObject.FUNCTION);
int offset = 0;
Class[] params = method.getParameterTypes();
String className = method.getDeclaringClass().getName();
StringBuffer sb =... | [
"public",
"static",
"Routine",
"newRoutine",
"(",
"Method",
"method",
")",
"{",
"Routine",
"routine",
"=",
"new",
"Routine",
"(",
"SchemaObject",
".",
"FUNCTION",
")",
";",
"int",
"offset",
"=",
"0",
";",
"Class",
"[",
"]",
"params",
"=",
"method",
".",
... | Returns a new function Routine object based solely on a Java Method object. | [
"Returns",
"a",
"new",
"function",
"Routine",
"object",
"based",
"solely",
"on",
"a",
"Java",
"Method",
"object",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Routine.java#L634-L681 |
62,381 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/saverestore/HashinatorSnapshotData.java | HashinatorSnapshotData.saveToBuffer | public ByteBuffer saveToBuffer(InstanceId instId)
throws IOException
{
if (instId == null) {
throw new IOException("Null instance ID.");
}
if (m_serData == null) {
throw new IOException("Uninitialized hashinator snapshot data.");
}
// Assu... | java | public ByteBuffer saveToBuffer(InstanceId instId)
throws IOException
{
if (instId == null) {
throw new IOException("Null instance ID.");
}
if (m_serData == null) {
throw new IOException("Uninitialized hashinator snapshot data.");
}
// Assu... | [
"public",
"ByteBuffer",
"saveToBuffer",
"(",
"InstanceId",
"instId",
")",
"throws",
"IOException",
"{",
"if",
"(",
"instId",
"==",
"null",
")",
"{",
"throw",
"new",
"IOException",
"(",
"\"Null instance ID.\"",
")",
";",
"}",
"if",
"(",
"m_serData",
"==",
"nu... | Save to output buffer, including header and config data.
@return byte buffer ready to write to a file.
@throws I/O exception on failure | [
"Save",
"to",
"output",
"buffer",
"including",
"header",
"and",
"config",
"data",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/HashinatorSnapshotData.java#L75-L102 |
62,382 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/saverestore/HashinatorSnapshotData.java | HashinatorSnapshotData.restoreFromBuffer | public InstanceId restoreFromBuffer(ByteBuffer buf)
throws IOException
{
buf.rewind();
// Assumes config data is the last field.
int dataSize = buf.remaining() - OFFSET_DATA;
if (dataSize <= 0) {
throw new IOException("Hashinator snapshot data is too small.")... | java | public InstanceId restoreFromBuffer(ByteBuffer buf)
throws IOException
{
buf.rewind();
// Assumes config data is the last field.
int dataSize = buf.remaining() - OFFSET_DATA;
if (dataSize <= 0) {
throw new IOException("Hashinator snapshot data is too small.")... | [
"public",
"InstanceId",
"restoreFromBuffer",
"(",
"ByteBuffer",
"buf",
")",
"throws",
"IOException",
"{",
"buf",
".",
"rewind",
"(",
")",
";",
"// Assumes config data is the last field.",
"int",
"dataSize",
"=",
"buf",
".",
"remaining",
"(",
")",
"-",
"OFFSET_DATA... | Restore and check hashinator config data.
@param buf input buffer
@return instance ID read from buffer
@throws I/O exception on failure | [
"Restore",
"and",
"check",
"hashinator",
"config",
"data",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/HashinatorSnapshotData.java#L110-L141 |
62,383 | VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/saverestore/HashinatorSnapshotData.java | HashinatorSnapshotData.restoreFromFile | public void restoreFromFile(File file) throws IOException
{
byte[] rawData = new byte[(int) file.length()];
ByteBuffer bufData = null;
FileInputStream fis = null;
DataInputStream dis = null;
try {
fis = new FileInputStream(file);
dis = new DataInputStr... | java | public void restoreFromFile(File file) throws IOException
{
byte[] rawData = new byte[(int) file.length()];
ByteBuffer bufData = null;
FileInputStream fis = null;
DataInputStream dis = null;
try {
fis = new FileInputStream(file);
dis = new DataInputStr... | [
"public",
"void",
"restoreFromFile",
"(",
"File",
"file",
")",
"throws",
"IOException",
"{",
"byte",
"[",
"]",
"rawData",
"=",
"new",
"byte",
"[",
"(",
"int",
")",
"file",
".",
"length",
"(",
")",
"]",
";",
"ByteBuffer",
"bufData",
"=",
"null",
";",
... | Restore and check hashinator config data from a file.
@param file hashinator config file
@param return the buffer with the raw data
@throws IOException | [
"Restore",
"and",
"check",
"hashinator",
"config",
"data",
"from",
"a",
"file",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/HashinatorSnapshotData.java#L149-L170 |
62,384 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/VoltProjectBuilder.java | VoltProjectBuilder.createFileForSchema | public static File createFileForSchema(String ddlText) throws IOException {
File temp = File.createTempFile("literalschema", ".sql");
temp.deleteOnExit();
FileWriter out = new FileWriter(temp);
out.write(ddlText);
out.close();
return temp;
} | java | public static File createFileForSchema(String ddlText) throws IOException {
File temp = File.createTempFile("literalschema", ".sql");
temp.deleteOnExit();
FileWriter out = new FileWriter(temp);
out.write(ddlText);
out.close();
return temp;
} | [
"public",
"static",
"File",
"createFileForSchema",
"(",
"String",
"ddlText",
")",
"throws",
"IOException",
"{",
"File",
"temp",
"=",
"File",
".",
"createTempFile",
"(",
"\"literalschema\"",
",",
"\".sql\"",
")",
";",
"temp",
".",
"deleteOnExit",
"(",
")",
";",... | Creates a temporary file for the supplied schema text.
The file is not left open, and will be deleted upon process exit. | [
"Creates",
"a",
"temporary",
"file",
"for",
"the",
"supplied",
"schema",
"text",
".",
"The",
"file",
"is",
"not",
"left",
"open",
"and",
"will",
"be",
"deleted",
"upon",
"process",
"exit",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltProjectBuilder.java#L491-L498 |
62,385 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/VoltProjectBuilder.java | VoltProjectBuilder.addLiteralSchema | public void addLiteralSchema(String ddlText) throws IOException {
File temp = createFileForSchema(ddlText);
addSchema(URLEncoder.encode(temp.getAbsolutePath(), "UTF-8"));
} | java | public void addLiteralSchema(String ddlText) throws IOException {
File temp = createFileForSchema(ddlText);
addSchema(URLEncoder.encode(temp.getAbsolutePath(), "UTF-8"));
} | [
"public",
"void",
"addLiteralSchema",
"(",
"String",
"ddlText",
")",
"throws",
"IOException",
"{",
"File",
"temp",
"=",
"createFileForSchema",
"(",
"ddlText",
")",
";",
"addSchema",
"(",
"URLEncoder",
".",
"encode",
"(",
"temp",
".",
"getAbsolutePath",
"(",
")... | Adds the supplied schema by creating a temp file for it. | [
"Adds",
"the",
"supplied",
"schema",
"by",
"creating",
"a",
"temp",
"file",
"for",
"it",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltProjectBuilder.java#L503-L506 |
62,386 | VoltDB/voltdb | src/frontend/org/voltdb/compiler/VoltProjectBuilder.java | VoltProjectBuilder.addStmtProcedure | public void addStmtProcedure(String name, String sql, String partitionInfoString) {
addProcedures(new ProcedureInfo(new String[0], name, sql,
ProcedurePartitionData.fromPartitionInfoString(partitionInfoString)));
} | java | public void addStmtProcedure(String name, String sql, String partitionInfoString) {
addProcedures(new ProcedureInfo(new String[0], name, sql,
ProcedurePartitionData.fromPartitionInfoString(partitionInfoString)));
} | [
"public",
"void",
"addStmtProcedure",
"(",
"String",
"name",
",",
"String",
"sql",
",",
"String",
"partitionInfoString",
")",
"{",
"addProcedures",
"(",
"new",
"ProcedureInfo",
"(",
"new",
"String",
"[",
"0",
"]",
",",
"name",
",",
"sql",
",",
"ProcedurePart... | compatible with old deprecated syntax for test ONLY | [
"compatible",
"with",
"old",
"deprecated",
"syntax",
"for",
"test",
"ONLY"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltProjectBuilder.java#L535-L538 |
62,387 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java | StringConverter.hexStringToByteArray | public static byte[] hexStringToByteArray(String s) throws IOException {
int l = s.length();
byte[] data = new byte[l / 2 + (l % 2)];
int n,
b = 0;
boolean high = true;
int i = 0;
for (int j = 0; j < l; j++) {
char c = s... | java | public static byte[] hexStringToByteArray(String s) throws IOException {
int l = s.length();
byte[] data = new byte[l / 2 + (l % 2)];
int n,
b = 0;
boolean high = true;
int i = 0;
for (int j = 0; j < l; j++) {
char c = s... | [
"public",
"static",
"byte",
"[",
"]",
"hexStringToByteArray",
"(",
"String",
"s",
")",
"throws",
"IOException",
"{",
"int",
"l",
"=",
"s",
".",
"length",
"(",
")",
";",
"byte",
"[",
"]",
"data",
"=",
"new",
"byte",
"[",
"l",
"/",
"2",
"+",
"(",
"... | Converts a hexadecimal string into a byte array
@param s hexadecimal string
@return byte array for the hex string
@throws IOException | [
"Converts",
"a",
"hexadecimal",
"string",
"into",
"a",
"byte",
"array"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java#L122-L165 |
62,388 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java | StringConverter.sqlBitStringToBitMap | public static BitMap sqlBitStringToBitMap(String s) throws IOException {
int l = s.length();
int n;
int bitIndex = 0;
BitMap map = new BitMap(l);
for (int j = 0; j < l; j++) {
char c = s.charAt(j);
if (c == ' ') {
continue;... | java | public static BitMap sqlBitStringToBitMap(String s) throws IOException {
int l = s.length();
int n;
int bitIndex = 0;
BitMap map = new BitMap(l);
for (int j = 0; j < l; j++) {
char c = s.charAt(j);
if (c == ' ') {
continue;... | [
"public",
"static",
"BitMap",
"sqlBitStringToBitMap",
"(",
"String",
"s",
")",
"throws",
"IOException",
"{",
"int",
"l",
"=",
"s",
".",
"length",
"(",
")",
";",
"int",
"n",
";",
"int",
"bitIndex",
"=",
"0",
";",
"BitMap",
"map",
"=",
"new",
"BitMap",
... | Compacts a bit string into a BitMap
@param s bit string
@return byte array for the hex string
@throws IOException | [
"Compacts",
"a",
"bit",
"string",
"into",
"a",
"BitMap"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java#L176-L207 |
62,389 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java | StringConverter.byteArrayToBitString | public static String byteArrayToBitString(byte[] bytes, int bitCount) {
char[] s = new char[bitCount];
for (int j = 0; j < bitCount; j++) {
byte b = bytes[j / 8];
s[j] = BitMap.isSet(b, j % 8) ? '1'
: '0';
}
return new... | java | public static String byteArrayToBitString(byte[] bytes, int bitCount) {
char[] s = new char[bitCount];
for (int j = 0; j < bitCount; j++) {
byte b = bytes[j / 8];
s[j] = BitMap.isSet(b, j % 8) ? '1'
: '0';
}
return new... | [
"public",
"static",
"String",
"byteArrayToBitString",
"(",
"byte",
"[",
"]",
"bytes",
",",
"int",
"bitCount",
")",
"{",
"char",
"[",
"]",
"s",
"=",
"new",
"char",
"[",
"bitCount",
"]",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"bitCount... | Converts a byte array into a bit string
@param bytes byte array
@param bitCount number of bits
@return hex string | [
"Converts",
"a",
"byte",
"array",
"into",
"a",
"bit",
"string"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java#L270-L282 |
62,390 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java | StringConverter.byteArrayToSQLBitString | public static String byteArrayToSQLBitString(byte[] bytes, int bitCount) {
char[] s = new char[bitCount + 3];
s[0] = 'B';
s[1] = '\'';
int pos = 2;
for (int j = 0; j < bitCount; j++) {
byte b = bytes[j / 8];
s[pos++] = BitMap.isSet(b, j % 8) ? '1'
... | java | public static String byteArrayToSQLBitString(byte[] bytes, int bitCount) {
char[] s = new char[bitCount + 3];
s[0] = 'B';
s[1] = '\'';
int pos = 2;
for (int j = 0; j < bitCount; j++) {
byte b = bytes[j / 8];
s[pos++] = BitMap.isSet(b, j % 8) ? '1'
... | [
"public",
"static",
"String",
"byteArrayToSQLBitString",
"(",
"byte",
"[",
"]",
"bytes",
",",
"int",
"bitCount",
")",
"{",
"char",
"[",
"]",
"s",
"=",
"new",
"char",
"[",
"bitCount",
"+",
"3",
"]",
";",
"s",
"[",
"0",
"]",
"=",
"'",
"'",
";",
"s"... | Converts a byte array into an SQL binary string
@param bytes byte array
@param bitCount number of bits
@return hex string | [
"Converts",
"a",
"byte",
"array",
"into",
"an",
"SQL",
"binary",
"string"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java#L292-L311 |
62,391 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java | StringConverter.writeHexBytes | public static void writeHexBytes(byte[] o, int from, byte[] b) {
int len = b.length;
for (int i = 0; i < len; i++) {
int c = ((int) b[i]) & 0xff;
o[from++] = HEXBYTES[c >> 4 & 0xf];
o[from++] = HEXBYTES[c & 0xf];
}
} | java | public static void writeHexBytes(byte[] o, int from, byte[] b) {
int len = b.length;
for (int i = 0; i < len; i++) {
int c = ((int) b[i]) & 0xff;
o[from++] = HEXBYTES[c >> 4 & 0xf];
o[from++] = HEXBYTES[c & 0xf];
}
} | [
"public",
"static",
"void",
"writeHexBytes",
"(",
"byte",
"[",
"]",
"o",
",",
"int",
"from",
",",
"byte",
"[",
"]",
"b",
")",
"{",
"int",
"len",
"=",
"b",
".",
"length",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"len",
";",
"i",
... | Converts a byte array into hexadecimal characters which are written as
ASCII to the given output stream.
@param o output array
@param from offset into output array
@param b input array | [
"Converts",
"a",
"byte",
"array",
"into",
"hexadecimal",
"characters",
"which",
"are",
"written",
"as",
"ASCII",
"to",
"the",
"given",
"output",
"stream",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java#L321-L331 |
62,392 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java | StringConverter.stringToUTFBytes | public static int stringToUTFBytes(String str,
HsqlByteArrayOutputStream out) {
int strlen = str.length();
int c,
count = 0;
if (out.count + strlen + 8 > out.buffer.length) {
out.ensureRoom(strlen + 8);
}
char[] a... | java | public static int stringToUTFBytes(String str,
HsqlByteArrayOutputStream out) {
int strlen = str.length();
int c,
count = 0;
if (out.count + strlen + 8 > out.buffer.length) {
out.ensureRoom(strlen + 8);
}
char[] a... | [
"public",
"static",
"int",
"stringToUTFBytes",
"(",
"String",
"str",
",",
"HsqlByteArrayOutputStream",
"out",
")",
"{",
"int",
"strlen",
"=",
"str",
".",
"length",
"(",
")",
";",
"int",
"c",
",",
"count",
"=",
"0",
";",
"if",
"(",
"out",
".",
"count",
... | Writes a string to the specified DataOutput using UTF-8 encoding in a
machine-independent manner.
@param str a string to be written.
@param out destination to write to
@return The number of bytes written out. | [
"Writes",
"a",
"string",
"to",
"the",
"specified",
"DataOutput",
"using",
"UTF",
"-",
"8",
"encoding",
"in",
"a",
"machine",
"-",
"independent",
"manner",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java#L567-L604 |
62,393 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java | StringConverter.inputStreamToString | public static String inputStreamToString(InputStream x,
String encoding) throws IOException {
InputStreamReader in = new InputStreamReader(x, encoding);
StringWriter writer = new StringWriter();
int blocksize = 8 * 1024;
char[] buffer ... | java | public static String inputStreamToString(InputStream x,
String encoding) throws IOException {
InputStreamReader in = new InputStreamReader(x, encoding);
StringWriter writer = new StringWriter();
int blocksize = 8 * 1024;
char[] buffer ... | [
"public",
"static",
"String",
"inputStreamToString",
"(",
"InputStream",
"x",
",",
"String",
"encoding",
")",
"throws",
"IOException",
"{",
"InputStreamReader",
"in",
"=",
"new",
"InputStreamReader",
"(",
"x",
",",
"encoding",
")",
";",
"StringWriter",
"writer",
... | Using a Reader and a Writer, returns a String from an InputStream.
Method based on Hypersonic Code
@param x InputStream to read from
@throws IOException
@return a Java string | [
"Using",
"a",
"Reader",
"and",
"a",
"Writer",
"returns",
"a",
"String",
"from",
"an",
"InputStream",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java#L636-L657 |
62,394 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java | StringConverter.count | static int count(final String s, final char c) {
int pos = 0;
int count = 0;
if (s != null) {
while ((pos = s.indexOf(c, pos)) > -1) {
count++;
pos++;
}
}
return count;
} | java | static int count(final String s, final char c) {
int pos = 0;
int count = 0;
if (s != null) {
while ((pos = s.indexOf(c, pos)) > -1) {
count++;
pos++;
}
}
return count;
} | [
"static",
"int",
"count",
"(",
"final",
"String",
"s",
",",
"final",
"char",
"c",
")",
"{",
"int",
"pos",
"=",
"0",
";",
"int",
"count",
"=",
"0",
";",
"if",
"(",
"s",
"!=",
"null",
")",
"{",
"while",
"(",
"(",
"pos",
"=",
"s",
".",
"indexOf"... | Counts Character c in String s
@param s Java string
@param c character to count
@return int count | [
"Counts",
"Character",
"c",
"in",
"String",
"s"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java#L712-L725 |
62,395 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/jmx/ManagedUtil.java | ManagedUtil.registerLog4jMBeans | public static void registerLog4jMBeans() throws JMException {
if (Boolean.getBoolean("zookeeper.jmx.log4j.disable") == true) {
return;
}
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
// Create and Register the top level Log4J MBean
HierarchyD... | java | public static void registerLog4jMBeans() throws JMException {
if (Boolean.getBoolean("zookeeper.jmx.log4j.disable") == true) {
return;
}
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
// Create and Register the top level Log4J MBean
HierarchyD... | [
"public",
"static",
"void",
"registerLog4jMBeans",
"(",
")",
"throws",
"JMException",
"{",
"if",
"(",
"Boolean",
".",
"getBoolean",
"(",
"\"zookeeper.jmx.log4j.disable\"",
")",
"==",
"true",
")",
"{",
"return",
";",
"}",
"MBeanServer",
"mbs",
"=",
"ManagementFac... | Register the log4j JMX mbeans. Set environment variable
"zookeeper.jmx.log4j.disable" to true to disable registration.
@see http://logging.apache.org/log4j/1.2/apidocs/index.html?org/apache/log4j/jmx/package-summary.html
@throws JMException if registration fails | [
"Register",
"the",
"log4j",
"JMX",
"mbeans",
".",
"Set",
"environment",
"variable",
"zookeeper",
".",
"jmx",
".",
"log4j",
".",
"disable",
"to",
"true",
"to",
"disable",
"registration",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/jmx/ManagedUtil.java#L43-L70 |
62,396 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/ZooKeeper.java | ZooKeeper.create | public void create(final String path, byte data[], List<ACL> acl,
CreateMode createMode, StringCallback cb, Object ctx) {
verbotenThreadCheck();
final String clientPath = path;
PathUtils.validatePath(clientPath, createMode.isSequential());
final String serverPath = prependCh... | java | public void create(final String path, byte data[], List<ACL> acl,
CreateMode createMode, StringCallback cb, Object ctx) {
verbotenThreadCheck();
final String clientPath = path;
PathUtils.validatePath(clientPath, createMode.isSequential());
final String serverPath = prependCh... | [
"public",
"void",
"create",
"(",
"final",
"String",
"path",
",",
"byte",
"data",
"[",
"]",
",",
"List",
"<",
"ACL",
">",
"acl",
",",
"CreateMode",
"createMode",
",",
"StringCallback",
"cb",
",",
"Object",
"ctx",
")",
"{",
"verbotenThreadCheck",
"(",
")",... | The Asynchronous version of create. The request doesn't actually until
the asynchronous callback is called.
@see #create(String, byte[], List, CreateMode) | [
"The",
"Asynchronous",
"version",
"of",
"create",
".",
"The",
"request",
"doesn",
"t",
"actually",
"until",
"the",
"asynchronous",
"callback",
"is",
"called",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/ZooKeeper.java#L683-L702 |
62,397 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/ZooKeeper.java | ZooKeeper.delete | public void delete(final String path, int version, VoidCallback cb,
Object ctx) {
verbotenThreadCheck();
final String clientPath = path;
PathUtils.validatePath(clientPath);
final String serverPath;
// maintain semantics even in chroot case
// specifically - ... | java | public void delete(final String path, int version, VoidCallback cb,
Object ctx) {
verbotenThreadCheck();
final String clientPath = path;
PathUtils.validatePath(clientPath);
final String serverPath;
// maintain semantics even in chroot case
// specifically - ... | [
"public",
"void",
"delete",
"(",
"final",
"String",
"path",
",",
"int",
"version",
",",
"VoidCallback",
"cb",
",",
"Object",
"ctx",
")",
"{",
"verbotenThreadCheck",
"(",
")",
";",
"final",
"String",
"clientPath",
"=",
"path",
";",
"PathUtils",
".",
"valida... | The Asynchronous version of delete. The request doesn't actually until
the asynchronous callback is called.
@see #delete(String, int) | [
"The",
"Asynchronous",
"version",
"of",
"delete",
".",
"The",
"request",
"doesn",
"t",
"actually",
"until",
"the",
"asynchronous",
"callback",
"is",
"called",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/ZooKeeper.java#L770-L796 |
62,398 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/ZooKeeper.java | ZooKeeper.setData | public void setData(final String path, byte data[], int version,
StatCallback cb, Object ctx) {
verbotenThreadCheck();
final String clientPath = path;
PathUtils.validatePath(clientPath);
final String serverPath = prependChroot(clientPath);
RequestHeader h = new Requ... | java | public void setData(final String path, byte data[], int version,
StatCallback cb, Object ctx) {
verbotenThreadCheck();
final String clientPath = path;
PathUtils.validatePath(clientPath);
final String serverPath = prependChroot(clientPath);
RequestHeader h = new Requ... | [
"public",
"void",
"setData",
"(",
"final",
"String",
"path",
",",
"byte",
"data",
"[",
"]",
",",
"int",
"version",
",",
"StatCallback",
"cb",
",",
"Object",
"ctx",
")",
"{",
"verbotenThreadCheck",
"(",
")",
";",
"final",
"String",
"clientPath",
"=",
"pat... | The Asynchronous version of setData. The request doesn't actually until
the asynchronous callback is called.
@see #setData(String, byte[], int) | [
"The",
"Asynchronous",
"version",
"of",
"setData",
".",
"The",
"request",
"doesn",
"t",
"actually",
"until",
"the",
"asynchronous",
"callback",
"is",
"called",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/ZooKeeper.java#L1103-L1120 |
62,399 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/ZooKeeper.java | ZooKeeper.getACL | public void getACL(final String path, Stat stat, ACLCallback cb, Object ctx) {
verbotenThreadCheck();
final String clientPath = path;
PathUtils.validatePath(clientPath);
final String serverPath = prependChroot(clientPath);
RequestHeader h = new RequestHeader();
h.setTyp... | java | public void getACL(final String path, Stat stat, ACLCallback cb, Object ctx) {
verbotenThreadCheck();
final String clientPath = path;
PathUtils.validatePath(clientPath);
final String serverPath = prependChroot(clientPath);
RequestHeader h = new RequestHeader();
h.setTyp... | [
"public",
"void",
"getACL",
"(",
"final",
"String",
"path",
",",
"Stat",
"stat",
",",
"ACLCallback",
"cb",
",",
"Object",
"ctx",
")",
"{",
"verbotenThreadCheck",
"(",
")",
";",
"final",
"String",
"clientPath",
"=",
"path",
";",
"PathUtils",
".",
"validateP... | The Asynchronous version of getACL. The request doesn't actually until
the asynchronous callback is called.
@see #getACL(String, Stat) | [
"The",
"Asynchronous",
"version",
"of",
"getACL",
".",
"The",
"request",
"doesn",
"t",
"actually",
"until",
"the",
"asynchronous",
"callback",
"is",
"called",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/ZooKeeper.java#L1168-L1182 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.