id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
61,800 | VoltDB/voltdb | src/frontend/org/voltdb/jdbc/JDBC4Connection.java | JDBC4Connection.setTypeMap | @Override
public void setTypeMap(Map<String,Class<?>> map) throws SQLException
{
checkClosed();
throw SQLError.noSupport();
} | java | @Override
public void setTypeMap(Map<String,Class<?>> map) throws SQLException
{
checkClosed();
throw SQLError.noSupport();
} | [
"@",
"Override",
"public",
"void",
"setTypeMap",
"(",
"Map",
"<",
"String",
",",
"Class",
"<",
"?",
">",
">",
"map",
")",
"throws",
"SQLException",
"{",
"checkClosed",
"(",
")",
";",
"throw",
"SQLError",
".",
"noSupport",
"(",
")",
";",
"}"
] | Installs the given TypeMap object as the type map for this Connection object. | [
"Installs",
"the",
"given",
"TypeMap",
"object",
"as",
"the",
"type",
"map",
"for",
"this",
"Connection",
"object",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4Connection.java#L520-L525 |
61,801 | VoltDB/voltdb | src/frontend/org/voltdb/jdbc/JDBC4Connection.java | JDBC4Connection.saveStatistics | @Override
public void saveStatistics(ClientStats stats, String file) throws IOException
{
this.NativeConnection.saveStatistics(stats, file);
} | java | @Override
public void saveStatistics(ClientStats stats, String file) throws IOException
{
this.NativeConnection.saveStatistics(stats, file);
} | [
"@",
"Override",
"public",
"void",
"saveStatistics",
"(",
"ClientStats",
"stats",
",",
"String",
"file",
")",
"throws",
"IOException",
"{",
"this",
".",
"NativeConnection",
".",
"saveStatistics",
"(",
"stats",
",",
"file",
")",
";",
"}"
] | Save statistics to a file | [
"Save",
"statistics",
"to",
"a",
"file"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4Connection.java#L558-L562 |
61,802 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/ZooKeeperMain.java | ZooKeeperMain.trimProcQuotas | private static boolean trimProcQuotas(ZooKeeper zk, String path)
throws KeeperException, IOException, InterruptedException {
if (Quotas.quotaZookeeper.equals(path)) {
return true;
}
List<String> children = zk.getChildren(path, false);
if (children.size() == 0) {
... | java | private static boolean trimProcQuotas(ZooKeeper zk, String path)
throws KeeperException, IOException, InterruptedException {
if (Quotas.quotaZookeeper.equals(path)) {
return true;
}
List<String> children = zk.getChildren(path, false);
if (children.size() == 0) {
... | [
"private",
"static",
"boolean",
"trimProcQuotas",
"(",
"ZooKeeper",
"zk",
",",
"String",
"path",
")",
"throws",
"KeeperException",
",",
"IOException",
",",
"InterruptedException",
"{",
"if",
"(",
"Quotas",
".",
"quotaZookeeper",
".",
"equals",
"(",
"path",
")",
... | trim the quota tree to recover unwanted tree elements in the quota's tree
@param zk
the zookeeper client
@param path
the path to start from and go up and see if their is any
unwanted parent in the path.
@return true if sucessful
@throws KeeperException
@throws IOException
@throws InterruptedException | [
"trim",
"the",
"quota",
"tree",
"to",
"recover",
"unwanted",
"tree",
"elements",
"in",
"the",
"quota",
"s",
"tree"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/ZooKeeperMain.java#L388-L401 |
61,803 | VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/ZooKeeperMain.java | ZooKeeperMain.delQuota | public static boolean delQuota(ZooKeeper zk, String path, boolean bytes,
boolean numNodes) throws KeeperException, IOException,
InterruptedException {
String parentPath = Quotas.quotaZookeeper + path;
String quotaPath = Quotas.quotaZookeeper + path + "/"
+ Quotas.... | java | public static boolean delQuota(ZooKeeper zk, String path, boolean bytes,
boolean numNodes) throws KeeperException, IOException,
InterruptedException {
String parentPath = Quotas.quotaZookeeper + path;
String quotaPath = Quotas.quotaZookeeper + path + "/"
+ Quotas.... | [
"public",
"static",
"boolean",
"delQuota",
"(",
"ZooKeeper",
"zk",
",",
"String",
"path",
",",
"boolean",
"bytes",
",",
"boolean",
"numNodes",
")",
"throws",
"KeeperException",
",",
"IOException",
",",
"InterruptedException",
"{",
"String",
"parentPath",
"=",
"Q... | this method deletes quota for a node.
@param zk
the zookeeper client
@param path
the path to delete quota for
@param bytes
true if number of bytes needs to be unset
@param numNodes
true if number of nodes needs to be unset
@return true if quota deletion is successful
@throws KeeperException
@throws IOException
@throws... | [
"this",
"method",
"deletes",
"quota",
"for",
"a",
"node",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/ZooKeeperMain.java#L419-L455 |
61,804 | VoltDB/voltdb | src/frontend/org/voltdb/DefaultProcedureManager.java | DefaultProcedureManager.generateCrudPKeyWhereClause | private static int generateCrudPKeyWhereClause(Column partitioncolumn,
Constraint pkey, StringBuilder sb)
{
// Sort the catalog index columns by index column order.
ArrayList<ColumnRef> indexColumns = new ArrayList<ColumnRef>(pkey.getIndex().getColumns().size());
for (ColumnRef c... | java | private static int generateCrudPKeyWhereClause(Column partitioncolumn,
Constraint pkey, StringBuilder sb)
{
// Sort the catalog index columns by index column order.
ArrayList<ColumnRef> indexColumns = new ArrayList<ColumnRef>(pkey.getIndex().getColumns().size());
for (ColumnRef c... | [
"private",
"static",
"int",
"generateCrudPKeyWhereClause",
"(",
"Column",
"partitioncolumn",
",",
"Constraint",
"pkey",
",",
"StringBuilder",
"sb",
")",
"{",
"// Sort the catalog index columns by index column order.",
"ArrayList",
"<",
"ColumnRef",
">",
"indexColumns",
"=",... | Helper to generate a WHERE pkey_col1 = ?, pkey_col2 = ? ...; clause.
@param partitioncolumn partitioning column for the table
@param pkey constraint from the catalog
@param paramoffset 0-based counter of parameters in the full sql statement so far
@param sb string buffer accumulating the sql statement
@return offset in... | [
"Helper",
"to",
"generate",
"a",
"WHERE",
"pkey_col1",
"=",
"?",
"pkey_col2",
"=",
"?",
"...",
";",
"clause",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/DefaultProcedureManager.java#L251-L275 |
61,805 | VoltDB/voltdb | src/frontend/org/voltdb/DefaultProcedureManager.java | DefaultProcedureManager.generateCrudExpressionColumns | private static void generateCrudExpressionColumns(Table table, StringBuilder sb) {
boolean first = true;
// Sort the catalog table columns by column order.
ArrayList<Column> tableColumns = new ArrayList<Column>(table.getColumns().size());
for (Column c : table.getColumns()) {
... | java | private static void generateCrudExpressionColumns(Table table, StringBuilder sb) {
boolean first = true;
// Sort the catalog table columns by column order.
ArrayList<Column> tableColumns = new ArrayList<Column>(table.getColumns().size());
for (Column c : table.getColumns()) {
... | [
"private",
"static",
"void",
"generateCrudExpressionColumns",
"(",
"Table",
"table",
",",
"StringBuilder",
"sb",
")",
"{",
"boolean",
"first",
"=",
"true",
";",
"// Sort the catalog table columns by column order.",
"ArrayList",
"<",
"Column",
">",
"tableColumns",
"=",
... | Helper to generate a full col1 = ?, col2 = ?... clause.
@param table
@param sb | [
"Helper",
"to",
"generate",
"a",
"full",
"col1",
"=",
"?",
"col2",
"=",
"?",
"...",
"clause",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/DefaultProcedureManager.java#L282-L297 |
61,806 | VoltDB/voltdb | src/frontend/org/voltdb/InProcessVoltDBServer.java | InProcessVoltDBServer.start | public InProcessVoltDBServer start() {
DeploymentBuilder depBuilder = new DeploymentBuilder(sitesPerHost, 1, 0);
depBuilder.setEnableCommandLogging(false);
depBuilder.setUseDDLSchema(true);
depBuilder.setHTTPDPort(8080);
depBuilder.setJSONAPIEnabled(true);
VoltDB.Configu... | java | public InProcessVoltDBServer start() {
DeploymentBuilder depBuilder = new DeploymentBuilder(sitesPerHost, 1, 0);
depBuilder.setEnableCommandLogging(false);
depBuilder.setUseDDLSchema(true);
depBuilder.setHTTPDPort(8080);
depBuilder.setJSONAPIEnabled(true);
VoltDB.Configu... | [
"public",
"InProcessVoltDBServer",
"start",
"(",
")",
"{",
"DeploymentBuilder",
"depBuilder",
"=",
"new",
"DeploymentBuilder",
"(",
"sitesPerHost",
",",
"1",
",",
"0",
")",
";",
"depBuilder",
".",
"setEnableCommandLogging",
"(",
"false",
")",
";",
"depBuilder",
... | Starts the in-process server and blocks until it is ready to accept
connections.
@return InProcessVoltDBServer instance for chaining. | [
"Starts",
"the",
"in",
"-",
"process",
"server",
"and",
"blocks",
"until",
"it",
"is",
"ready",
"to",
"accept",
"connections",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/InProcessVoltDBServer.java#L78-L111 |
61,807 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/View.java | View.compile | public void compile(Session session) {
if (!database.schemaManager.schemaExists(compileTimeSchema.name)) {
compileTimeSchema = session.getSchemaHsqlName(null);
}
session.setSchema(compileTimeSchema.name);
ParserDQL p = new ParserDQL(session, new Scanner(statement));
... | java | public void compile(Session session) {
if (!database.schemaManager.schemaExists(compileTimeSchema.name)) {
compileTimeSchema = session.getSchemaHsqlName(null);
}
session.setSchema(compileTimeSchema.name);
ParserDQL p = new ParserDQL(session, new Scanner(statement));
... | [
"public",
"void",
"compile",
"(",
"Session",
"session",
")",
"{",
"if",
"(",
"!",
"database",
".",
"schemaManager",
".",
"schemaExists",
"(",
"compileTimeSchema",
".",
"name",
")",
")",
"{",
"compileTimeSchema",
"=",
"session",
".",
"getSchemaHsqlName",
"(",
... | Compiles the query expression and sets up the columns. | [
"Compiles",
"the",
"query",
"expression",
"and",
"sets",
"up",
"the",
"columns",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/View.java#L107-L171 |
61,808 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.loadAndUpgradeCatalogFromJar | public static Pair<InMemoryJarfile, String> loadAndUpgradeCatalogFromJar(byte[] catalogBytes, boolean isXDCR)
throws IOException
{
// Throws IOException on load failure.
InMemoryJarfile jarfile = loadInMemoryJarFile(catalogBytes);
return loadAndUpgradeCatalogFromJar(jarfile, isXDCR)... | java | public static Pair<InMemoryJarfile, String> loadAndUpgradeCatalogFromJar(byte[] catalogBytes, boolean isXDCR)
throws IOException
{
// Throws IOException on load failure.
InMemoryJarfile jarfile = loadInMemoryJarFile(catalogBytes);
return loadAndUpgradeCatalogFromJar(jarfile, isXDCR)... | [
"public",
"static",
"Pair",
"<",
"InMemoryJarfile",
",",
"String",
">",
"loadAndUpgradeCatalogFromJar",
"(",
"byte",
"[",
"]",
"catalogBytes",
",",
"boolean",
"isXDCR",
")",
"throws",
"IOException",
"{",
"// Throws IOException on load failure.",
"InMemoryJarfile",
"jarf... | Load a catalog from the jar bytes.
@param catalogBytes
@param isXDCR
@return Pair containing updated InMemoryJarFile and upgraded version (or null if it wasn't upgraded)
@throws IOException
If the catalog cannot be loaded because it's incompatible, or
if there is no version information in the catalog. | [
"Load",
"a",
"catalog",
"from",
"the",
"jar",
"bytes",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L254-L261 |
61,809 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.loadAndUpgradeCatalogFromJar | public static Pair<InMemoryJarfile, String> loadAndUpgradeCatalogFromJar(InMemoryJarfile jarfile, boolean isXDCR)
throws IOException
{
// Let VoltCompiler do a version check and upgrade the catalog on the fly.
// I.e. jarfile may be modified.
VoltCompiler compiler = new VoltCompiler(... | java | public static Pair<InMemoryJarfile, String> loadAndUpgradeCatalogFromJar(InMemoryJarfile jarfile, boolean isXDCR)
throws IOException
{
// Let VoltCompiler do a version check and upgrade the catalog on the fly.
// I.e. jarfile may be modified.
VoltCompiler compiler = new VoltCompiler(... | [
"public",
"static",
"Pair",
"<",
"InMemoryJarfile",
",",
"String",
">",
"loadAndUpgradeCatalogFromJar",
"(",
"InMemoryJarfile",
"jarfile",
",",
"boolean",
"isXDCR",
")",
"throws",
"IOException",
"{",
"// Let VoltCompiler do a version check and upgrade the catalog on the fly.",
... | Load a catalog from the InMemoryJarfile.
@param jarfile
@return Pair containing updated InMemoryJarFile and upgraded version (or null if it wasn't upgraded)
@throws IOException if there is no version information in the catalog. | [
"Load",
"a",
"catalog",
"from",
"the",
"InMemoryJarfile",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L270-L278 |
61,810 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.getSerializedCatalogStringFromJar | public static String getSerializedCatalogStringFromJar(InMemoryJarfile jarfile)
{
byte[] serializedCatalogBytes = jarfile.get(CatalogUtil.CATALOG_FILENAME);
String serializedCatalog = new String(serializedCatalogBytes, Constants.UTF8ENCODING);
return serializedCatalog;
} | java | public static String getSerializedCatalogStringFromJar(InMemoryJarfile jarfile)
{
byte[] serializedCatalogBytes = jarfile.get(CatalogUtil.CATALOG_FILENAME);
String serializedCatalog = new String(serializedCatalogBytes, Constants.UTF8ENCODING);
return serializedCatalog;
} | [
"public",
"static",
"String",
"getSerializedCatalogStringFromJar",
"(",
"InMemoryJarfile",
"jarfile",
")",
"{",
"byte",
"[",
"]",
"serializedCatalogBytes",
"=",
"jarfile",
".",
"get",
"(",
"CatalogUtil",
".",
"CATALOG_FILENAME",
")",
";",
"String",
"serializedCatalog"... | Convenience method to extract the catalog commands from an InMemoryJarfile as a string | [
"Convenience",
"method",
"to",
"extract",
"the",
"catalog",
"commands",
"from",
"an",
"InMemoryJarfile",
"as",
"a",
"string"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L283-L288 |
61,811 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.getBuildInfoFromJar | public static String[] getBuildInfoFromJar(InMemoryJarfile jarfile)
throws IOException
{
// Read the raw build info bytes.
byte[] buildInfoBytes = jarfile.get(CATALOG_BUILDINFO_FILENAME);
if (buildInfoBytes == null) {
throw new IOException("Catalog build information n... | java | public static String[] getBuildInfoFromJar(InMemoryJarfile jarfile)
throws IOException
{
// Read the raw build info bytes.
byte[] buildInfoBytes = jarfile.get(CATALOG_BUILDINFO_FILENAME);
if (buildInfoBytes == null) {
throw new IOException("Catalog build information n... | [
"public",
"static",
"String",
"[",
"]",
"getBuildInfoFromJar",
"(",
"InMemoryJarfile",
"jarfile",
")",
"throws",
"IOException",
"{",
"// Read the raw build info bytes.",
"byte",
"[",
"]",
"buildInfoBytes",
"=",
"jarfile",
".",
"get",
"(",
"CATALOG_BUILDINFO_FILENAME",
... | Get the catalog build info from the jar bytes.
Performs sanity checks on the build info and version strings.
@param jarfile in-memory catalog jar file
@return build info lines
@throws IOException If the catalog or the version string cannot be loaded. | [
"Get",
"the",
"catalog",
"build",
"info",
"from",
"the",
"jar",
"bytes",
".",
"Performs",
"sanity",
"checks",
"on",
"the",
"build",
"info",
"and",
"version",
"strings",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L298-L328 |
61,812 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.getAutoGenDDLFromJar | public static String getAutoGenDDLFromJar(InMemoryJarfile jarfile)
throws IOException
{
// Read the raw auto generated ddl bytes.
byte[] ddlBytes = jarfile.get(VoltCompiler.AUTOGEN_DDL_FILE_NAME);
if (ddlBytes == null) {
throw new IOException("Auto generated schema DD... | java | public static String getAutoGenDDLFromJar(InMemoryJarfile jarfile)
throws IOException
{
// Read the raw auto generated ddl bytes.
byte[] ddlBytes = jarfile.get(VoltCompiler.AUTOGEN_DDL_FILE_NAME);
if (ddlBytes == null) {
throw new IOException("Auto generated schema DD... | [
"public",
"static",
"String",
"getAutoGenDDLFromJar",
"(",
"InMemoryJarfile",
"jarfile",
")",
"throws",
"IOException",
"{",
"// Read the raw auto generated ddl bytes.",
"byte",
"[",
"]",
"ddlBytes",
"=",
"jarfile",
".",
"get",
"(",
"VoltCompiler",
".",
"AUTOGEN_DDL_FILE... | Get the auto generated DDL from the catalog jar.
@param jarfile in-memory catalog jar file
@return Auto generated DDL stored in catalog.jar
@throws IOException If the catalog or the auto generated ddl cannot be loaded. | [
"Get",
"the",
"auto",
"generated",
"DDL",
"from",
"the",
"catalog",
"jar",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L337-L347 |
61,813 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.getCatalogJarWithoutDefaultArtifacts | public static InMemoryJarfile getCatalogJarWithoutDefaultArtifacts(final InMemoryJarfile jarfile) {
InMemoryJarfile cloneJar = jarfile.deepCopy();
for (String entry : CATALOG_DEFAULT_ARTIFACTS) {
cloneJar.remove(entry);
}
return cloneJar;
} | java | public static InMemoryJarfile getCatalogJarWithoutDefaultArtifacts(final InMemoryJarfile jarfile) {
InMemoryJarfile cloneJar = jarfile.deepCopy();
for (String entry : CATALOG_DEFAULT_ARTIFACTS) {
cloneJar.remove(entry);
}
return cloneJar;
} | [
"public",
"static",
"InMemoryJarfile",
"getCatalogJarWithoutDefaultArtifacts",
"(",
"final",
"InMemoryJarfile",
"jarfile",
")",
"{",
"InMemoryJarfile",
"cloneJar",
"=",
"jarfile",
".",
"deepCopy",
"(",
")",
";",
"for",
"(",
"String",
"entry",
":",
"CATALOG_DEFAULT_ART... | Removes the default voltdb artifact files from catalog and returns the resulltant
jar file. This will contain dependency files needed for generated stored procs
@param jarfile in-memory catalog jar file
@return In-memory jar file containing dependency files for stored procedures | [
"Removes",
"the",
"default",
"voltdb",
"artifact",
"files",
"from",
"catalog",
"and",
"returns",
"the",
"resulltant",
"jar",
"file",
".",
"This",
"will",
"contain",
"dependency",
"files",
"needed",
"for",
"generated",
"stored",
"procs"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L356-L362 |
61,814 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.loadInMemoryJarFile | public static InMemoryJarfile loadInMemoryJarFile(byte[] catalogBytes)
throws IOException
{
assert(catalogBytes != null);
InMemoryJarfile jarfile = new InMemoryJarfile(catalogBytes);
if (!jarfile.containsKey(CATALOG_FILENAME)) {
throw new IOException("Database catalo... | java | public static InMemoryJarfile loadInMemoryJarFile(byte[] catalogBytes)
throws IOException
{
assert(catalogBytes != null);
InMemoryJarfile jarfile = new InMemoryJarfile(catalogBytes);
if (!jarfile.containsKey(CATALOG_FILENAME)) {
throw new IOException("Database catalo... | [
"public",
"static",
"InMemoryJarfile",
"loadInMemoryJarFile",
"(",
"byte",
"[",
"]",
"catalogBytes",
")",
"throws",
"IOException",
"{",
"assert",
"(",
"catalogBytes",
"!=",
"null",
")",
";",
"InMemoryJarfile",
"jarfile",
"=",
"new",
"InMemoryJarfile",
"(",
"catalo... | Load an in-memory catalog jar file from jar bytes.
@param catalogBytes
@param log
@return The in-memory jar containing the loaded catalog.
@throws IOException If the catalog cannot be loaded. | [
"Load",
"an",
"in",
"-",
"memory",
"catalog",
"jar",
"file",
"from",
"jar",
"bytes",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L372-L383 |
61,815 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.isSnapshotablePersistentTableView | public static boolean isSnapshotablePersistentTableView(Database db, Table table) {
Table materializer = table.getMaterializer();
if (materializer == null) {
// Return false if it is not a materialized view.
return false;
}
if (CatalogUtil.isTableExportOnly(db, ma... | java | public static boolean isSnapshotablePersistentTableView(Database db, Table table) {
Table materializer = table.getMaterializer();
if (materializer == null) {
// Return false if it is not a materialized view.
return false;
}
if (CatalogUtil.isTableExportOnly(db, ma... | [
"public",
"static",
"boolean",
"isSnapshotablePersistentTableView",
"(",
"Database",
"db",
",",
"Table",
"table",
")",
"{",
"Table",
"materializer",
"=",
"table",
".",
"getMaterializer",
"(",
")",
";",
"if",
"(",
"materializer",
"==",
"null",
")",
"{",
"// Ret... | Test if a table is a persistent table view and should be included in the snapshot.
@param db The database catalog
@param table The table to test.</br>
@return If the table is a persistent table view that should be snapshotted. | [
"Test",
"if",
"a",
"table",
"is",
"a",
"persistent",
"table",
"view",
"and",
"should",
"be",
"included",
"in",
"the",
"snapshot",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L418-L436 |
61,816 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.isSnapshotableStreamedTableView | public static boolean isSnapshotableStreamedTableView(Database db, Table table) {
Table materializer = table.getMaterializer();
if (materializer == null) {
// Return false if it is not a materialized view.
return false;
}
if (! CatalogUtil.isTableExportOnly(db, ma... | java | public static boolean isSnapshotableStreamedTableView(Database db, Table table) {
Table materializer = table.getMaterializer();
if (materializer == null) {
// Return false if it is not a materialized view.
return false;
}
if (! CatalogUtil.isTableExportOnly(db, ma... | [
"public",
"static",
"boolean",
"isSnapshotableStreamedTableView",
"(",
"Database",
"db",
",",
"Table",
"table",
")",
"{",
"Table",
"materializer",
"=",
"table",
".",
"getMaterializer",
"(",
")",
";",
"if",
"(",
"materializer",
"==",
"null",
")",
"{",
"// Retur... | Test if a table is a streamed table view and should be included in the snapshot.
@param db The database catalog
@param table The table to test.</br>
@return If the table is a streamed table view that should be snapshotted. | [
"Test",
"if",
"a",
"table",
"is",
"a",
"streamed",
"table",
"view",
"and",
"should",
"be",
"included",
"in",
"the",
"snapshot",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L444-L466 |
61,817 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.getUniqueIdForFragment | public static long getUniqueIdForFragment(PlanFragment frag) {
long retval = 0;
CatalogType parent = frag.getParent();
retval = ((long) parent.getParent().getRelativeIndex()) << 32;
retval += ((long) parent.getRelativeIndex()) << 16;
retval += frag.getRelativeIndex();
re... | java | public static long getUniqueIdForFragment(PlanFragment frag) {
long retval = 0;
CatalogType parent = frag.getParent();
retval = ((long) parent.getParent().getRelativeIndex()) << 32;
retval += ((long) parent.getRelativeIndex()) << 16;
retval += frag.getRelativeIndex();
re... | [
"public",
"static",
"long",
"getUniqueIdForFragment",
"(",
"PlanFragment",
"frag",
")",
"{",
"long",
"retval",
"=",
"0",
";",
"CatalogType",
"parent",
"=",
"frag",
".",
"getParent",
"(",
")",
";",
"retval",
"=",
"(",
"(",
"long",
")",
"parent",
".",
"get... | Get a unique id for a plan fragment by munging the indices of it's parents
and grandparents in the catalog.
@param frag Catalog fragment to identify
@return unique id for fragment | [
"Get",
"a",
"unique",
"id",
"for",
"a",
"plan",
"fragment",
"by",
"munging",
"the",
"indices",
"of",
"it",
"s",
"parents",
"and",
"grandparents",
"in",
"the",
"catalog",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L475-L483 |
61,818 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.getSortedCatalogItems | public static <T extends CatalogType> List<T> getSortedCatalogItems(CatalogMap<T> items, String sortFieldName) {
assert(items != null);
assert(sortFieldName != null);
// build a treemap based on the field value
TreeMap<Object, T> map = new TreeMap<>();
boolean hasField = false;
... | java | public static <T extends CatalogType> List<T> getSortedCatalogItems(CatalogMap<T> items, String sortFieldName) {
assert(items != null);
assert(sortFieldName != null);
// build a treemap based on the field value
TreeMap<Object, T> map = new TreeMap<>();
boolean hasField = false;
... | [
"public",
"static",
"<",
"T",
"extends",
"CatalogType",
">",
"List",
"<",
"T",
">",
"getSortedCatalogItems",
"(",
"CatalogMap",
"<",
"T",
">",
"items",
",",
"String",
"sortFieldName",
")",
"{",
"assert",
"(",
"items",
"!=",
"null",
")",
";",
"assert",
"(... | Given a set of catalog items, return a sorted list of them, sorted by
the value of a specified field. The field is specified by name. If the
field doesn't exist, trip an assertion. This is primarily used to sort
a table's columns or a procedure's parameters.
@param <T> The type of item to sort.
@param items The set of... | [
"Given",
"a",
"set",
"of",
"catalog",
"items",
"return",
"a",
"sorted",
"list",
"of",
"them",
"sorted",
"by",
"the",
"value",
"of",
"a",
"specified",
"field",
".",
"The",
"field",
"is",
"specified",
"by",
"name",
".",
"If",
"the",
"field",
"doesn",
"t"... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L536-L560 |
61,819 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.getSortedCatalogItems | public static <T extends CatalogType> void getSortedCatalogItems(CatalogMap<T> items, String sortFieldName, List<T> result) {
result.addAll(getSortedCatalogItems(items, sortFieldName ));
} | java | public static <T extends CatalogType> void getSortedCatalogItems(CatalogMap<T> items, String sortFieldName, List<T> result) {
result.addAll(getSortedCatalogItems(items, sortFieldName ));
} | [
"public",
"static",
"<",
"T",
"extends",
"CatalogType",
">",
"void",
"getSortedCatalogItems",
"(",
"CatalogMap",
"<",
"T",
">",
"items",
",",
"String",
"sortFieldName",
",",
"List",
"<",
"T",
">",
"result",
")",
"{",
"result",
".",
"addAll",
"(",
"getSorte... | A getSortedCatalogItems variant with the result list filled in-place
@param <T> The type of item to sort.
@param items The set of catalog items.
@param sortFieldName The name of the field to sort on.
@param result An output list of catalog items, sorted on the specified field. | [
"A",
"getSortedCatalogItems",
"variant",
"with",
"the",
"result",
"list",
"filled",
"in",
"-",
"place"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L569-L571 |
61,820 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.getPrimaryKeyIndex | public static Index getPrimaryKeyIndex(Table catalogTable) throws Exception {
// We first need to find the pkey constraint
Constraint catalog_constraint = null;
for (Constraint c : catalogTable.getConstraints()) {
if (c.getType() == ConstraintType.PRIMARY_KEY.getValue()) {
... | java | public static Index getPrimaryKeyIndex(Table catalogTable) throws Exception {
// We first need to find the pkey constraint
Constraint catalog_constraint = null;
for (Constraint c : catalogTable.getConstraints()) {
if (c.getType() == ConstraintType.PRIMARY_KEY.getValue()) {
... | [
"public",
"static",
"Index",
"getPrimaryKeyIndex",
"(",
"Table",
"catalogTable",
")",
"throws",
"Exception",
"{",
"// We first need to find the pkey constraint",
"Constraint",
"catalog_constraint",
"=",
"null",
";",
"for",
"(",
"Constraint",
"c",
":",
"catalogTable",
".... | For a given Table catalog object, return the PrimaryKey Index catalog object
@param catalogTable
@return The index representing the primary key.
@throws Exception if the table does not define a primary key | [
"For",
"a",
"given",
"Table",
"catalog",
"object",
"return",
"the",
"PrimaryKey",
"Index",
"catalog",
"object"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L579-L595 |
61,821 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.getPrimaryKeyColumns | public static Collection<Column> getPrimaryKeyColumns(Table catalogTable) {
Collection<Column> columns = new ArrayList<>();
Index catalog_idx = null;
try {
catalog_idx = CatalogUtil.getPrimaryKeyIndex(catalogTable);
} catch (Exception ex) {
// IGNORE
r... | java | public static Collection<Column> getPrimaryKeyColumns(Table catalogTable) {
Collection<Column> columns = new ArrayList<>();
Index catalog_idx = null;
try {
catalog_idx = CatalogUtil.getPrimaryKeyIndex(catalogTable);
} catch (Exception ex) {
// IGNORE
r... | [
"public",
"static",
"Collection",
"<",
"Column",
">",
"getPrimaryKeyColumns",
"(",
"Table",
"catalogTable",
")",
"{",
"Collection",
"<",
"Column",
">",
"columns",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"Index",
"catalog_idx",
"=",
"null",
";",
"try",
... | Return all the of the primary key columns for a particular table
If the table does not have a primary key, then the returned list will be empty
@param catalogTable
@return An ordered list of the primary key columns | [
"Return",
"all",
"the",
"of",
"the",
"primary",
"key",
"columns",
"for",
"a",
"particular",
"table",
"If",
"the",
"table",
"does",
"not",
"have",
"a",
"primary",
"key",
"then",
"the",
"returned",
"list",
"will",
"be",
"empty"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L603-L618 |
61,822 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.isTableExportOnly | public static boolean isTableExportOnly(org.voltdb.catalog.Database database,
org.voltdb.catalog.Table table) {
int type = table.getTabletype();
if (TableType.isInvalidType(type)) {
// This implementation uses connectors instead of just looking at ... | java | public static boolean isTableExportOnly(org.voltdb.catalog.Database database,
org.voltdb.catalog.Table table) {
int type = table.getTabletype();
if (TableType.isInvalidType(type)) {
// This implementation uses connectors instead of just looking at ... | [
"public",
"static",
"boolean",
"isTableExportOnly",
"(",
"org",
".",
"voltdb",
".",
"catalog",
".",
"Database",
"database",
",",
"org",
".",
"voltdb",
".",
"catalog",
".",
"Table",
"table",
")",
"{",
"int",
"type",
"=",
"table",
".",
"getTabletype",
"(",
... | Return true if a table is a stream
This function is duplicated in CatalogUtil.h
@param database
@param table
@return true if a table is export or false otherwise | [
"Return",
"true",
"if",
"a",
"table",
"is",
"a",
"stream",
"This",
"function",
"is",
"duplicated",
"in",
"CatalogUtil",
".",
"h"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L706-L727 |
61,823 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.isTableMaterializeViewSource | public static boolean isTableMaterializeViewSource(org.voltdb.catalog.Database database,
org.voltdb.catalog.Table table)
{
CatalogMap<Table> tables = database.getTables();
for (Table t : tables) {
Table matsrc = t.getMaterializer();
... | java | public static boolean isTableMaterializeViewSource(org.voltdb.catalog.Database database,
org.voltdb.catalog.Table table)
{
CatalogMap<Table> tables = database.getTables();
for (Table t : tables) {
Table matsrc = t.getMaterializer();
... | [
"public",
"static",
"boolean",
"isTableMaterializeViewSource",
"(",
"org",
".",
"voltdb",
".",
"catalog",
".",
"Database",
"database",
",",
"org",
".",
"voltdb",
".",
"catalog",
".",
"Table",
"table",
")",
"{",
"CatalogMap",
"<",
"Table",
">",
"tables",
"=",... | Return true if a table is the source table for a materialized view. | [
"Return",
"true",
"if",
"a",
"table",
"is",
"the",
"source",
"table",
"for",
"a",
"materialized",
"view",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L753-L764 |
61,824 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.getMaterializeViews | public static List<Table> getMaterializeViews(org.voltdb.catalog.Database database,
org.voltdb.catalog.Table table)
{
ArrayList<Table> tlist = new ArrayList<>();
CatalogMap<Table> tables = database.getTables();
for (Table t : tables) {
... | java | public static List<Table> getMaterializeViews(org.voltdb.catalog.Database database,
org.voltdb.catalog.Table table)
{
ArrayList<Table> tlist = new ArrayList<>();
CatalogMap<Table> tables = database.getTables();
for (Table t : tables) {
... | [
"public",
"static",
"List",
"<",
"Table",
">",
"getMaterializeViews",
"(",
"org",
".",
"voltdb",
".",
"catalog",
".",
"Database",
"database",
",",
"org",
".",
"voltdb",
".",
"catalog",
".",
"Table",
"table",
")",
"{",
"ArrayList",
"<",
"Table",
">",
"tli... | Return list of materialized view for table. | [
"Return",
"list",
"of",
"materialized",
"view",
"for",
"table",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L769-L781 |
61,825 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.isCatalogCompatible | public static boolean isCatalogCompatible(String catalogVersionStr)
{
if (catalogVersionStr == null || catalogVersionStr.isEmpty()) {
return false;
}
//Check that it is a properly formed verstion string
Object[] catalogVersion = MiscUtils.parseVersionString(catalogVersio... | java | public static boolean isCatalogCompatible(String catalogVersionStr)
{
if (catalogVersionStr == null || catalogVersionStr.isEmpty()) {
return false;
}
//Check that it is a properly formed verstion string
Object[] catalogVersion = MiscUtils.parseVersionString(catalogVersio... | [
"public",
"static",
"boolean",
"isCatalogCompatible",
"(",
"String",
"catalogVersionStr",
")",
"{",
"if",
"(",
"catalogVersionStr",
"==",
"null",
"||",
"catalogVersionStr",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"//Check that it is a prop... | Check if a catalog compiled with the given version of VoltDB is
compatible with the current version of VoltDB.
@param catalogVersionStr
The version string of the VoltDB that compiled the catalog.
@return true if it's compatible, false otherwise. | [
"Check",
"if",
"a",
"catalog",
"compiled",
"with",
"the",
"given",
"version",
"of",
"VoltDB",
"is",
"compatible",
"with",
"the",
"current",
"version",
"of",
"VoltDB",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L792-L809 |
61,826 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.isCatalogVersionValid | public static boolean isCatalogVersionValid(String catalogVersionStr)
{
// Do we have a version string?
if (catalogVersionStr == null || catalogVersionStr.isEmpty()) {
return false;
}
//Check that it is a properly formed version string
Object[] catalogVersion = M... | java | public static boolean isCatalogVersionValid(String catalogVersionStr)
{
// Do we have a version string?
if (catalogVersionStr == null || catalogVersionStr.isEmpty()) {
return false;
}
//Check that it is a properly formed version string
Object[] catalogVersion = M... | [
"public",
"static",
"boolean",
"isCatalogVersionValid",
"(",
"String",
"catalogVersionStr",
")",
"{",
"// Do we have a version string?",
"if",
"(",
"catalogVersionStr",
"==",
"null",
"||",
"catalogVersionStr",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"false",
"... | Check if a catalog version string is valid.
@param catalogVersionStr
The version string of the VoltDB that compiled the catalog.
@return true if it's valid, false otherwise. | [
"Check",
"if",
"a",
"catalog",
"version",
"string",
"is",
"valid",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L819-L834 |
61,827 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.compileDeployment | public static String compileDeployment(Catalog catalog,
DeploymentType deployment,
boolean isPlaceHolderCatalog)
{
String errmsg = null;
try {
validateDeployment(catalog, deployment);
// add our hacky Deployment to the catalog
if (catalog... | java | public static String compileDeployment(Catalog catalog,
DeploymentType deployment,
boolean isPlaceHolderCatalog)
{
String errmsg = null;
try {
validateDeployment(catalog, deployment);
// add our hacky Deployment to the catalog
if (catalog... | [
"public",
"static",
"String",
"compileDeployment",
"(",
"Catalog",
"catalog",
",",
"DeploymentType",
"deployment",
",",
"boolean",
"isPlaceHolderCatalog",
")",
"{",
"String",
"errmsg",
"=",
"null",
";",
"try",
"{",
"validateDeployment",
"(",
"catalog",
",",
"deplo... | Parse the deployment.xml file and add its data into the catalog.
@param catalog Catalog to be updated.
@param deployment Parsed representation of the deployment.xml file.
@param isPlaceHolderCatalog if the catalog is isPlaceHolderCatalog and we are verifying only deployment xml.
@return String containing any errors par... | [
"Parse",
"the",
"deployment",
".",
"xml",
"file",
"and",
"add",
"its",
"data",
"into",
"the",
"catalog",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L864-L923 |
61,828 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.parseDeployment | public static DeploymentType parseDeployment(String deploymentURL) {
// get the URL/path for the deployment and prep an InputStream
InputStream deployIS = null;
try {
URL deployURL = new URL(deploymentURL);
deployIS = deployURL.openStream();
} catch (MalformedURLE... | java | public static DeploymentType parseDeployment(String deploymentURL) {
// get the URL/path for the deployment and prep an InputStream
InputStream deployIS = null;
try {
URL deployURL = new URL(deploymentURL);
deployIS = deployURL.openStream();
} catch (MalformedURLE... | [
"public",
"static",
"DeploymentType",
"parseDeployment",
"(",
"String",
"deploymentURL",
")",
"{",
"// get the URL/path for the deployment and prep an InputStream",
"InputStream",
"deployIS",
"=",
"null",
";",
"try",
"{",
"URL",
"deployURL",
"=",
"new",
"URL",
"(",
"dep... | Parses the deployment XML file.
@param deploymentURL Path to the deployment.xml file.
@return a reference to the root <deployment> element. | [
"Parses",
"the",
"deployment",
"XML",
"file",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L968-L994 |
61,829 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.parseDeploymentFromString | public static DeploymentType parseDeploymentFromString(String deploymentString) {
ByteArrayInputStream byteIS;
byteIS = new ByteArrayInputStream(deploymentString.getBytes(Constants.UTF8ENCODING));
// get deployment info from xml file
return getDeployment(byteIS);
} | java | public static DeploymentType parseDeploymentFromString(String deploymentString) {
ByteArrayInputStream byteIS;
byteIS = new ByteArrayInputStream(deploymentString.getBytes(Constants.UTF8ENCODING));
// get deployment info from xml file
return getDeployment(byteIS);
} | [
"public",
"static",
"DeploymentType",
"parseDeploymentFromString",
"(",
"String",
"deploymentString",
")",
"{",
"ByteArrayInputStream",
"byteIS",
";",
"byteIS",
"=",
"new",
"ByteArrayInputStream",
"(",
"deploymentString",
".",
"getBytes",
"(",
"Constants",
".",
"UTF8ENC... | Parses the deployment XML string.
@param deploymentString The deployment file content.
@return a reference to the root <deployment> element. | [
"Parses",
"the",
"deployment",
"XML",
"string",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L1001-L1006 |
61,830 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.getDeployment | public static String getDeployment(DeploymentType deployment, boolean indent) throws IOException {
try {
if (m_jc == null || m_schema == null) {
throw new RuntimeException("Error schema validation.");
}
Marshaller marshaller = m_jc.createMarshaller();
... | java | public static String getDeployment(DeploymentType deployment, boolean indent) throws IOException {
try {
if (m_jc == null || m_schema == null) {
throw new RuntimeException("Error schema validation.");
}
Marshaller marshaller = m_jc.createMarshaller();
... | [
"public",
"static",
"String",
"getDeployment",
"(",
"DeploymentType",
"deployment",
",",
"boolean",
"indent",
")",
"throws",
"IOException",
"{",
"try",
"{",
"if",
"(",
"m_jc",
"==",
"null",
"||",
"m_schema",
"==",
"null",
")",
"{",
"throw",
"new",
"RuntimeEx... | Given the deployment object generate the XML
@param deployment
@param indent
@return XML of deployment object.
@throws IOException | [
"Given",
"the",
"deployment",
"object",
"generate",
"the",
"XML"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L1213-L1236 |
61,831 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.validateDeployment | private static void validateDeployment(Catalog catalog, DeploymentType deployment) {
if (deployment.getSecurity() != null && deployment.getSecurity().isEnabled()) {
if (deployment.getUsers() == null) {
String msg = "Cannot enable security without defining at least one user in the bui... | java | private static void validateDeployment(Catalog catalog, DeploymentType deployment) {
if (deployment.getSecurity() != null && deployment.getSecurity().isEnabled()) {
if (deployment.getUsers() == null) {
String msg = "Cannot enable security without defining at least one user in the bui... | [
"private",
"static",
"void",
"validateDeployment",
"(",
"Catalog",
"catalog",
",",
"DeploymentType",
"deployment",
")",
"{",
"if",
"(",
"deployment",
".",
"getSecurity",
"(",
")",
"!=",
"null",
"&&",
"deployment",
".",
"getSecurity",
"(",
")",
".",
"isEnabled"... | Validate the contents of the deployment.xml file.
This is for validating VoltDB requirements, not XML schema correctness
@param catalog Catalog to be validated against.
@param deployment Reference to root <deployment> element of deployment file to be validated.
@throw throws a RuntimeException if any validation fails | [
"Validate",
"the",
"contents",
"of",
"the",
"deployment",
".",
"xml",
"file",
".",
"This",
"is",
"for",
"validating",
"VoltDB",
"requirements",
"not",
"XML",
"schema",
"correctness"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L1245-L1271 |
61,832 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.setClusterInfo | private static void setClusterInfo(Catalog catalog, DeploymentType deployment) {
ClusterType cluster = deployment.getCluster();
int kFactor = cluster.getKfactor();
Cluster catCluster = catalog.getClusters().get("cluster");
// copy the deployment info that is currently not recorded anywh... | java | private static void setClusterInfo(Catalog catalog, DeploymentType deployment) {
ClusterType cluster = deployment.getCluster();
int kFactor = cluster.getKfactor();
Cluster catCluster = catalog.getClusters().get("cluster");
// copy the deployment info that is currently not recorded anywh... | [
"private",
"static",
"void",
"setClusterInfo",
"(",
"Catalog",
"catalog",
",",
"DeploymentType",
"deployment",
")",
"{",
"ClusterType",
"cluster",
"=",
"deployment",
".",
"getCluster",
"(",
")",
";",
"int",
"kFactor",
"=",
"cluster",
".",
"getKfactor",
"(",
")... | Set cluster info in the catalog.
@param leader The leader hostname
@param catalog The catalog to be updated.
@param printLog Whether or not to print cluster configuration. | [
"Set",
"cluster",
"info",
"in",
"the",
"catalog",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L1308-L1337 |
61,833 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.setImportInfo | private static void setImportInfo(Catalog catalog, ImportType importType) {
if (importType == null) {
return;
}
List<String> streamList = new ArrayList<>();
List<ImportConfigurationType> kafkaConfigs = new ArrayList<>();
for (ImportConfigurationType importConfigurati... | java | private static void setImportInfo(Catalog catalog, ImportType importType) {
if (importType == null) {
return;
}
List<String> streamList = new ArrayList<>();
List<ImportConfigurationType> kafkaConfigs = new ArrayList<>();
for (ImportConfigurationType importConfigurati... | [
"private",
"static",
"void",
"setImportInfo",
"(",
"Catalog",
"catalog",
",",
"ImportType",
"importType",
")",
"{",
"if",
"(",
"importType",
"==",
"null",
")",
"{",
"return",
";",
"}",
"List",
"<",
"String",
">",
"streamList",
"=",
"new",
"ArrayList",
"<>"... | Set deployment time settings for import
@param catalog The catalog to be updated.
@param importType A reference to the <exports> element of the deployment.xml file. | [
"Set",
"deployment",
"time",
"settings",
"for",
"import"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L1848-L1873 |
61,834 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.validateKafkaConfig | private static void validateKafkaConfig(List<ImportConfigurationType> configs) {
if (configs.isEmpty()) {
return;
}
// We associate each group id with the set of topics that belong to it
HashMap<String, HashSet<String>> groupidToTopics = new HashMap<>();
for (ImportCo... | java | private static void validateKafkaConfig(List<ImportConfigurationType> configs) {
if (configs.isEmpty()) {
return;
}
// We associate each group id with the set of topics that belong to it
HashMap<String, HashSet<String>> groupidToTopics = new HashMap<>();
for (ImportCo... | [
"private",
"static",
"void",
"validateKafkaConfig",
"(",
"List",
"<",
"ImportConfigurationType",
">",
"configs",
")",
"{",
"if",
"(",
"configs",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
";",
"}",
"// We associate each group id with the set of topics that belong t... | Check whether two Kafka configurations have both the same topic and group id. If two configurations
have the same group id and overlapping sets of topics, a RuntimeException will be thrown.
@param configs All parsed Kafka configurations | [
"Check",
"whether",
"two",
"Kafka",
"configurations",
"have",
"both",
"the",
"same",
"topic",
"and",
"group",
"id",
".",
"If",
"two",
"configurations",
"have",
"the",
"same",
"group",
"id",
"and",
"overlapping",
"sets",
"of",
"topics",
"a",
"RuntimeException",... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L1880-L1914 |
61,835 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.setSnmpInfo | private static void setSnmpInfo(SnmpType snmpType) {
if (snmpType == null || !snmpType.isEnabled()) {
return;
}
//Validate Snmp Configuration.
if (snmpType.getTarget() == null || snmpType.getTarget().trim().length() == 0) {
throw new IllegalArgumentException("Targ... | java | private static void setSnmpInfo(SnmpType snmpType) {
if (snmpType == null || !snmpType.isEnabled()) {
return;
}
//Validate Snmp Configuration.
if (snmpType.getTarget() == null || snmpType.getTarget().trim().length() == 0) {
throw new IllegalArgumentException("Targ... | [
"private",
"static",
"void",
"setSnmpInfo",
"(",
"SnmpType",
"snmpType",
")",
"{",
"if",
"(",
"snmpType",
"==",
"null",
"||",
"!",
"snmpType",
".",
"isEnabled",
"(",
")",
")",
"{",
"return",
";",
"}",
"//Validate Snmp Configuration.",
"if",
"(",
"snmpType",
... | Validate Snmp Configuration.
@param snmpType | [
"Validate",
"Snmp",
"Configuration",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L1920-L1934 |
61,836 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.mergeKafka10ImportConfigurations | private static void mergeKafka10ImportConfigurations(Map<String, ImportConfiguration> processorConfig) {
if (processorConfig.isEmpty()) {
return;
}
Map<String, ImportConfiguration> kafka10ProcessorConfigs = new HashMap<>();
Iterator<Map.Entry<String, ImportConfiguration>> it... | java | private static void mergeKafka10ImportConfigurations(Map<String, ImportConfiguration> processorConfig) {
if (processorConfig.isEmpty()) {
return;
}
Map<String, ImportConfiguration> kafka10ProcessorConfigs = new HashMap<>();
Iterator<Map.Entry<String, ImportConfiguration>> it... | [
"private",
"static",
"void",
"mergeKafka10ImportConfigurations",
"(",
"Map",
"<",
"String",
",",
"ImportConfiguration",
">",
"processorConfig",
")",
"{",
"if",
"(",
"processorConfig",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
";",
"}",
"Map",
"<",
"String"... | aggregate Kafka10 importer configurations.One importer per brokers and kafka group. Formatters and stored procedures
can vary by topics. | [
"aggregate",
"Kafka10",
"importer",
"configurations",
".",
"One",
"importer",
"per",
"brokers",
"and",
"kafka",
"group",
".",
"Formatters",
"and",
"stored",
"procedures",
"can",
"vary",
"by",
"topics",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L1961-L2017 |
61,837 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.setSecurityEnabled | private static void setSecurityEnabled( Catalog catalog, SecurityType security) {
Cluster cluster = catalog.getClusters().get("cluster");
Database database = cluster.getDatabases().get("database");
cluster.setSecurityenabled(security.isEnabled());
database.setSecurityprovider(security.g... | java | private static void setSecurityEnabled( Catalog catalog, SecurityType security) {
Cluster cluster = catalog.getClusters().get("cluster");
Database database = cluster.getDatabases().get("database");
cluster.setSecurityenabled(security.isEnabled());
database.setSecurityprovider(security.g... | [
"private",
"static",
"void",
"setSecurityEnabled",
"(",
"Catalog",
"catalog",
",",
"SecurityType",
"security",
")",
"{",
"Cluster",
"cluster",
"=",
"catalog",
".",
"getClusters",
"(",
")",
".",
"get",
"(",
"\"cluster\"",
")",
";",
"Database",
"database",
"=",
... | Set the security setting in the catalog from the deployment file
@param catalog the catalog to be updated
@param security security element of the deployment xml | [
"Set",
"the",
"security",
"setting",
"in",
"the",
"catalog",
"from",
"the",
"deployment",
"file"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L2024-L2030 |
61,838 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.setSnapshotInfo | private static void setSnapshotInfo(Catalog catalog, SnapshotType snapshotSettings) {
Database db = catalog.getClusters().get("cluster").getDatabases().get("database");
SnapshotSchedule schedule = db.getSnapshotschedule().get("default");
if (schedule == null) {
schedule = db.getSnaps... | java | private static void setSnapshotInfo(Catalog catalog, SnapshotType snapshotSettings) {
Database db = catalog.getClusters().get("cluster").getDatabases().get("database");
SnapshotSchedule schedule = db.getSnapshotschedule().get("default");
if (schedule == null) {
schedule = db.getSnaps... | [
"private",
"static",
"void",
"setSnapshotInfo",
"(",
"Catalog",
"catalog",
",",
"SnapshotType",
"snapshotSettings",
")",
"{",
"Database",
"db",
"=",
"catalog",
".",
"getClusters",
"(",
")",
".",
"get",
"(",
"\"cluster\"",
")",
".",
"getDatabases",
"(",
")",
... | Set the auto-snapshot settings in the catalog from the deployment file
@param catalog The catalog to be updated.
@param snapshot A reference to the <snapshot> element of the deployment.xml file. | [
"Set",
"the",
"auto",
"-",
"snapshot",
"settings",
"in",
"the",
"catalog",
"from",
"the",
"deployment",
"file"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L2037-L2095 |
61,839 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.setupPaths | private static void setupPaths( PathsType paths) {
File voltDbRoot;
// Handles default voltdbroot (and completely missing "paths" element).
voltDbRoot = getVoltDbRoot(paths);
//Snapshot
setupSnapshotPaths(paths.getSnapshots(), voltDbRoot);
//export overflow
setupE... | java | private static void setupPaths( PathsType paths) {
File voltDbRoot;
// Handles default voltdbroot (and completely missing "paths" element).
voltDbRoot = getVoltDbRoot(paths);
//Snapshot
setupSnapshotPaths(paths.getSnapshots(), voltDbRoot);
//export overflow
setupE... | [
"private",
"static",
"void",
"setupPaths",
"(",
"PathsType",
"paths",
")",
"{",
"File",
"voltDbRoot",
";",
"// Handles default voltdbroot (and completely missing \"paths\" element).",
"voltDbRoot",
"=",
"getVoltDbRoot",
"(",
"paths",
")",
";",
"//Snapshot",
"setupSnapshotPa... | Set voltroot path, and set the path overrides for export overflow, partition, etc.
@param paths A reference to the <paths> element of the deployment.xml file.
@param printLog Whether or not to print paths info. | [
"Set",
"voltroot",
"path",
"and",
"set",
"the",
"path",
"overrides",
"for",
"export",
"overflow",
"partition",
"etc",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L2102-L2115 |
61,840 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.getVoltDbRoot | public static File getVoltDbRoot(PathsType paths) {
File voltDbRoot;
if (paths == null || paths.getVoltdbroot() == null || VoltDB.instance().getVoltDBRootPath(paths.getVoltdbroot()) == null) {
voltDbRoot = new VoltFile(VoltDB.DBROOT);
if (!voltDbRoot.exists()) {
h... | java | public static File getVoltDbRoot(PathsType paths) {
File voltDbRoot;
if (paths == null || paths.getVoltdbroot() == null || VoltDB.instance().getVoltDBRootPath(paths.getVoltdbroot()) == null) {
voltDbRoot = new VoltFile(VoltDB.DBROOT);
if (!voltDbRoot.exists()) {
h... | [
"public",
"static",
"File",
"getVoltDbRoot",
"(",
"PathsType",
"paths",
")",
"{",
"File",
"voltDbRoot",
";",
"if",
"(",
"paths",
"==",
"null",
"||",
"paths",
".",
"getVoltdbroot",
"(",
")",
"==",
"null",
"||",
"VoltDB",
".",
"instance",
"(",
")",
".",
... | Get a File object representing voltdbroot. Create directory if missing.
Use paths if non-null to get override default location.
@param paths override paths or null
@return File object for voltdbroot | [
"Get",
"a",
"File",
"object",
"representing",
"voltdbroot",
".",
"Create",
"directory",
"if",
"missing",
".",
"Use",
"paths",
"if",
"non",
"-",
"null",
"to",
"get",
"override",
"default",
"location",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L2124-L2146 |
61,841 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.setUsersInfo | private static void setUsersInfo(Catalog catalog, UsersType users) throws RuntimeException {
if (users == null) {
return;
}
// The database name is not available in deployment.xml (it is defined
// in project.xml). However, it must always be named "database", so
// I... | java | private static void setUsersInfo(Catalog catalog, UsersType users) throws RuntimeException {
if (users == null) {
return;
}
// The database name is not available in deployment.xml (it is defined
// in project.xml). However, it must always be named "database", so
// I... | [
"private",
"static",
"void",
"setUsersInfo",
"(",
"Catalog",
"catalog",
",",
"UsersType",
"users",
")",
"throws",
"RuntimeException",
"{",
"if",
"(",
"users",
"==",
"null",
")",
"{",
"return",
";",
"}",
"// The database name is not available in deployment.xml (it is d... | Set user info in the catalog.
@param catalog The catalog to be updated.
@param users A reference to the <users> element of the deployment.xml file.
@throws RuntimeException when there is an user with invalid masked password. | [
"Set",
"user",
"info",
"in",
"the",
"catalog",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L2281-L2348 |
61,842 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.extractUserRoles | private static Set<String> extractUserRoles(final UsersType.User user) {
Set<String> roles = new TreeSet<>();
if (user == null) {
return roles;
}
if (user.getRoles() != null && !user.getRoles().trim().isEmpty()) {
String [] rolelist = user.getRoles().trim().split... | java | private static Set<String> extractUserRoles(final UsersType.User user) {
Set<String> roles = new TreeSet<>();
if (user == null) {
return roles;
}
if (user.getRoles() != null && !user.getRoles().trim().isEmpty()) {
String [] rolelist = user.getRoles().trim().split... | [
"private",
"static",
"Set",
"<",
"String",
">",
"extractUserRoles",
"(",
"final",
"UsersType",
".",
"User",
"user",
")",
"{",
"Set",
"<",
"String",
">",
"roles",
"=",
"new",
"TreeSet",
"<>",
"(",
")",
";",
"if",
"(",
"user",
"==",
"null",
")",
"{",
... | Takes the list of roles specified in the roles user
attributes and returns a set from the comma-separated list
@param user an instance of {@link UsersType.User}
@return a {@link Set} of role name | [
"Takes",
"the",
"list",
"of",
"roles",
"specified",
"in",
"the",
"roles",
"user",
"attributes",
"and",
"returns",
"a",
"set",
"from",
"the",
"comma",
"-",
"separated",
"list"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L2356-L2373 |
61,843 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.makeDeploymentHash | public static byte[] makeDeploymentHash(byte[] inbytes)
{
MessageDigest md = null;
try {
md = MessageDigest.getInstance("SHA-1");
} catch (NoSuchAlgorithmException e) {
VoltDB.crashLocalVoltDB("Bad JVM has no SHA-1 hash.", true, e);
}
md.update(inbytes... | java | public static byte[] makeDeploymentHash(byte[] inbytes)
{
MessageDigest md = null;
try {
md = MessageDigest.getInstance("SHA-1");
} catch (NoSuchAlgorithmException e) {
VoltDB.crashLocalVoltDB("Bad JVM has no SHA-1 hash.", true, e);
}
md.update(inbytes... | [
"public",
"static",
"byte",
"[",
"]",
"makeDeploymentHash",
"(",
"byte",
"[",
"]",
"inbytes",
")",
"{",
"MessageDigest",
"md",
"=",
"null",
";",
"try",
"{",
"md",
"=",
"MessageDigest",
".",
"getInstance",
"(",
"\"SHA-1\"",
")",
";",
"}",
"catch",
"(",
... | This code appeared repeatedly. Extract method to take bytes for the catalog
or deployment file, do the irritating exception crash test, jam the bytes in,
and get the SHA-1 hash. | [
"This",
"code",
"appeared",
"repeatedly",
".",
"Extract",
"method",
"to",
"take",
"bytes",
"for",
"the",
"catalog",
"or",
"deployment",
"file",
"do",
"the",
"irritating",
"exception",
"crash",
"test",
"jam",
"the",
"bytes",
"in",
"and",
"get",
"the",
"SHA",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L2483-L2495 |
61,844 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.getSnapshotableTableNamesFromInMemoryJar | public static Pair<Set<String>, Set<String>>
getSnapshotableTableNamesFromInMemoryJar(InMemoryJarfile jarfile) {
Set<String> fullTableNames = new HashSet<>();
Set<String> optionalTableNames = new HashSet<>();
Catalog catalog = new Catalog();
catalog.execute(getSerializedCatalogString... | java | public static Pair<Set<String>, Set<String>>
getSnapshotableTableNamesFromInMemoryJar(InMemoryJarfile jarfile) {
Set<String> fullTableNames = new HashSet<>();
Set<String> optionalTableNames = new HashSet<>();
Catalog catalog = new Catalog();
catalog.execute(getSerializedCatalogString... | [
"public",
"static",
"Pair",
"<",
"Set",
"<",
"String",
">",
",",
"Set",
"<",
"String",
">",
">",
"getSnapshotableTableNamesFromInMemoryJar",
"(",
"InMemoryJarfile",
"jarfile",
")",
"{",
"Set",
"<",
"String",
">",
"fullTableNames",
"=",
"new",
"HashSet",
"<>",
... | Get all snapshot-able table names from an in-memory catalog jar file.
A snapshot-able table is one that's neither an export table nor an implicitly partitioned view.
@param jarfile a in-memory catalog jar file
@return A pair of two string sets.</br>
The first set contains a complete list of names of snapshot-able table... | [
"Get",
"all",
"snapshot",
"-",
"able",
"table",
"names",
"from",
"an",
"in",
"-",
"memory",
"catalog",
"jar",
"file",
".",
"A",
"snapshot",
"-",
"able",
"table",
"is",
"one",
"that",
"s",
"neither",
"an",
"export",
"table",
"nor",
"an",
"implicitly",
"... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L2691-L2709 |
61,845 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.getSnapshotableTables | public static Pair<List<Table>, Set<String>>
getSnapshotableTables(Database catalog, boolean isReplicated) {
List<Table> tables = new ArrayList<>();
Set<String> optionalTableNames = new HashSet<>();
for (Table table : catalog.getTables()) {
if (table.getIsreplicated() != isReplic... | java | public static Pair<List<Table>, Set<String>>
getSnapshotableTables(Database catalog, boolean isReplicated) {
List<Table> tables = new ArrayList<>();
Set<String> optionalTableNames = new HashSet<>();
for (Table table : catalog.getTables()) {
if (table.getIsreplicated() != isReplic... | [
"public",
"static",
"Pair",
"<",
"List",
"<",
"Table",
">",
",",
"Set",
"<",
"String",
">",
">",
"getSnapshotableTables",
"(",
"Database",
"catalog",
",",
"boolean",
"isReplicated",
")",
"{",
"List",
"<",
"Table",
">",
"tables",
"=",
"new",
"ArrayList",
... | Get all snapshot-able tables from the catalog. A snapshot-able table is one
that's neither an export table nor an implicitly partitioned view.
@param catalog Catalog database
@param isReplicated true to return only replicated tables,
false to return all partitioned tables
@return A pair that contains a compl... | [
"Get",
"all",
"snapshot",
"-",
"able",
"tables",
"from",
"the",
"catalog",
".",
"A",
"snapshot",
"-",
"able",
"table",
"is",
"one",
"that",
"s",
"neither",
"an",
"export",
"table",
"nor",
"an",
"implicitly",
"partitioned",
"view",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L2721-L2749 |
61,846 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.getNormalTables | public static List<Table> getNormalTables(Database catalog, boolean isReplicated) {
List<Table> tables = new ArrayList<>();
for (Table table : catalog.getTables()) {
if ((table.getIsreplicated() == isReplicated) &&
table.getMaterializer() == null &&
!C... | java | public static List<Table> getNormalTables(Database catalog, boolean isReplicated) {
List<Table> tables = new ArrayList<>();
for (Table table : catalog.getTables()) {
if ((table.getIsreplicated() == isReplicated) &&
table.getMaterializer() == null &&
!C... | [
"public",
"static",
"List",
"<",
"Table",
">",
"getNormalTables",
"(",
"Database",
"catalog",
",",
"boolean",
"isReplicated",
")",
"{",
"List",
"<",
"Table",
">",
"tables",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"Table",
"table",
":",
... | Get all normal tables from the catalog. A normal table is one that's NOT a materialized
view, nor an export table. For the lack of a better name, I call it normal.
@param catalog Catalog database
@param isReplicated true to return only replicated tables,
false to return all partitioned tables
@return A list ... | [
"Get",
"all",
"normal",
"tables",
"from",
"the",
"catalog",
".",
"A",
"normal",
"table",
"is",
"one",
"that",
"s",
"NOT",
"a",
"materialized",
"view",
"nor",
"an",
"export",
"table",
".",
"For",
"the",
"lack",
"of",
"a",
"better",
"name",
"I",
"call",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L2759-L2784 |
61,847 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.isDurableProc | public static boolean isDurableProc(String procName) {
SystemProcedureCatalog.Config sysProc = SystemProcedureCatalog.listing.get(procName);
return sysProc == null || sysProc.isDurable();
} | java | public static boolean isDurableProc(String procName) {
SystemProcedureCatalog.Config sysProc = SystemProcedureCatalog.listing.get(procName);
return sysProc == null || sysProc.isDurable();
} | [
"public",
"static",
"boolean",
"isDurableProc",
"(",
"String",
"procName",
")",
"{",
"SystemProcedureCatalog",
".",
"Config",
"sysProc",
"=",
"SystemProcedureCatalog",
".",
"listing",
".",
"get",
"(",
"procName",
")",
";",
"return",
"sysProc",
"==",
"null",
"||"... | Return if given proc is durable if its a sysproc SystemProcedureCatalog is consulted. All non sys procs are all
durable.
@param procName
@return true if proc is durable for non sys procs return true (durable) | [
"Return",
"if",
"given",
"proc",
"is",
"durable",
"if",
"its",
"a",
"sysproc",
"SystemProcedureCatalog",
"is",
"consulted",
".",
"All",
"non",
"sys",
"procs",
"are",
"all",
"durable",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L2848-L2851 |
61,848 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.createTemporaryEmptyCatalogJarFile | public static File createTemporaryEmptyCatalogJarFile(boolean isXDCR) throws IOException {
File emptyJarFile = File.createTempFile("catalog-empty", ".jar");
emptyJarFile.deleteOnExit();
VoltCompiler compiler = new VoltCompiler(isXDCR);
if (!compiler.compileEmptyCatalog(emptyJarFile.getAb... | java | public static File createTemporaryEmptyCatalogJarFile(boolean isXDCR) throws IOException {
File emptyJarFile = File.createTempFile("catalog-empty", ".jar");
emptyJarFile.deleteOnExit();
VoltCompiler compiler = new VoltCompiler(isXDCR);
if (!compiler.compileEmptyCatalog(emptyJarFile.getAb... | [
"public",
"static",
"File",
"createTemporaryEmptyCatalogJarFile",
"(",
"boolean",
"isXDCR",
")",
"throws",
"IOException",
"{",
"File",
"emptyJarFile",
"=",
"File",
".",
"createTempFile",
"(",
"\"catalog-empty\"",
",",
"\".jar\"",
")",
";",
"emptyJarFile",
".",
"dele... | Build an empty catalog jar file.
@return jar file or null (on failure)
@throws IOException on failure to create temporary jar file
@param isXDCR | [
"Build",
"an",
"empty",
"catalog",
"jar",
"file",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L2859-L2867 |
61,849 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.getSignatureForTable | public static String getSignatureForTable(String name, SortedMap<Integer, VoltType> schema) {
StringBuilder sb = new StringBuilder();
sb.append(name).append(SIGNATURE_TABLE_NAME_SEPARATOR);
for (VoltType t : schema.values()) {
sb.append(t.getSignatureChar());
}
return... | java | public static String getSignatureForTable(String name, SortedMap<Integer, VoltType> schema) {
StringBuilder sb = new StringBuilder();
sb.append(name).append(SIGNATURE_TABLE_NAME_SEPARATOR);
for (VoltType t : schema.values()) {
sb.append(t.getSignatureChar());
}
return... | [
"public",
"static",
"String",
"getSignatureForTable",
"(",
"String",
"name",
",",
"SortedMap",
"<",
"Integer",
",",
"VoltType",
">",
"schema",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"sb",
".",
"append",
"(",
"name",
")... | Get a string signature for the table represented by the args
@param name The name of the table
@param schema A sorted map of the columns in the table, keyed by column index
@return The table signature string. | [
"Get",
"a",
"string",
"signature",
"for",
"the",
"table",
"represented",
"by",
"the",
"args"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L2875-L2882 |
61,850 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.calculateDrTableSignatureAndCrc | public static Pair<Long, String> calculateDrTableSignatureAndCrc(Database catalog) {
SortedSet<Table> tables = Sets.newTreeSet();
tables.addAll(getSnapshotableTables(catalog, true).getFirst());
tables.addAll(getSnapshotableTables(catalog, false).getFirst());
final PureJavaCrc32 crc = ne... | java | public static Pair<Long, String> calculateDrTableSignatureAndCrc(Database catalog) {
SortedSet<Table> tables = Sets.newTreeSet();
tables.addAll(getSnapshotableTables(catalog, true).getFirst());
tables.addAll(getSnapshotableTables(catalog, false).getFirst());
final PureJavaCrc32 crc = ne... | [
"public",
"static",
"Pair",
"<",
"Long",
",",
"String",
">",
"calculateDrTableSignatureAndCrc",
"(",
"Database",
"catalog",
")",
"{",
"SortedSet",
"<",
"Table",
">",
"tables",
"=",
"Sets",
".",
"newTreeSet",
"(",
")",
";",
"tables",
".",
"addAll",
"(",
"ge... | Deterministically serializes all DR table signatures into a string and calculates the CRC checksum.
@param catalog The catalog
@return A pair of CRC checksum and the serialized signature string. | [
"Deterministically",
"serializes",
"all",
"DR",
"table",
"signatures",
"into",
"a",
"string",
"and",
"calculates",
"the",
"CRC",
"checksum",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L2889-L2906 |
61,851 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.deserializeCatalogSignature | public static Map<String, String> deserializeCatalogSignature(String signature) {
Map<String, String> tableSignatures = Maps.newHashMap();
for (String oneSig : signature.split(Pattern.quote(SIGNATURE_DELIMITER))) {
if (!oneSig.isEmpty()) {
final String[] parts = oneSig.split(... | java | public static Map<String, String> deserializeCatalogSignature(String signature) {
Map<String, String> tableSignatures = Maps.newHashMap();
for (String oneSig : signature.split(Pattern.quote(SIGNATURE_DELIMITER))) {
if (!oneSig.isEmpty()) {
final String[] parts = oneSig.split(... | [
"public",
"static",
"Map",
"<",
"String",
",",
"String",
">",
"deserializeCatalogSignature",
"(",
"String",
"signature",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"tableSignatures",
"=",
"Maps",
".",
"newHashMap",
"(",
")",
";",
"for",
"(",
"Stri... | Deserializes a catalog DR table signature string into a map of table signatures.
@param signature The signature string that includes multiple DR table signatures
@return A map of signatures from table names to table signatures. | [
"Deserializes",
"a",
"catalog",
"DR",
"table",
"signature",
"string",
"into",
"a",
"map",
"of",
"table",
"signatures",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L2913-L2922 |
61,852 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.getLimitPartitionRowsDeleteStmt | public static String getLimitPartitionRowsDeleteStmt(Table table) {
CatalogMap<Statement> map = table.getTuplelimitdeletestmt();
if (map.isEmpty()) {
return null;
}
assert (map.size() == 1);
return map.iterator().next().getSqltext();
} | java | public static String getLimitPartitionRowsDeleteStmt(Table table) {
CatalogMap<Statement> map = table.getTuplelimitdeletestmt();
if (map.isEmpty()) {
return null;
}
assert (map.size() == 1);
return map.iterator().next().getSqltext();
} | [
"public",
"static",
"String",
"getLimitPartitionRowsDeleteStmt",
"(",
"Table",
"table",
")",
"{",
"CatalogMap",
"<",
"Statement",
">",
"map",
"=",
"table",
".",
"getTuplelimitdeletestmt",
"(",
")",
";",
"if",
"(",
"map",
".",
"isEmpty",
"(",
")",
")",
"{",
... | Given a table, return the DELETE statement that can be executed
by a LIMIT PARTITION ROWS constraint, or NULL if there isn't one. | [
"Given",
"a",
"table",
"return",
"the",
"DELETE",
"statement",
"that",
"can",
"be",
"executed",
"by",
"a",
"LIMIT",
"PARTITION",
"ROWS",
"constraint",
"or",
"NULL",
"if",
"there",
"isn",
"t",
"one",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L2948-L2956 |
61,853 | VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.addExportConfigToDRConflictsTable | public static ExportType addExportConfigToDRConflictsTable(ExportType export) {
if (export == null) {
export = new ExportType();
}
boolean userDefineStream = false;
for (ExportConfigurationType exportConfiguration : export.getConfiguration()) {
if (exportConfigura... | java | public static ExportType addExportConfigToDRConflictsTable(ExportType export) {
if (export == null) {
export = new ExportType();
}
boolean userDefineStream = false;
for (ExportConfigurationType exportConfiguration : export.getConfiguration()) {
if (exportConfigura... | [
"public",
"static",
"ExportType",
"addExportConfigToDRConflictsTable",
"(",
"ExportType",
"export",
")",
"{",
"if",
"(",
"export",
"==",
"null",
")",
"{",
"export",
"=",
"new",
"ExportType",
"(",
")",
";",
"}",
"boolean",
"userDefineStream",
"=",
"false",
";",... | Add default configuration to DR conflicts export target if deployment file doesn't have the configuration
@param export list of export configuration | [
"Add",
"default",
"configuration",
"to",
"DR",
"conflicts",
"export",
"target",
"if",
"deployment",
"file",
"doesn",
"t",
"have",
"the",
"configuration"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L2963-L3013 |
61,854 | VoltDB/voltdb | examples/json-sessions/client/jsonsessions/JSONClient.java | JSONClient.printResults | public synchronized void printResults() throws Exception {
ClientStats stats = fullStatsContext.fetch().getStats();
String display = "\nA total of %d login requests were received...\n";
System.out.printf(display, stats.getInvocationsCompleted());
System.out.printf("Average throughput: ... | java | public synchronized void printResults() throws Exception {
ClientStats stats = fullStatsContext.fetch().getStats();
String display = "\nA total of %d login requests were received...\n";
System.out.printf(display, stats.getInvocationsCompleted());
System.out.printf("Average throughput: ... | [
"public",
"synchronized",
"void",
"printResults",
"(",
")",
"throws",
"Exception",
"{",
"ClientStats",
"stats",
"=",
"fullStatsContext",
".",
"fetch",
"(",
")",
".",
"getStats",
"(",
")",
";",
"String",
"display",
"=",
"\"\\nA total of %d login requests were receive... | Prints the results and statistics of the data load.
@throws Exception if anything unexpected happens. | [
"Prints",
"the",
"results",
"and",
"statistics",
"of",
"the",
"data",
"load",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/json-sessions/client/jsonsessions/JSONClient.java#L249-L266 |
61,855 | VoltDB/voltdb | examples/json-sessions/client/jsonsessions/JSONClient.java | JSONClient.doLogin | private void doLogin(LoginGenerator.LoginRecord login) {
// Synchronously call the "Login" procedure passing in a json string containing
// login-specific structure/data.
try {
ClientResponse response = client.callProcedure("Login",
... | java | private void doLogin(LoginGenerator.LoginRecord login) {
// Synchronously call the "Login" procedure passing in a json string containing
// login-specific structure/data.
try {
ClientResponse response = client.callProcedure("Login",
... | [
"private",
"void",
"doLogin",
"(",
"LoginGenerator",
".",
"LoginRecord",
"login",
")",
"{",
"// Synchronously call the \"Login\" procedure passing in a json string containing",
"// login-specific structure/data.",
"try",
"{",
"ClientResponse",
"response",
"=",
"client",
".",
"c... | Invoke the Login stored procedure to add a login record to the database.
If the login is called multiple times for the same username, the last accessed
time for the login is updated. Thus this sample client can be run repeatedly without
having to cycle the database. | [
"Invoke",
"the",
"Login",
"stored",
"procedure",
"to",
"add",
"a",
"login",
"record",
"to",
"the",
"database",
".",
"If",
"the",
"login",
"is",
"called",
"multiple",
"times",
"for",
"the",
"same",
"username",
"the",
"last",
"accessed",
"time",
"for",
"the"... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/json-sessions/client/jsonsessions/JSONClient.java#L274-L294 |
61,856 | VoltDB/voltdb | examples/json-sessions/client/jsonsessions/JSONClient.java | JSONClient.loadDatabase | public void loadDatabase() throws Exception {
// create/start the requested number of threads
int thread_count = 10;
Thread[] loginThreads = new Thread[thread_count];
for (int i = 0; i < thread_count; ++i) {
loginThreads[i] = new Thread(new LoginThread());
loginTh... | java | public void loadDatabase() throws Exception {
// create/start the requested number of threads
int thread_count = 10;
Thread[] loginThreads = new Thread[thread_count];
for (int i = 0; i < thread_count; ++i) {
loginThreads[i] = new Thread(new LoginThread());
loginTh... | [
"public",
"void",
"loadDatabase",
"(",
")",
"throws",
"Exception",
"{",
"// create/start the requested number of threads",
"int",
"thread_count",
"=",
"10",
";",
"Thread",
"[",
"]",
"loginThreads",
"=",
"new",
"Thread",
"[",
"thread_count",
"]",
";",
"for",
"(",
... | Load the database with as much data as possible within the specified time range.
@throws Exception if anything unexpected happens. | [
"Load",
"the",
"database",
"with",
"as",
"much",
"data",
"as",
"possible",
"within",
"the",
"specified",
"time",
"range",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/json-sessions/client/jsonsessions/JSONClient.java#L331-L363 |
61,857 | VoltDB/voltdb | examples/json-sessions/client/jsonsessions/JSONClient.java | JSONClient.main | public static void main(String[] args) throws Exception {
JSONClient app = new JSONClient();
// Initialize connections
app.initialize();
// load data, measuring the throughput.
app.loadDatabase();
// run sample JSON queries
app.runQueries();
// Disconn... | java | public static void main(String[] args) throws Exception {
JSONClient app = new JSONClient();
// Initialize connections
app.initialize();
// load data, measuring the throughput.
app.loadDatabase();
// run sample JSON queries
app.runQueries();
// Disconn... | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"throws",
"Exception",
"{",
"JSONClient",
"app",
"=",
"new",
"JSONClient",
"(",
")",
";",
"// Initialize connections",
"app",
".",
"initialize",
"(",
")",
";",
"// load data, measuring t... | Main routine creates a client instance, loads the database, then executes example
queries against the data.
@param args Command line arguments.
@throws Exception if anything goes wrong.
@see {@link LoginConfig} | [
"Main",
"routine",
"creates",
"a",
"client",
"instance",
"loads",
"the",
"database",
"then",
"executes",
"example",
"queries",
"against",
"the",
"data",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/json-sessions/client/jsonsessions/JSONClient.java#L531-L545 |
61,858 | VoltDB/voltdb | src/frontend/org/voltcore/messaging/HostMessenger.java | HostMessenger.reportForeignHostFailed | @Override
public synchronized void reportForeignHostFailed(int hostId) {
long initiatorSiteId = CoreUtils.getHSIdFromHostAndSite(hostId, AGREEMENT_SITE_ID);
m_agreementSite.reportFault(initiatorSiteId);
if (!m_shuttingDown) {
// should be the single console message a user sees wh... | java | @Override
public synchronized void reportForeignHostFailed(int hostId) {
long initiatorSiteId = CoreUtils.getHSIdFromHostAndSite(hostId, AGREEMENT_SITE_ID);
m_agreementSite.reportFault(initiatorSiteId);
if (!m_shuttingDown) {
// should be the single console message a user sees wh... | [
"@",
"Override",
"public",
"synchronized",
"void",
"reportForeignHostFailed",
"(",
"int",
"hostId",
")",
"{",
"long",
"initiatorSiteId",
"=",
"CoreUtils",
".",
"getHSIdFromHostAndSite",
"(",
"hostId",
",",
"AGREEMENT_SITE_ID",
")",
";",
"m_agreementSite",
".",
"repo... | Synchronization protects m_knownFailedHosts and ensures that every failed host is only reported
once | [
"Synchronization",
"protects",
"m_knownFailedHosts",
"and",
"ensures",
"that",
"every",
"failed",
"host",
"is",
"only",
"reported",
"once"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/HostMessenger.java#L637-L645 |
61,859 | VoltDB/voltdb | src/frontend/org/voltcore/messaging/HostMessenger.java | HostMessenger.start | public void start() throws Exception {
/*
* SJ uses this barrier if this node becomes the leader to know when ZooKeeper
* has been finished bootstrapping.
*/
CountDownLatch zkInitBarrier = new CountDownLatch(1);
/*
* If start returns true then this node is th... | java | public void start() throws Exception {
/*
* SJ uses this barrier if this node becomes the leader to know when ZooKeeper
* has been finished bootstrapping.
*/
CountDownLatch zkInitBarrier = new CountDownLatch(1);
/*
* If start returns true then this node is th... | [
"public",
"void",
"start",
"(",
")",
"throws",
"Exception",
"{",
"/*\n * SJ uses this barrier if this node becomes the leader to know when ZooKeeper\n * has been finished bootstrapping.\n */",
"CountDownLatch",
"zkInitBarrier",
"=",
"new",
"CountDownLatch",
"(",
... | Start the host messenger and connect to the leader, or become the leader
if necessary.
@param request The requested action to send to other nodes when joining
the mesh. This is opaque to the HostMessenger, it can be any
string. HostMessenger will encode this in the request to join mesh to the
live hosts. The live host... | [
"Start",
"the",
"host",
"messenger",
"and",
"connect",
"to",
"the",
"leader",
"or",
"become",
"the",
"leader",
"if",
"necessary",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/HostMessenger.java#L665-L753 |
61,860 | VoltDB/voltdb | src/frontend/org/voltcore/messaging/HostMessenger.java | HostMessenger.getInstanceId | public InstanceId getInstanceId()
{
if (m_instanceId == null)
{
try
{
byte[] data =
m_zk.getData(CoreZK.instance_id, false, null);
JSONObject idJSON = new JSONObject(new String(data, "UTF-8"));
m_instanceId =... | java | public InstanceId getInstanceId()
{
if (m_instanceId == null)
{
try
{
byte[] data =
m_zk.getData(CoreZK.instance_id, false, null);
JSONObject idJSON = new JSONObject(new String(data, "UTF-8"));
m_instanceId =... | [
"public",
"InstanceId",
"getInstanceId",
"(",
")",
"{",
"if",
"(",
"m_instanceId",
"==",
"null",
")",
"{",
"try",
"{",
"byte",
"[",
"]",
"data",
"=",
"m_zk",
".",
"getData",
"(",
"CoreZK",
".",
"instance_id",
",",
"false",
",",
"null",
")",
";",
"JSO... | Get a unique ID for this cluster
@return | [
"Get",
"a",
"unique",
"ID",
"for",
"this",
"cluster"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/HostMessenger.java#L771-L792 |
61,861 | VoltDB/voltdb | src/frontend/org/voltcore/messaging/HostMessenger.java | HostMessenger.requestJoin | @Override
public void requestJoin(SocketChannel socket, SSLEngine sslEngine,
MessagingChannel messagingChannel,
InetSocketAddress listeningAddress, JSONObject jo) throws Exception {
/*
* Generate the host id via creating an ephemeral sequentia... | java | @Override
public void requestJoin(SocketChannel socket, SSLEngine sslEngine,
MessagingChannel messagingChannel,
InetSocketAddress listeningAddress, JSONObject jo) throws Exception {
/*
* Generate the host id via creating an ephemeral sequentia... | [
"@",
"Override",
"public",
"void",
"requestJoin",
"(",
"SocketChannel",
"socket",
",",
"SSLEngine",
"sslEngine",
",",
"MessagingChannel",
"messagingChannel",
",",
"InetSocketAddress",
"listeningAddress",
",",
"JSONObject",
"jo",
")",
"throws",
"Exception",
"{",
"/*\n ... | Any node can serve a request to join. The coordination of generating a new host id
is done via ZK
@param request The requested action from the rejoining host. This is
opaque to the HostMessenger, it can be any string. The request string can
be used to make further decision on whether or not to accept the request
in th... | [
"Any",
"node",
"can",
"serve",
"a",
"request",
"to",
"join",
".",
"The",
"coordination",
"of",
"generating",
"a",
"new",
"host",
"id",
"is",
"done",
"via",
"ZK"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/HostMessenger.java#L937-L1013 |
61,862 | VoltDB/voltdb | src/frontend/org/voltcore/messaging/HostMessenger.java | HostMessenger.notifyOfConnection | @Override
public void notifyOfConnection(
int hostId,
SocketChannel socket,
SSLEngine sslEngine,
InetSocketAddress listeningAddress) throws Exception
{
networkLog.info("Host " + getHostId() + " receives a new connection from host " + hostId);
prepS... | java | @Override
public void notifyOfConnection(
int hostId,
SocketChannel socket,
SSLEngine sslEngine,
InetSocketAddress listeningAddress) throws Exception
{
networkLog.info("Host " + getHostId() + " receives a new connection from host " + hostId);
prepS... | [
"@",
"Override",
"public",
"void",
"notifyOfConnection",
"(",
"int",
"hostId",
",",
"SocketChannel",
"socket",
",",
"SSLEngine",
"sslEngine",
",",
"InetSocketAddress",
"listeningAddress",
")",
"throws",
"Exception",
"{",
"networkLog",
".",
"info",
"(",
"\"Host \"",
... | SocketJoiner receives the request of creating a new connection from given host id,
create a new ForeignHost for this connection. | [
"SocketJoiner",
"receives",
"the",
"request",
"of",
"creating",
"a",
"new",
"connection",
"from",
"given",
"host",
"id",
"create",
"a",
"new",
"ForeignHost",
"for",
"this",
"connection",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/HostMessenger.java#L1192-L1216 |
61,863 | VoltDB/voltdb | src/frontend/org/voltcore/messaging/HostMessenger.java | HostMessenger.waitForGroupJoin | public Map<Integer, HostInfo> waitForGroupJoin(int expectedHosts) {
Map<Integer, HostInfo> hostInfos = Maps.newTreeMap();
try {
while (true) {
ZKUtil.FutureWatcher fw = new ZKUtil.FutureWatcher();
final List<String> children = m_zk.getChildren(CoreZK.hosts, f... | java | public Map<Integer, HostInfo> waitForGroupJoin(int expectedHosts) {
Map<Integer, HostInfo> hostInfos = Maps.newTreeMap();
try {
while (true) {
ZKUtil.FutureWatcher fw = new ZKUtil.FutureWatcher();
final List<String> children = m_zk.getChildren(CoreZK.hosts, f... | [
"public",
"Map",
"<",
"Integer",
",",
"HostInfo",
">",
"waitForGroupJoin",
"(",
"int",
"expectedHosts",
")",
"{",
"Map",
"<",
"Integer",
",",
"HostInfo",
">",
"hostInfos",
"=",
"Maps",
".",
"newTreeMap",
"(",
")",
";",
"try",
"{",
"while",
"(",
"true",
... | Wait until all the nodes have built a mesh. | [
"Wait",
"until",
"all",
"the",
"nodes",
"have",
"built",
"a",
"mesh",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/HostMessenger.java#L1227-L1270 |
61,864 | VoltDB/voltdb | src/frontend/org/voltcore/messaging/HostMessenger.java | HostMessenger.getHostnameForHostID | @Override
public String getHostnameForHostID(int hostId) {
if (hostId == m_localHostId) {
return CoreUtils.getHostnameOrAddress();
}
Iterator<ForeignHost> it = m_foreignHosts.get(hostId).iterator();
if (it.hasNext()) {
ForeignHost fh = it.next();
r... | java | @Override
public String getHostnameForHostID(int hostId) {
if (hostId == m_localHostId) {
return CoreUtils.getHostnameOrAddress();
}
Iterator<ForeignHost> it = m_foreignHosts.get(hostId).iterator();
if (it.hasNext()) {
ForeignHost fh = it.next();
r... | [
"@",
"Override",
"public",
"String",
"getHostnameForHostID",
"(",
"int",
"hostId",
")",
"{",
"if",
"(",
"hostId",
"==",
"m_localHostId",
")",
"{",
"return",
"CoreUtils",
".",
"getHostnameOrAddress",
"(",
")",
";",
"}",
"Iterator",
"<",
"ForeignHost",
">",
"i... | Given a hostid, return the hostname for it | [
"Given",
"a",
"hostid",
"return",
"the",
"hostname",
"for",
"it"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/HostMessenger.java#L1359-L1371 |
61,865 | VoltDB/voltdb | src/frontend/org/voltcore/messaging/HostMessenger.java | HostMessenger.removeMailbox | public void removeMailbox(long hsId) {
synchronized (m_mapLock) {
ImmutableMap.Builder<Long, Mailbox> b = ImmutableMap.builder();
for (Map.Entry<Long, Mailbox> e : m_siteMailboxes.entrySet()) {
if (e.getKey().equals(hsId)) {
continue;
}... | java | public void removeMailbox(long hsId) {
synchronized (m_mapLock) {
ImmutableMap.Builder<Long, Mailbox> b = ImmutableMap.builder();
for (Map.Entry<Long, Mailbox> e : m_siteMailboxes.entrySet()) {
if (e.getKey().equals(hsId)) {
continue;
}... | [
"public",
"void",
"removeMailbox",
"(",
"long",
"hsId",
")",
"{",
"synchronized",
"(",
"m_mapLock",
")",
"{",
"ImmutableMap",
".",
"Builder",
"<",
"Long",
",",
"Mailbox",
">",
"b",
"=",
"ImmutableMap",
".",
"builder",
"(",
")",
";",
"for",
"(",
"Map",
... | Discard a mailbox | [
"Discard",
"a",
"mailbox"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/HostMessenger.java#L1584-L1595 |
61,866 | VoltDB/voltdb | src/frontend/org/voltcore/messaging/HostMessenger.java | HostMessenger.waitForAllHostsToBeReady | public void waitForAllHostsToBeReady(int expectedHosts) {
try {
m_zk.create(CoreZK.readyhosts_host, null, Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL_SEQUENTIAL);
while (true) {
ZKUtil.FutureWatcher fw = new ZKUtil.FutureWatcher();
int readyHosts = m_zk.getC... | java | public void waitForAllHostsToBeReady(int expectedHosts) {
try {
m_zk.create(CoreZK.readyhosts_host, null, Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL_SEQUENTIAL);
while (true) {
ZKUtil.FutureWatcher fw = new ZKUtil.FutureWatcher();
int readyHosts = m_zk.getC... | [
"public",
"void",
"waitForAllHostsToBeReady",
"(",
"int",
"expectedHosts",
")",
"{",
"try",
"{",
"m_zk",
".",
"create",
"(",
"CoreZK",
".",
"readyhosts_host",
",",
"null",
",",
"Ids",
".",
"OPEN_ACL_UNSAFE",
",",
"CreateMode",
".",
"EPHEMERAL_SEQUENTIAL",
")",
... | Block on this call until the number of ready hosts is
equal to the number of expected hosts. | [
"Block",
"on",
"this",
"call",
"until",
"the",
"number",
"of",
"ready",
"hosts",
"is",
"equal",
"to",
"the",
"number",
"of",
"expected",
"hosts",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/HostMessenger.java#L1655-L1669 |
61,867 | VoltDB/voltdb | src/frontend/org/voltcore/messaging/HostMessenger.java | HostMessenger.waitForJoiningHostsToBeReady | public void waitForJoiningHostsToBeReady(int expectedHosts, int localHostId) {
try {
//register this host as joining. The host registration will be deleted after joining is completed.
m_zk.create(ZKUtil.joinZKPath(CoreZK.readyjoininghosts, Integer.toString(localHostId)) , null, Ids.OPEN_... | java | public void waitForJoiningHostsToBeReady(int expectedHosts, int localHostId) {
try {
//register this host as joining. The host registration will be deleted after joining is completed.
m_zk.create(ZKUtil.joinZKPath(CoreZK.readyjoininghosts, Integer.toString(localHostId)) , null, Ids.OPEN_... | [
"public",
"void",
"waitForJoiningHostsToBeReady",
"(",
"int",
"expectedHosts",
",",
"int",
"localHostId",
")",
"{",
"try",
"{",
"//register this host as joining. The host registration will be deleted after joining is completed.",
"m_zk",
".",
"create",
"(",
"ZKUtil",
".",
"jo... | For elastic join. Block on this call until the number of ready hosts is
equal to the number of expected joining hosts. | [
"For",
"elastic",
"join",
".",
"Block",
"on",
"this",
"call",
"until",
"the",
"number",
"of",
"ready",
"hosts",
"is",
"equal",
"to",
"the",
"number",
"of",
"expected",
"joining",
"hosts",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/HostMessenger.java#L1675-L1690 |
61,868 | VoltDB/voltdb | src/frontend/org/voltcore/messaging/HostMessenger.java | HostMessenger.countForeignHosts | public int countForeignHosts() {
int retval = 0;
for (ForeignHost host : m_foreignHosts.values()) {
if ((host != null) && (host.isUp())) {
retval++;
}
}
return retval;
} | java | public int countForeignHosts() {
int retval = 0;
for (ForeignHost host : m_foreignHosts.values()) {
if ((host != null) && (host.isUp())) {
retval++;
}
}
return retval;
} | [
"public",
"int",
"countForeignHosts",
"(",
")",
"{",
"int",
"retval",
"=",
"0",
";",
"for",
"(",
"ForeignHost",
"host",
":",
"m_foreignHosts",
".",
"values",
"(",
")",
")",
"{",
"if",
"(",
"(",
"host",
"!=",
"null",
")",
"&&",
"(",
"host",
".",
"is... | Get the number of up foreign hosts. Used for test purposes.
@return The number of up foreign hosts. | [
"Get",
"the",
"number",
"of",
"up",
"foreign",
"hosts",
".",
"Used",
"for",
"test",
"purposes",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/HostMessenger.java#L1737-L1745 |
61,869 | VoltDB/voltdb | src/frontend/org/voltcore/messaging/HostMessenger.java | HostMessenger.closeForeignHostSocket | public void closeForeignHostSocket(int hostId) {
Iterator<ForeignHost> it = m_foreignHosts.get(hostId).iterator();
while (it.hasNext()) {
ForeignHost fh = it.next();
if (fh.isUp()) {
fh.killSocket();
}
}
reportForeignHostFailed(hostId);... | java | public void closeForeignHostSocket(int hostId) {
Iterator<ForeignHost> it = m_foreignHosts.get(hostId).iterator();
while (it.hasNext()) {
ForeignHost fh = it.next();
if (fh.isUp()) {
fh.killSocket();
}
}
reportForeignHostFailed(hostId);... | [
"public",
"void",
"closeForeignHostSocket",
"(",
"int",
"hostId",
")",
"{",
"Iterator",
"<",
"ForeignHost",
">",
"it",
"=",
"m_foreignHosts",
".",
"get",
"(",
"hostId",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"it",
".",
"hasNext",
"(",
")",
... | Kill a foreign host socket by id.
@param hostId The id of the foreign host to kill. | [
"Kill",
"a",
"foreign",
"host",
"socket",
"by",
"id",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/HostMessenger.java#L1751-L1760 |
61,870 | VoltDB/voltdb | src/frontend/org/voltcore/messaging/HostMessenger.java | HostMessenger.cutLink | public void cutLink(int hostIdA, int hostIdB) {
if (m_localHostId == hostIdA) {
Iterator<ForeignHost> it = m_foreignHosts.get(hostIdB).iterator();
while (it.hasNext()) {
ForeignHost fh = it.next();
fh.cutLink();
}
}
if (m_localH... | java | public void cutLink(int hostIdA, int hostIdB) {
if (m_localHostId == hostIdA) {
Iterator<ForeignHost> it = m_foreignHosts.get(hostIdB).iterator();
while (it.hasNext()) {
ForeignHost fh = it.next();
fh.cutLink();
}
}
if (m_localH... | [
"public",
"void",
"cutLink",
"(",
"int",
"hostIdA",
",",
"int",
"hostIdB",
")",
"{",
"if",
"(",
"m_localHostId",
"==",
"hostIdA",
")",
"{",
"Iterator",
"<",
"ForeignHost",
">",
"it",
"=",
"m_foreignHosts",
".",
"get",
"(",
"hostIdB",
")",
".",
"iterator"... | Cut the network connection between two hostids immediately
Useful for simulating network partitions | [
"Cut",
"the",
"network",
"connection",
"between",
"two",
"hostids",
"immediately",
"Useful",
"for",
"simulating",
"network",
"partitions"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/HostMessenger.java#L1869-L1884 |
61,871 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/DatabaseManager.java | DatabaseManager.execute | void execute() {
String sCmd = null;
if (4096 <= ifHuge.length()) {
sCmd = ifHuge;
} else {
sCmd = txtCommand.getText();
}
if (sCmd.startsWith("-->>>TEST<<<--")) {
testPerformance();
return;
}
String[] g = new S... | java | void execute() {
String sCmd = null;
if (4096 <= ifHuge.length()) {
sCmd = ifHuge;
} else {
sCmd = txtCommand.getText();
}
if (sCmd.startsWith("-->>>TEST<<<--")) {
testPerformance();
return;
}
String[] g = new S... | [
"void",
"execute",
"(",
")",
"{",
"String",
"sCmd",
"=",
"null",
";",
"if",
"(",
"4096",
"<=",
"ifHuge",
".",
"length",
"(",
")",
")",
"{",
"sCmd",
"=",
"ifHuge",
";",
"}",
"else",
"{",
"sCmd",
"=",
"txtCommand",
".",
"getText",
"(",
")",
";",
... | Adjust this method for large strings...ie multi megabtypes. | [
"Adjust",
"this",
"method",
"for",
"large",
"strings",
"...",
"ie",
"multi",
"megabtypes",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/DatabaseManager.java#L795-L856 |
61,872 | VoltDB/voltdb | third_party/java/src/au/com/bytecode/opencsv_voltpatches/CSVWriter.java | CSVWriter.writeAll | public void writeAll(java.sql.ResultSet rs, boolean includeColumnNames) throws SQLException, IOException {
if (includeColumnNames) {
writeColumnNames(rs);
}
while (rs.next())
{
writeNext(resultService.getColumnValues(rs));
}
} | java | public void writeAll(java.sql.ResultSet rs, boolean includeColumnNames) throws SQLException, IOException {
if (includeColumnNames) {
writeColumnNames(rs);
}
while (rs.next())
{
writeNext(resultService.getColumnValues(rs));
}
} | [
"public",
"void",
"writeAll",
"(",
"java",
".",
"sql",
".",
"ResultSet",
"rs",
",",
"boolean",
"includeColumnNames",
")",
"throws",
"SQLException",
",",
"IOException",
"{",
"if",
"(",
"includeColumnNames",
")",
"{",
"writeColumnNames",
"(",
"rs",
")",
";",
"... | Writes the entire ResultSet to a CSV file.
The caller is responsible for closing the ResultSet.
@param rs the recordset to write
@param includeColumnNames true if you want column names in the output, false otherwise
@throws java.io.IOException thrown by getColumnValue
@throws java.sql.SQLException thrown by getColum... | [
"Writes",
"the",
"entire",
"ResultSet",
"to",
"a",
"CSV",
"file",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/au/com/bytecode/opencsv_voltpatches/CSVWriter.java#L205-L216 |
61,873 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/tar/PIFGenerator.java | PIFGenerator.addRecord | public void addRecord(String key,
String value)
throws TarMalformatException, IOException {
if (key == null || value == null || key.length() < 1
|| value.length() < 1) {
throw new TarMalformatException(
RB.singleton... | java | public void addRecord(String key,
String value)
throws TarMalformatException, IOException {
if (key == null || value == null || key.length() < 1
|| value.length() < 1) {
throw new TarMalformatException(
RB.singleton... | [
"public",
"void",
"addRecord",
"(",
"String",
"key",
",",
"String",
"value",
")",
"throws",
"TarMalformatException",
",",
"IOException",
"{",
"if",
"(",
"key",
"==",
"null",
"||",
"value",
"==",
"null",
"||",
"key",
".",
"length",
"(",
")",
"<",
"1",
"... | I guess the "initial length" field is supposed to be in units of
characters, not bytes? | [
"I",
"guess",
"the",
"initial",
"length",
"field",
"is",
"supposed",
"to",
"be",
"in",
"units",
"of",
"characters",
"not",
"bytes?"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/tar/PIFGenerator.java#L144-L181 |
61,874 | VoltDB/voltdb | src/frontend/org/voltcore/zk/BabySitter.java | BabySitter.shutdown | synchronized public void shutdown()
{
m_shutdown.set(true);
if (m_isExecutorServiceLocal) {
try {
m_es.shutdown();
m_es.awaitTermination(365, TimeUnit.DAYS);
} catch (InterruptedException e) {
repairLog.warn("Unexpected interrup... | java | synchronized public void shutdown()
{
m_shutdown.set(true);
if (m_isExecutorServiceLocal) {
try {
m_es.shutdown();
m_es.awaitTermination(365, TimeUnit.DAYS);
} catch (InterruptedException e) {
repairLog.warn("Unexpected interrup... | [
"synchronized",
"public",
"void",
"shutdown",
"(",
")",
"{",
"m_shutdown",
".",
"set",
"(",
"true",
")",
";",
"if",
"(",
"m_isExecutorServiceLocal",
")",
"{",
"try",
"{",
"m_es",
".",
"shutdown",
"(",
")",
";",
"m_es",
".",
"awaitTermination",
"(",
"365"... | shutdown silences the babysitter and causes watches to not reset.
Note that shutting down will churn ephemeral ZK nodes - shutdown
allows the programmer to not set watches on nodes from terminated session. | [
"shutdown",
"silences",
"the",
"babysitter",
"and",
"causes",
"watches",
"to",
"not",
"reset",
".",
"Note",
"that",
"shutting",
"down",
"will",
"churn",
"ephemeral",
"ZK",
"nodes",
"-",
"shutdown",
"allows",
"the",
"programmer",
"to",
"not",
"set",
"watches",
... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/BabySitter.java#L91-L102 |
61,875 | VoltDB/voltdb | src/frontend/org/voltcore/zk/BabySitter.java | BabySitter.blockingFactory | public static Pair<BabySitter, List<String>> blockingFactory(ZooKeeper zk, String dir, Callback cb)
throws InterruptedException, ExecutionException
{
ExecutorService es = CoreUtils.getCachedSingleThreadExecutor("Babysitter-" + dir, 15000);
Pair<BabySitter, List<String>> babySitter = blocking... | java | public static Pair<BabySitter, List<String>> blockingFactory(ZooKeeper zk, String dir, Callback cb)
throws InterruptedException, ExecutionException
{
ExecutorService es = CoreUtils.getCachedSingleThreadExecutor("Babysitter-" + dir, 15000);
Pair<BabySitter, List<String>> babySitter = blocking... | [
"public",
"static",
"Pair",
"<",
"BabySitter",
",",
"List",
"<",
"String",
">",
">",
"blockingFactory",
"(",
"ZooKeeper",
"zk",
",",
"String",
"dir",
",",
"Callback",
"cb",
")",
"throws",
"InterruptedException",
",",
"ExecutionException",
"{",
"ExecutorService",... | Create a new BabySitter and block on reading the initial children list. | [
"Create",
"a",
"new",
"BabySitter",
"and",
"block",
"on",
"reading",
"the",
"initial",
"children",
"list",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/BabySitter.java#L115-L122 |
61,876 | VoltDB/voltdb | src/frontend/org/voltcore/zk/BabySitter.java | BabySitter.blockingFactory | public static Pair<BabySitter, List<String>> blockingFactory(ZooKeeper zk, String dir, Callback cb,
ExecutorService es)
throws InterruptedException, ExecutionException
{
BabySitter bs = new BabySitter(zk, dir, cb, es);
List<String> initialChildren;
try {
initi... | java | public static Pair<BabySitter, List<String>> blockingFactory(ZooKeeper zk, String dir, Callback cb,
ExecutorService es)
throws InterruptedException, ExecutionException
{
BabySitter bs = new BabySitter(zk, dir, cb, es);
List<String> initialChildren;
try {
initi... | [
"public",
"static",
"Pair",
"<",
"BabySitter",
",",
"List",
"<",
"String",
">",
">",
"blockingFactory",
"(",
"ZooKeeper",
"zk",
",",
"String",
"dir",
",",
"Callback",
"cb",
",",
"ExecutorService",
"es",
")",
"throws",
"InterruptedException",
",",
"ExecutionExc... | Create a new BabySitter and block on reading the initial children list.
Use the provided ExecutorService to queue events to, rather than
creating a private ExecutorService. The initial set of children will be retrieved
in the current thread and not the ExecutorService because it is assumed
this is being called from the... | [
"Create",
"a",
"new",
"BabySitter",
"and",
"block",
"on",
"reading",
"the",
"initial",
"children",
"list",
".",
"Use",
"the",
"provided",
"ExecutorService",
"to",
"queue",
"events",
"to",
"rather",
"than",
"creating",
"a",
"private",
"ExecutorService",
".",
"T... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/BabySitter.java#L131-L143 |
61,877 | VoltDB/voltdb | src/frontend/org/voltcore/zk/BabySitter.java | BabySitter.nonblockingFactory | public static BabySitter nonblockingFactory(ZooKeeper zk, String dir,
Callback cb, ExecutorService es)
throws InterruptedException, ExecutionException
{
BabySitter bs = new BabySitter(zk, dir, cb, es);
bs.m_es.submit(bs.m_eventHandler);
... | java | public static BabySitter nonblockingFactory(ZooKeeper zk, String dir,
Callback cb, ExecutorService es)
throws InterruptedException, ExecutionException
{
BabySitter bs = new BabySitter(zk, dir, cb, es);
bs.m_es.submit(bs.m_eventHandler);
... | [
"public",
"static",
"BabySitter",
"nonblockingFactory",
"(",
"ZooKeeper",
"zk",
",",
"String",
"dir",
",",
"Callback",
"cb",
",",
"ExecutorService",
"es",
")",
"throws",
"InterruptedException",
",",
"ExecutionException",
"{",
"BabySitter",
"bs",
"=",
"new",
"BabyS... | Create a new BabySitter and make sure it reads the initial children list.
Use the provided ExecutorService to queue events to, rather than
creating a private ExecutorService. | [
"Create",
"a",
"new",
"BabySitter",
"and",
"make",
"sure",
"it",
"reads",
"the",
"initial",
"children",
"list",
".",
"Use",
"the",
"provided",
"ExecutorService",
"to",
"queue",
"events",
"to",
"rather",
"than",
"creating",
"a",
"private",
"ExecutorService",
".... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/zk/BabySitter.java#L150-L157 |
61,878 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCStatementBase.java | JDBCStatementBase.checkClosed | void checkClosed() throws SQLException {
if (isClosed) {
throw Util.sqlException(ErrorCode.X_07501);
}
if (connection.isClosed) {
close();
throw Util.sqlException(ErrorCode.X_08503);
}
} | java | void checkClosed() throws SQLException {
if (isClosed) {
throw Util.sqlException(ErrorCode.X_07501);
}
if (connection.isClosed) {
close();
throw Util.sqlException(ErrorCode.X_08503);
}
} | [
"void",
"checkClosed",
"(",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"isClosed",
")",
"{",
"throw",
"Util",
".",
"sqlException",
"(",
"ErrorCode",
".",
"X_07501",
")",
";",
"}",
"if",
"(",
"connection",
".",
"isClosed",
")",
"{",
"close",
"(",
")... | An internal check for closed statements.
@throws SQLException when the connection is closed | [
"An",
"internal",
"check",
"for",
"closed",
"statements",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCStatementBase.java#L141-L151 |
61,879 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCStatementBase.java | JDBCStatementBase.performPostExecute | void performPostExecute() throws SQLException {
resultOut.clearLobResults();
generatedResult = null;
if (resultIn == null) {
return;
}
Result current = resultIn;
while (current.getChainedResult() != null) {
current = current.getUnlinkChainedRe... | java | void performPostExecute() throws SQLException {
resultOut.clearLobResults();
generatedResult = null;
if (resultIn == null) {
return;
}
Result current = resultIn;
while (current.getChainedResult() != null) {
current = current.getUnlinkChainedRe... | [
"void",
"performPostExecute",
"(",
")",
"throws",
"SQLException",
"{",
"resultOut",
".",
"clearLobResults",
"(",
")",
";",
"generatedResult",
"=",
"null",
";",
"if",
"(",
"resultIn",
"==",
"null",
")",
"{",
"return",
";",
"}",
"Result",
"current",
"=",
"re... | processes chained warnings and any generated columns result set | [
"processes",
"chained",
"warnings",
"and",
"any",
"generated",
"columns",
"result",
"set"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCStatementBase.java#L156-L191 |
61,880 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCStatementBase.java | JDBCStatementBase.getMoreResults | boolean getMoreResults(int current) throws SQLException {
checkClosed();
if (resultIn == null || !resultIn.isData()) {
return false;
}
if (resultSetCounter == 0) {
resultSetCounter++;
return true;
}
if (currentResultSet != null && cu... | java | boolean getMoreResults(int current) throws SQLException {
checkClosed();
if (resultIn == null || !resultIn.isData()) {
return false;
}
if (resultSetCounter == 0) {
resultSetCounter++;
return true;
}
if (currentResultSet != null && cu... | [
"boolean",
"getMoreResults",
"(",
"int",
"current",
")",
"throws",
"SQLException",
"{",
"checkClosed",
"(",
")",
";",
"if",
"(",
"resultIn",
"==",
"null",
"||",
"!",
"resultIn",
".",
"isData",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",... | Note yet correct for multiple ResultSets. Should keep track of the
previous ResultSet objects to be able to close them | [
"Note",
"yet",
"correct",
"for",
"multiple",
"ResultSets",
".",
"Should",
"keep",
"track",
"of",
"the",
"previous",
"ResultSet",
"objects",
"to",
"be",
"able",
"to",
"close",
"them"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCStatementBase.java#L219-L238 |
61,881 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCStatementBase.java | JDBCStatementBase.closeResultData | void closeResultData() throws SQLException {
if (currentResultSet != null) {
currentResultSet.close();
}
if (generatedResultSet != null) {
generatedResultSet.close();
}
generatedResultSet = null;
generatedResult = null;
resultIn ... | java | void closeResultData() throws SQLException {
if (currentResultSet != null) {
currentResultSet.close();
}
if (generatedResultSet != null) {
generatedResultSet.close();
}
generatedResultSet = null;
generatedResult = null;
resultIn ... | [
"void",
"closeResultData",
"(",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"currentResultSet",
"!=",
"null",
")",
"{",
"currentResultSet",
".",
"close",
"(",
")",
";",
"}",
"if",
"(",
"generatedResultSet",
"!=",
"null",
")",
"{",
"generatedResultSet",
".... | See comment for getMoreResults. | [
"See",
"comment",
"for",
"getMoreResults",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCStatementBase.java#L259-L271 |
61,882 | VoltDB/voltdb | src/frontend/org/voltdb/TableHelper.java | ViewRep.compatibleWithTable | public boolean compatibleWithTable(VoltTable table) {
String candidateName = getTableName(table);
// table can't have the same name as the view
if (candidateName.equals(viewName)) {
return false;
}
// view is for a different table
i... | java | public boolean compatibleWithTable(VoltTable table) {
String candidateName = getTableName(table);
// table can't have the same name as the view
if (candidateName.equals(viewName)) {
return false;
}
// view is for a different table
i... | [
"public",
"boolean",
"compatibleWithTable",
"(",
"VoltTable",
"table",
")",
"{",
"String",
"candidateName",
"=",
"getTableName",
"(",
"table",
")",
";",
"// table can't have the same name as the view",
"if",
"(",
"candidateName",
".",
"equals",
"(",
"viewName",
")",
... | Check if the view could apply to the provided table unchanged. | [
"Check",
"if",
"the",
"view",
"could",
"apply",
"to",
"the",
"provided",
"table",
"unchanged",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/TableHelper.java#L144-L181 |
61,883 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/util/concurrent/MoreExecutors.java | MoreExecutors.platformThreadFactory | @Beta
@GwtIncompatible // concurrency
public static ThreadFactory platformThreadFactory() {
if (!isAppEngine()) {
return Executors.defaultThreadFactory();
}
try {
return (ThreadFactory)
Class.forName("com.google_voltpatches.appengine.api.ThreadManager")
.getMethod("cu... | java | @Beta
@GwtIncompatible // concurrency
public static ThreadFactory platformThreadFactory() {
if (!isAppEngine()) {
return Executors.defaultThreadFactory();
}
try {
return (ThreadFactory)
Class.forName("com.google_voltpatches.appengine.api.ThreadManager")
.getMethod("cu... | [
"@",
"Beta",
"@",
"GwtIncompatible",
"// concurrency",
"public",
"static",
"ThreadFactory",
"platformThreadFactory",
"(",
")",
"{",
"if",
"(",
"!",
"isAppEngine",
"(",
")",
")",
"{",
"return",
"Executors",
".",
"defaultThreadFactory",
"(",
")",
";",
"}",
"try"... | Returns a default thread factory used to create new threads.
<p>On AppEngine, returns {@code ThreadManager.currentRequestThreadFactory()}. Otherwise,
returns {@link Executors#defaultThreadFactory()}.
@since 14.0 | [
"Returns",
"a",
"default",
"thread",
"factory",
"used",
"to",
"create",
"new",
"threads",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/util/concurrent/MoreExecutors.java#L751-L771 |
61,884 | VoltDB/voltdb | src/frontend/org/voltdb/utils/SnapshotVerifier.java | SnapshotVerifier.verifySnapshots | public static void verifySnapshots(
final List<String> directories, final Set<String> snapshotNames) {
FileFilter filter = new SnapshotFilter();
if (!snapshotNames.isEmpty()) {
filter = new SpecificSnapshotFilter(snapshotNames);
}
Map<String, Snapshot> snapshots... | java | public static void verifySnapshots(
final List<String> directories, final Set<String> snapshotNames) {
FileFilter filter = new SnapshotFilter();
if (!snapshotNames.isEmpty()) {
filter = new SpecificSnapshotFilter(snapshotNames);
}
Map<String, Snapshot> snapshots... | [
"public",
"static",
"void",
"verifySnapshots",
"(",
"final",
"List",
"<",
"String",
">",
"directories",
",",
"final",
"Set",
"<",
"String",
">",
"snapshotNames",
")",
"{",
"FileFilter",
"filter",
"=",
"new",
"SnapshotFilter",
"(",
")",
";",
"if",
"(",
"!",... | Perform snapshot verification.
@param directories list of directories to search for snapshots
@param snapshotNames set of snapshot names/nonces to verify | [
"Perform",
"snapshot",
"verification",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/SnapshotVerifier.java#L86-L107 |
61,885 | VoltDB/voltdb | third_party/java/src/org/HdrHistogram_voltpatches/AbstractHistogram.java | AbstractHistogram.lowestEquivalentValue | public long lowestEquivalentValue(final long value) {
final int bucketIndex = getBucketIndex(value);
final int subBucketIndex = getSubBucketIndex(value, bucketIndex);
long thisValueBaseLevel = valueFromIndex(bucketIndex, subBucketIndex);
return thisValueBaseLevel;
} | java | public long lowestEquivalentValue(final long value) {
final int bucketIndex = getBucketIndex(value);
final int subBucketIndex = getSubBucketIndex(value, bucketIndex);
long thisValueBaseLevel = valueFromIndex(bucketIndex, subBucketIndex);
return thisValueBaseLevel;
} | [
"public",
"long",
"lowestEquivalentValue",
"(",
"final",
"long",
"value",
")",
"{",
"final",
"int",
"bucketIndex",
"=",
"getBucketIndex",
"(",
"value",
")",
";",
"final",
"int",
"subBucketIndex",
"=",
"getSubBucketIndex",
"(",
"value",
",",
"bucketIndex",
")",
... | Get the lowest value that is equivalent to the given value within the histogram's resolution.
Where "equivalent" means that value samples recorded for any two
equivalent values are counted in a common total count.
@param value The given value
@return The lowest value that is equivalent to the given value within the hi... | [
"Get",
"the",
"lowest",
"value",
"that",
"is",
"equivalent",
"to",
"the",
"given",
"value",
"within",
"the",
"histogram",
"s",
"resolution",
".",
"Where",
"equivalent",
"means",
"that",
"value",
"samples",
"recorded",
"for",
"any",
"two",
"equivalent",
"values... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/HdrHistogram_voltpatches/AbstractHistogram.java#L999-L1004 |
61,886 | VoltDB/voltdb | third_party/java/src/org/HdrHistogram_voltpatches/AbstractHistogram.java | AbstractHistogram.getMean | public double getMean() {
if (getTotalCount() == 0) {
return 0.0;
}
recordedValuesIterator.reset();
double totalValue = 0;
while (recordedValuesIterator.hasNext()) {
HistogramIterationValue iterationValue = recordedValuesIterator.next();
totalV... | java | public double getMean() {
if (getTotalCount() == 0) {
return 0.0;
}
recordedValuesIterator.reset();
double totalValue = 0;
while (recordedValuesIterator.hasNext()) {
HistogramIterationValue iterationValue = recordedValuesIterator.next();
totalV... | [
"public",
"double",
"getMean",
"(",
")",
"{",
"if",
"(",
"getTotalCount",
"(",
")",
"==",
"0",
")",
"{",
"return",
"0.0",
";",
"}",
"recordedValuesIterator",
".",
"reset",
"(",
")",
";",
"double",
"totalValue",
"=",
"0",
";",
"while",
"(",
"recordedVal... | Get the computed mean value of all recorded values in the histogram
@return the mean value (in value units) of the histogram data | [
"Get",
"the",
"computed",
"mean",
"value",
"of",
"all",
"recorded",
"values",
"in",
"the",
"histogram"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/HdrHistogram_voltpatches/AbstractHistogram.java#L1165-L1177 |
61,887 | VoltDB/voltdb | third_party/java/src/org/HdrHistogram_voltpatches/AbstractHistogram.java | AbstractHistogram.getStdDeviation | public double getStdDeviation() {
if (getTotalCount() == 0) {
return 0.0;
}
final double mean = getMean();
double geometric_deviation_total = 0.0;
recordedValuesIterator.reset();
while (recordedValuesIterator.hasNext()) {
HistogramIterationValue i... | java | public double getStdDeviation() {
if (getTotalCount() == 0) {
return 0.0;
}
final double mean = getMean();
double geometric_deviation_total = 0.0;
recordedValuesIterator.reset();
while (recordedValuesIterator.hasNext()) {
HistogramIterationValue i... | [
"public",
"double",
"getStdDeviation",
"(",
")",
"{",
"if",
"(",
"getTotalCount",
"(",
")",
"==",
"0",
")",
"{",
"return",
"0.0",
";",
"}",
"final",
"double",
"mean",
"=",
"getMean",
"(",
")",
";",
"double",
"geometric_deviation_total",
"=",
"0.0",
";",
... | Get the computed standard deviation of all recorded values in the histogram
@return the standard deviation (in value units) of the histogram data | [
"Get",
"the",
"computed",
"standard",
"deviation",
"of",
"all",
"recorded",
"values",
"in",
"the",
"histogram"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/HdrHistogram_voltpatches/AbstractHistogram.java#L1184-L1198 |
61,888 | VoltDB/voltdb | third_party/java/src/org/HdrHistogram_voltpatches/AbstractHistogram.java | AbstractHistogram.reestablishTotalCount | public void reestablishTotalCount() {
// On overflow, the totalCount accumulated counter will (always) not match the total of counts
long totalCounted = 0;
for (int i = 0; i < countsArrayLength; i++) {
totalCounted += getCountAtIndex(i);
}
setTotalCount(totalCounted);... | java | public void reestablishTotalCount() {
// On overflow, the totalCount accumulated counter will (always) not match the total of counts
long totalCounted = 0;
for (int i = 0; i < countsArrayLength; i++) {
totalCounted += getCountAtIndex(i);
}
setTotalCount(totalCounted);... | [
"public",
"void",
"reestablishTotalCount",
"(",
")",
"{",
"// On overflow, the totalCount accumulated counter will (always) not match the total of counts",
"long",
"totalCounted",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"countsArrayLength",
";",
... | Reestablish the internal notion of totalCount by recalculating it from recorded values.
Implementations of AbstractHistogram may maintain a separately tracked notion of totalCount,
which is useful for concurrent modification tracking, overflow detection, and speed of execution
in iteration. This separately tracked tot... | [
"Reestablish",
"the",
"internal",
"notion",
"of",
"totalCount",
"by",
"recalculating",
"it",
"from",
"recorded",
"values",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/HdrHistogram_voltpatches/AbstractHistogram.java#L2212-L2219 |
61,889 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/TableUtil.java | TableUtil.setTableColumnsForSubquery | static void setTableColumnsForSubquery(Table table,
QueryExpression queryExpression,
boolean fullIndex) {
table.columnList = queryExpression.getColumns();
table.columnCount = queryExpression.getColumnCount();
... | java | static void setTableColumnsForSubquery(Table table,
QueryExpression queryExpression,
boolean fullIndex) {
table.columnList = queryExpression.getColumns();
table.columnCount = queryExpression.getColumnCount();
... | [
"static",
"void",
"setTableColumnsForSubquery",
"(",
"Table",
"table",
",",
"QueryExpression",
"queryExpression",
",",
"boolean",
"fullIndex",
")",
"{",
"table",
".",
"columnList",
"=",
"queryExpression",
".",
"getColumns",
"(",
")",
";",
"table",
".",
"columnCoun... | For table subqueries | [
"For",
"table",
"subqueries"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TableUtil.java#L95-L113 |
61,890 | VoltDB/voltdb | src/frontend/org/voltdb/planner/PlanSelector.java | PlanSelector.considerCandidatePlan | public void considerCandidatePlan(CompiledPlan plan, AbstractParsedStmt parsedStmt) {
//System.out.println(String.format("[Raw plan]:%n%s", rawplan.rootPlanGraph.toExplainPlanString()));
// run the set of microptimizations, which may return many plans (or not)
ScanDeterminizer.apply(plan, m_det... | java | public void considerCandidatePlan(CompiledPlan plan, AbstractParsedStmt parsedStmt) {
//System.out.println(String.format("[Raw plan]:%n%s", rawplan.rootPlanGraph.toExplainPlanString()));
// run the set of microptimizations, which may return many plans (or not)
ScanDeterminizer.apply(plan, m_det... | [
"public",
"void",
"considerCandidatePlan",
"(",
"CompiledPlan",
"plan",
",",
"AbstractParsedStmt",
"parsedStmt",
")",
"{",
"//System.out.println(String.format(\"[Raw plan]:%n%s\", rawplan.rootPlanGraph.toExplainPlanString()));",
"// run the set of microptimizations, which may return many pla... | Picks the best cost plan for a given raw plan
@param rawplan | [
"Picks",
"the",
"best",
"cost",
"plan",
"for",
"a",
"given",
"raw",
"plan"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/PlanSelector.java#L140-L173 |
61,891 | VoltDB/voltdb | src/frontend/org/voltdb/PartitionDRGateway.java | PartitionDRGateway.getInstance | public static PartitionDRGateway getInstance(int partitionId,
ProducerDRGateway producerGateway,
StartAction startAction)
{
// if this is a primary cluster in a DR-enabled scenario
// try to load the re... | java | public static PartitionDRGateway getInstance(int partitionId,
ProducerDRGateway producerGateway,
StartAction startAction)
{
// if this is a primary cluster in a DR-enabled scenario
// try to load the re... | [
"public",
"static",
"PartitionDRGateway",
"getInstance",
"(",
"int",
"partitionId",
",",
"ProducerDRGateway",
"producerGateway",
",",
"StartAction",
"startAction",
")",
"{",
"// if this is a primary cluster in a DR-enabled scenario",
"// try to load the real version of this class",
... | Load the full subclass if it should, otherwise load the
noop stub.
@param partitionId partition id
@param overflowDir
@return Instance of PartitionDRGateway | [
"Load",
"the",
"full",
"subclass",
"if",
"it",
"should",
"otherwise",
"load",
"the",
"noop",
"stub",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/PartitionDRGateway.java#L102-L132 |
61,892 | VoltDB/voltdb | src/frontend/org/voltdb/AuthSystem.java | AuthSystem.getUserPermissionList | public String[] getUserPermissionList(String userName) {
if (!m_enabled) {
return m_perm_list;
}
if (userName == null) {
return new String[] {};
}
AuthUser user = getUser(userName);
if (user == null) {
return new String[] {};
}
... | java | public String[] getUserPermissionList(String userName) {
if (!m_enabled) {
return m_perm_list;
}
if (userName == null) {
return new String[] {};
}
AuthUser user = getUser(userName);
if (user == null) {
return new String[] {};
}
... | [
"public",
"String",
"[",
"]",
"getUserPermissionList",
"(",
"String",
"userName",
")",
"{",
"if",
"(",
"!",
"m_enabled",
")",
"{",
"return",
"m_perm_list",
";",
"}",
"if",
"(",
"userName",
"==",
"null",
")",
"{",
"return",
"new",
"String",
"[",
"]",
"{... | Get users permission list not god for permission checking. | [
"Get",
"users",
"permission",
"list",
"not",
"god",
"for",
"permission",
"checking",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/AuthSystem.java#L685-L697 |
61,893 | VoltDB/voltdb | src/frontend/org/voltdb/LightweightNTClientResponseAdapter.java | LightweightNTClientResponseAdapter.callProcedure | public void callProcedure(AuthUser user,
boolean isAdmin,
int timeout,
ProcedureCallback cb,
String procName,
Object[] args)
{
// since we know the caller, th... | java | public void callProcedure(AuthUser user,
boolean isAdmin,
int timeout,
ProcedureCallback cb,
String procName,
Object[] args)
{
// since we know the caller, th... | [
"public",
"void",
"callProcedure",
"(",
"AuthUser",
"user",
",",
"boolean",
"isAdmin",
",",
"int",
"timeout",
",",
"ProcedureCallback",
"cb",
",",
"String",
"procName",
",",
"Object",
"[",
"]",
"args",
")",
"{",
"// since we know the caller, this is safe",
"assert... | Used to call a procedure from NTPRocedureRunner
Calls createTransaction with the proper params | [
"Used",
"to",
"call",
"a",
"procedure",
"from",
"NTPRocedureRunner",
"Calls",
"createTransaction",
"with",
"the",
"proper",
"params"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/LightweightNTClientResponseAdapter.java#L277-L315 |
61,894 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Error.java | Error.printSystemOut | public static void printSystemOut(String message1, long message2) {
if (TRACESYSTEMOUT) {
System.out.print(message1);
System.out.println(message2);
}
} | java | public static void printSystemOut(String message1, long message2) {
if (TRACESYSTEMOUT) {
System.out.print(message1);
System.out.println(message2);
}
} | [
"public",
"static",
"void",
"printSystemOut",
"(",
"String",
"message1",
",",
"long",
"message2",
")",
"{",
"if",
"(",
"TRACESYSTEMOUT",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"message1",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
... | Used to print messages to System.out
@param message1 message to print
@param message2 message to print | [
"Used",
"to",
"print",
"messages",
"to",
"System",
".",
"out"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Error.java#L264-L270 |
61,895 | VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Types.java | Types.acceptsPrecision | public static boolean acceptsPrecision(int type) {
switch (type) {
case Types.SQL_BINARY :
case Types.SQL_BIT :
case Types.SQL_BIT_VARYING :
case Types.SQL_BLOB :
case Types.SQL_CHAR :
case Types.SQL_NCHAR :
case Types.SQL_CLO... | java | public static boolean acceptsPrecision(int type) {
switch (type) {
case Types.SQL_BINARY :
case Types.SQL_BIT :
case Types.SQL_BIT_VARYING :
case Types.SQL_BLOB :
case Types.SQL_CHAR :
case Types.SQL_NCHAR :
case Types.SQL_CLO... | [
"public",
"static",
"boolean",
"acceptsPrecision",
"(",
"int",
"type",
")",
"{",
"switch",
"(",
"type",
")",
"{",
"case",
"Types",
".",
"SQL_BINARY",
":",
"case",
"Types",
".",
"SQL_BIT",
":",
"case",
"Types",
".",
"SQL_BIT_VARYING",
":",
"case",
"Types",
... | Types that accept precision params in column definition or casts.
CHAR, VARCHAR and VARCHAR_IGNORECASE params
are ignored when the sql.enforce_strict_types is false. | [
"Types",
"that",
"accept",
"precision",
"params",
"in",
"column",
"definition",
"or",
"casts",
".",
"CHAR",
"VARCHAR",
"and",
"VARCHAR_IGNORECASE",
"params",
"are",
"ignored",
"when",
"the",
"sql",
".",
"enforce_strict_types",
"is",
"false",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Types.java#L726-L766 |
61,896 | VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/collect/Iterables.java | Iterables.cycle | public static <T> Iterable<T> cycle(T... elements) {
return cycle(Lists.newArrayList(elements));
} | java | public static <T> Iterable<T> cycle(T... elements) {
return cycle(Lists.newArrayList(elements));
} | [
"public",
"static",
"<",
"T",
">",
"Iterable",
"<",
"T",
">",
"cycle",
"(",
"T",
"...",
"elements",
")",
"{",
"return",
"cycle",
"(",
"Lists",
".",
"newArrayList",
"(",
"elements",
")",
")",
";",
"}"
] | Returns an iterable whose iterators cycle indefinitely over the provided
elements.
<p>After {@code remove} is invoked on a generated iterator, the removed
element will no longer appear in either that iterator or any other iterator
created from the same source iterable. That is, this method behaves exactly
as {@code It... | [
"Returns",
"an",
"iterable",
"whose",
"iterators",
"cycle",
"indefinitely",
"over",
"the",
"provided",
"elements",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/Iterables.java#L430-L432 |
61,897 | VoltDB/voltdb | src/frontend/org/voltdb/jni/ExecutionEngineJNI.java | ExecutionEngineJNI.coreLoadCatalog | @Override
protected void coreLoadCatalog(long timestamp, final byte[] catalogBytes) throws EEException {
LOG.trace("Loading Application Catalog...");
int errorCode = 0;
errorCode = nativeLoadCatalog(pointer, timestamp, catalogBytes);
checkErrorCode(errorCode);
//LOG.info("Loa... | java | @Override
protected void coreLoadCatalog(long timestamp, final byte[] catalogBytes) throws EEException {
LOG.trace("Loading Application Catalog...");
int errorCode = 0;
errorCode = nativeLoadCatalog(pointer, timestamp, catalogBytes);
checkErrorCode(errorCode);
//LOG.info("Loa... | [
"@",
"Override",
"protected",
"void",
"coreLoadCatalog",
"(",
"long",
"timestamp",
",",
"final",
"byte",
"[",
"]",
"catalogBytes",
")",
"throws",
"EEException",
"{",
"LOG",
".",
"trace",
"(",
"\"Loading Application Catalog...\"",
")",
";",
"int",
"errorCode",
"=... | Provide a serialized catalog and initialize version 0 of the engine's
catalog. | [
"Provide",
"a",
"serialized",
"catalog",
"and",
"initialize",
"version",
"0",
"of",
"the",
"engine",
"s",
"catalog",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngineJNI.java#L335-L342 |
61,898 | VoltDB/voltdb | src/frontend/org/voltdb/jni/ExecutionEngineJNI.java | ExecutionEngineJNI.coreUpdateCatalog | @Override
public void coreUpdateCatalog(long timestamp, boolean isStreamUpdate, final String catalogDiffs) throws EEException {
LOG.trace("Loading Application Catalog...");
int errorCode = 0;
errorCode = nativeUpdateCatalog(pointer, timestamp, isStreamUpdate, getStringBytes(catalogDiffs));
... | java | @Override
public void coreUpdateCatalog(long timestamp, boolean isStreamUpdate, final String catalogDiffs) throws EEException {
LOG.trace("Loading Application Catalog...");
int errorCode = 0;
errorCode = nativeUpdateCatalog(pointer, timestamp, isStreamUpdate, getStringBytes(catalogDiffs));
... | [
"@",
"Override",
"public",
"void",
"coreUpdateCatalog",
"(",
"long",
"timestamp",
",",
"boolean",
"isStreamUpdate",
",",
"final",
"String",
"catalogDiffs",
")",
"throws",
"EEException",
"{",
"LOG",
".",
"trace",
"(",
"\"Loading Application Catalog...\"",
")",
";",
... | Provide a catalog diff and a new catalog version and update the
engine's catalog. | [
"Provide",
"a",
"catalog",
"diff",
"and",
"a",
"new",
"catalog",
"version",
"and",
"update",
"the",
"engine",
"s",
"catalog",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngineJNI.java#L348-L354 |
61,899 | VoltDB/voltdb | src/frontend/org/voltdb/jni/ExecutionEngineJNI.java | ExecutionEngineJNI.extractPerFragmentStats | @Override
public int extractPerFragmentStats(int batchSize, long[] executionTimesOut) {
m_perFragmentStatsBuffer.clear();
// Discard the first byte since it is the timing on/off switch.
m_perFragmentStatsBuffer.get();
int succeededFragmentsCount = m_perFragmentStatsBuffer.getInt();
... | java | @Override
public int extractPerFragmentStats(int batchSize, long[] executionTimesOut) {
m_perFragmentStatsBuffer.clear();
// Discard the first byte since it is the timing on/off switch.
m_perFragmentStatsBuffer.get();
int succeededFragmentsCount = m_perFragmentStatsBuffer.getInt();
... | [
"@",
"Override",
"public",
"int",
"extractPerFragmentStats",
"(",
"int",
"batchSize",
",",
"long",
"[",
"]",
"executionTimesOut",
")",
"{",
"m_perFragmentStatsBuffer",
".",
"clear",
"(",
")",
";",
"// Discard the first byte since it is the timing on/off switch.",
"m_perFr... | Extract the per-fragment stats from the buffer. | [
"Extract",
"the",
"per",
"-",
"fragment",
"stats",
"from",
"the",
"buffer",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngineJNI.java#L365-L382 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.