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 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/UNode.java | UNode.toJSON | private void toJSON(JSONEmitter json) {
switch (m_type) {
case ARRAY:
json.startArray(m_name);
if (m_children != null) {
for (UNode childNode : m_children) {
if (childNode.isMap()) {
json.startObject();
... | java | private void toJSON(JSONEmitter json) {
switch (m_type) {
case ARRAY:
json.startArray(m_name);
if (m_children != null) {
for (UNode childNode : m_children) {
if (childNode.isMap()) {
json.startObject();
... | [
"private",
"void",
"toJSON",
"(",
"JSONEmitter",
"json",
")",
"{",
"switch",
"(",
"m_type",
")",
"{",
"case",
"ARRAY",
":",
"json",
".",
"startArray",
"(",
"m_name",
")",
";",
"if",
"(",
"m_children",
"!=",
"null",
")",
"{",
"for",
"(",
"UNode",
"chi... | Add the appropriate JSON syntax for this UNode to the given JSONEmitter. | [
"Add",
"the",
"appropriate",
"JSON",
"syntax",
"for",
"this",
"UNode",
"to",
"the",
"given",
"JSONEmitter",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/UNode.java#L1001-L1054 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/UNode.java | UNode.parseXMLAttributes | private static void parseXMLAttributes(NamedNodeMap attrMap, List<UNode> childUNodeList) {
for (int index = 0; index < attrMap.getLength(); index++) {
Attr attr = (Attr)attrMap.item(index);
UNode childNode = createValueNode(attr.getName(), attr.getValue(), true);
childUNo... | java | private static void parseXMLAttributes(NamedNodeMap attrMap, List<UNode> childUNodeList) {
for (int index = 0; index < attrMap.getLength(); index++) {
Attr attr = (Attr)attrMap.item(index);
UNode childNode = createValueNode(attr.getName(), attr.getValue(), true);
childUNo... | [
"private",
"static",
"void",
"parseXMLAttributes",
"(",
"NamedNodeMap",
"attrMap",
",",
"List",
"<",
"UNode",
">",
"childUNodeList",
")",
"{",
"for",
"(",
"int",
"index",
"=",
"0",
";",
"index",
"<",
"attrMap",
".",
"getLength",
"(",
")",
";",
"index",
"... | if to the given child node list. | [
"if",
"to",
"the",
"given",
"child",
"node",
"list",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/UNode.java#L1196-L1202 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/UNode.java | UNode.parseXMLChildElems | private static boolean parseXMLChildElems(Element elem, List<UNode> childUNodeList) {
assert elem != null;
assert childUNodeList != null;
// Scan for Element nodes (there could be Comment and other nodes).
boolean bDupNodeNames = false;
Set<String> nodeNameSet = new... | java | private static boolean parseXMLChildElems(Element elem, List<UNode> childUNodeList) {
assert elem != null;
assert childUNodeList != null;
// Scan for Element nodes (there could be Comment and other nodes).
boolean bDupNodeNames = false;
Set<String> nodeNameSet = new... | [
"private",
"static",
"boolean",
"parseXMLChildElems",
"(",
"Element",
"elem",
",",
"List",
"<",
"UNode",
">",
"childUNodeList",
")",
"{",
"assert",
"elem",
"!=",
"null",
";",
"assert",
"childUNodeList",
"!=",
"null",
";",
"// Scan for Element nodes (there could be C... | are found while scanning. | [
"are",
"found",
"while",
"scanning",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/UNode.java#L1207-L1229 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/UNode.java | UNode.addXMLAttributes | private void addXMLAttributes(Map<String, String> attrMap) {
if (m_children != null) {
for (UNode childNode : m_children) {
// A child node must not contain a tag name to be considered an attribute.
if (childNode.m_type == NodeType.VALUE && childNode.m_bAttribute ... | java | private void addXMLAttributes(Map<String, String> attrMap) {
if (m_children != null) {
for (UNode childNode : m_children) {
// A child node must not contain a tag name to be considered an attribute.
if (childNode.m_type == NodeType.VALUE && childNode.m_bAttribute ... | [
"private",
"void",
"addXMLAttributes",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"attrMap",
")",
"{",
"if",
"(",
"m_children",
"!=",
"null",
")",
"{",
"for",
"(",
"UNode",
"childNode",
":",
"m_children",
")",
"{",
"// A child node must not contain a tag n... | Get the child nodes of this UNode that are VALUE nodes marked as attributes. | [
"Get",
"the",
"child",
"nodes",
"of",
"this",
"UNode",
"that",
"are",
"VALUE",
"nodes",
"marked",
"as",
"attributes",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/UNode.java#L1232-L1242 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/UNode.java | UNode.toStringTree | private void toStringTree(StringBuilder builder, int indent) {
for (int count = 0; count < indent; count++) {
builder.append(" ");
}
builder.append(this.toString());
builder.append("\n");
if (m_children != null) {
for (UNode childNode : m_children) ... | java | private void toStringTree(StringBuilder builder, int indent) {
for (int count = 0; count < indent; count++) {
builder.append(" ");
}
builder.append(this.toString());
builder.append("\n");
if (m_children != null) {
for (UNode childNode : m_children) ... | [
"private",
"void",
"toStringTree",
"(",
"StringBuilder",
"builder",
",",
"int",
"indent",
")",
"{",
"for",
"(",
"int",
"count",
"=",
"0",
";",
"count",
"<",
"indent",
";",
"count",
"++",
")",
"{",
"builder",
".",
"append",
"(",
"\" \"",
")",
";",
"}"... | appended with a newline. | [
"appended",
"with",
"a",
"newline",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/UNode.java#L1248-L1259 | train |
QSFT/Doradus | doradus-dynamodb/src/main/java/com/dell/doradus/db/dynamodb/DynamoDBService.java | DynamoDBService.deleteRow | void deleteRow(String storeName, Map<String, AttributeValue> key) {
String tableName = storeToTableName(storeName);
m_logger.debug("Deleting row from table {}, key={}", tableName, DynamoDBService.getDDBKey(key));
Timer timer = new Timer();
boolean bSuccess = false;
for (... | java | void deleteRow(String storeName, Map<String, AttributeValue> key) {
String tableName = storeToTableName(storeName);
m_logger.debug("Deleting row from table {}, key={}", tableName, DynamoDBService.getDDBKey(key));
Timer timer = new Timer();
boolean bSuccess = false;
for (... | [
"void",
"deleteRow",
"(",
"String",
"storeName",
",",
"Map",
"<",
"String",
",",
"AttributeValue",
">",
"key",
")",
"{",
"String",
"tableName",
"=",
"storeToTableName",
"(",
"storeName",
")",
";",
"m_logger",
".",
"debug",
"(",
"\"Deleting row from table {}, key... | Delete row and back off if ProvisionedThroughputExceededException occurs. | [
"Delete",
"row",
"and",
"back",
"off",
"if",
"ProvisionedThroughputExceededException",
"occurs",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-dynamodb/src/main/java/com/dell/doradus/db/dynamodb/DynamoDBService.java#L283-L312 | train |
QSFT/Doradus | doradus-dynamodb/src/main/java/com/dell/doradus/db/dynamodb/DynamoDBService.java | DynamoDBService.getCredentials | private AWSCredentials getCredentials() {
String awsProfile = getParamString("aws_profile");
if (!Utils.isEmpty(awsProfile)) {
m_logger.info("Using AWS profile: {}", awsProfile);
ProfileCredentialsProvider credsProvider = null;
String awsCredentialsFile = getParamStri... | java | private AWSCredentials getCredentials() {
String awsProfile = getParamString("aws_profile");
if (!Utils.isEmpty(awsProfile)) {
m_logger.info("Using AWS profile: {}", awsProfile);
ProfileCredentialsProvider credsProvider = null;
String awsCredentialsFile = getParamStri... | [
"private",
"AWSCredentials",
"getCredentials",
"(",
")",
"{",
"String",
"awsProfile",
"=",
"getParamString",
"(",
"\"aws_profile\"",
")",
";",
"if",
"(",
"!",
"Utils",
".",
"isEmpty",
"(",
"awsProfile",
")",
")",
"{",
"m_logger",
".",
"info",
"(",
"\"Using A... | Set the AWS credentials in m_ddbClient | [
"Set",
"the",
"AWS",
"credentials",
"in",
"m_ddbClient"
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-dynamodb/src/main/java/com/dell/doradus/db/dynamodb/DynamoDBService.java#L356-L378 | train |
QSFT/Doradus | doradus-dynamodb/src/main/java/com/dell/doradus/db/dynamodb/DynamoDBService.java | DynamoDBService.setRegionOrEndPoint | private void setRegionOrEndPoint() {
String regionName = getParamString("ddb_region");
if (regionName != null) {
Regions regionEnum = Regions.fromName(regionName);
Utils.require(regionEnum != null, "Unknown 'ddb_region': " + regionName);
m_logger.info("Using region: {... | java | private void setRegionOrEndPoint() {
String regionName = getParamString("ddb_region");
if (regionName != null) {
Regions regionEnum = Regions.fromName(regionName);
Utils.require(regionEnum != null, "Unknown 'ddb_region': " + regionName);
m_logger.info("Using region: {... | [
"private",
"void",
"setRegionOrEndPoint",
"(",
")",
"{",
"String",
"regionName",
"=",
"getParamString",
"(",
"\"ddb_region\"",
")",
";",
"if",
"(",
"regionName",
"!=",
"null",
")",
"{",
"Regions",
"regionEnum",
"=",
"Regions",
".",
"fromName",
"(",
"regionName... | Set the region or endpoint in m_ddbClient | [
"Set",
"the",
"region",
"or",
"endpoint",
"in",
"m_ddbClient"
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-dynamodb/src/main/java/com/dell/doradus/db/dynamodb/DynamoDBService.java#L381-L395 | train |
QSFT/Doradus | doradus-dynamodb/src/main/java/com/dell/doradus/db/dynamodb/DynamoDBService.java | DynamoDBService.setDefaultCapacity | private void setDefaultCapacity() {
Object capacity = getParam("ddb_default_read_capacity");
if (capacity != null) {
READ_CAPACITY_UNITS = Integer.parseInt(capacity.toString());
}
capacity = getParam("ddb_default_write_capacity");
if (capacity != null) {
... | java | private void setDefaultCapacity() {
Object capacity = getParam("ddb_default_read_capacity");
if (capacity != null) {
READ_CAPACITY_UNITS = Integer.parseInt(capacity.toString());
}
capacity = getParam("ddb_default_write_capacity");
if (capacity != null) {
... | [
"private",
"void",
"setDefaultCapacity",
"(",
")",
"{",
"Object",
"capacity",
"=",
"getParam",
"(",
"\"ddb_default_read_capacity\"",
")",
";",
"if",
"(",
"capacity",
"!=",
"null",
")",
"{",
"READ_CAPACITY_UNITS",
"=",
"Integer",
".",
"parseInt",
"(",
"capacity",... | Set READ_CAPACITY_UNITS and WRITE_CAPACITY_UNITS if overridden. | [
"Set",
"READ_CAPACITY_UNITS",
"and",
"WRITE_CAPACITY_UNITS",
"if",
"overridden",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-dynamodb/src/main/java/com/dell/doradus/db/dynamodb/DynamoDBService.java#L398-L408 | train |
QSFT/Doradus | doradus-dynamodb/src/main/java/com/dell/doradus/db/dynamodb/DynamoDBService.java | DynamoDBService.scan | private ScanResult scan(ScanRequest scanRequest) {
m_logger.debug("Performing scan() request on table {}", scanRequest.getTableName());
Timer timer = new Timer();
boolean bSuccess = false;
ScanResult scanResult = null;
for (int attempts = 1; !bSuccess; attempts++) {
... | java | private ScanResult scan(ScanRequest scanRequest) {
m_logger.debug("Performing scan() request on table {}", scanRequest.getTableName());
Timer timer = new Timer();
boolean bSuccess = false;
ScanResult scanResult = null;
for (int attempts = 1; !bSuccess; attempts++) {
... | [
"private",
"ScanResult",
"scan",
"(",
"ScanRequest",
"scanRequest",
")",
"{",
"m_logger",
".",
"debug",
"(",
"\"Performing scan() request on table {}\"",
",",
"scanRequest",
".",
"getTableName",
"(",
")",
")",
";",
"Timer",
"timer",
"=",
"new",
"Timer",
"(",
")"... | Perform a scan request and retry if ProvisionedThroughputExceededException occurs. | [
"Perform",
"a",
"scan",
"request",
"and",
"retry",
"if",
"ProvisionedThroughputExceededException",
"occurs",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-dynamodb/src/main/java/com/dell/doradus/db/dynamodb/DynamoDBService.java#L411-L440 | train |
QSFT/Doradus | doradus-dynamodb/src/main/java/com/dell/doradus/db/dynamodb/DynamoDBService.java | DynamoDBService.loadAttributes | private List<DColumn> loadAttributes(Map<String, AttributeValue> attributeMap,
Predicate<String> colNamePredicate) {
List<DColumn> columns = new ArrayList<>();
if (attributeMap != null) {
for (Map.Entry<String, AttributeValue> mapEntry : attributeMap.... | java | private List<DColumn> loadAttributes(Map<String, AttributeValue> attributeMap,
Predicate<String> colNamePredicate) {
List<DColumn> columns = new ArrayList<>();
if (attributeMap != null) {
for (Map.Entry<String, AttributeValue> mapEntry : attributeMap.... | [
"private",
"List",
"<",
"DColumn",
">",
"loadAttributes",
"(",
"Map",
"<",
"String",
",",
"AttributeValue",
">",
"attributeMap",
",",
"Predicate",
"<",
"String",
">",
"colNamePredicate",
")",
"{",
"List",
"<",
"DColumn",
">",
"columns",
"=",
"new",
"ArrayLis... | Filter, store, and sort attributes from the given map. | [
"Filter",
"store",
"and",
"sort",
"attributes",
"from",
"the",
"given",
"map",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-dynamodb/src/main/java/com/dell/doradus/db/dynamodb/DynamoDBService.java#L443-L474 | train |
QSFT/Doradus | doradus-dynamodb/src/main/java/com/dell/doradus/db/dynamodb/DynamoDBService.java | DynamoDBService.deleteTable | private void deleteTable(String tableName) {
m_logger.info("Deleting table: {}", tableName);
try {
m_ddbClient.deleteTable(new DeleteTableRequest(tableName));
for (int seconds = 0; seconds < 10; seconds++) {
try {
m_ddbClient.describeTable(tabl... | java | private void deleteTable(String tableName) {
m_logger.info("Deleting table: {}", tableName);
try {
m_ddbClient.deleteTable(new DeleteTableRequest(tableName));
for (int seconds = 0; seconds < 10; seconds++) {
try {
m_ddbClient.describeTable(tabl... | [
"private",
"void",
"deleteTable",
"(",
"String",
"tableName",
")",
"{",
"m_logger",
".",
"info",
"(",
"\"Deleting table: {}\"",
",",
"tableName",
")",
";",
"try",
"{",
"m_ddbClient",
".",
"deleteTable",
"(",
"new",
"DeleteTableRequest",
"(",
"tableName",
")",
... | Delete the given table and wait for it to be deleted. | [
"Delete",
"the",
"given",
"table",
"and",
"wait",
"for",
"it",
"to",
"be",
"deleted",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-dynamodb/src/main/java/com/dell/doradus/db/dynamodb/DynamoDBService.java#L477-L494 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/search/analyzer/SimpleText.java | SimpleText.tokenize | public List<String> tokenize(String text) {
List<String> tokens = new ArrayList<String>();
text = text.toLowerCase();
char[] array = text.toCharArray();
//convert all apostrophes to 0x27
for(int i = 0; i < array.length; i++) {
if(isApostrofe(array[i])) array[i] = 0x27;
}
int pos = 0;
... | java | public List<String> tokenize(String text) {
List<String> tokens = new ArrayList<String>();
text = text.toLowerCase();
char[] array = text.toCharArray();
//convert all apostrophes to 0x27
for(int i = 0; i < array.length; i++) {
if(isApostrofe(array[i])) array[i] = 0x27;
}
int pos = 0;
... | [
"public",
"List",
"<",
"String",
">",
"tokenize",
"(",
"String",
"text",
")",
"{",
"List",
"<",
"String",
">",
"tokens",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"text",
"=",
"text",
".",
"toLowerCase",
"(",
")",
";",
"char",
"["... | get list of tokens from the text for indexing | [
"get",
"list",
"of",
"tokens",
"from",
"the",
"text",
"for",
"indexing"
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/search/analyzer/SimpleText.java#L43-L68 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/db/DBService.java | DBService.updateTenant | public void updateTenant(Tenant updatedTenant) {
assert m_tenant.getName().equals(updatedTenant.getName());
m_tenant = updatedTenant;
} | java | public void updateTenant(Tenant updatedTenant) {
assert m_tenant.getName().equals(updatedTenant.getName());
m_tenant = updatedTenant;
} | [
"public",
"void",
"updateTenant",
"(",
"Tenant",
"updatedTenant",
")",
"{",
"assert",
"m_tenant",
".",
"getName",
"(",
")",
".",
"equals",
"(",
"updatedTenant",
".",
"getName",
"(",
")",
")",
";",
"m_tenant",
"=",
"updatedTenant",
";",
"}"
] | Update this DBService's Tenant with the given one. This is called when the tenant's
definition has been updated in an upward-compatible way, such as adding or removing
users.
@param updatedTenant Updated {@link Tenant}. | [
"Update",
"this",
"DBService",
"s",
"Tenant",
"with",
"the",
"given",
"one",
".",
"This",
"is",
"called",
"when",
"the",
"tenant",
"s",
"definition",
"has",
"been",
"updated",
"in",
"an",
"upward",
"-",
"compatible",
"way",
"such",
"as",
"adding",
"or",
... | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBService.java#L109-L112 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/db/DBService.java | DBService.isSystemTable | public static boolean isSystemTable(String storeName) {
return storeName.equals(SchemaService.APPS_STORE_NAME) ||
storeName.equals(TaskManagerService.TASKS_STORE_NAME) ||
storeName.equals(TenantService.TENANTS_STORE_NAME);
} | java | public static boolean isSystemTable(String storeName) {
return storeName.equals(SchemaService.APPS_STORE_NAME) ||
storeName.equals(TaskManagerService.TASKS_STORE_NAME) ||
storeName.equals(TenantService.TENANTS_STORE_NAME);
} | [
"public",
"static",
"boolean",
"isSystemTable",
"(",
"String",
"storeName",
")",
"{",
"return",
"storeName",
".",
"equals",
"(",
"SchemaService",
".",
"APPS_STORE_NAME",
")",
"||",
"storeName",
".",
"equals",
"(",
"TaskManagerService",
".",
"TASKS_STORE_NAME",
")"... | Return true if the given store name is a system table, aka metadata table. System
tables store column values as strings. All other tables use binary column values.
@param storeName Store name to test.
@return True if the store name is a system table. | [
"Return",
"true",
"if",
"the",
"given",
"store",
"name",
"is",
"a",
"system",
"table",
"aka",
"metadata",
"table",
".",
"System",
"tables",
"store",
"column",
"values",
"as",
"strings",
".",
"All",
"other",
"tables",
"use",
"binary",
"column",
"values",
".... | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBService.java#L138-L142 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLService.java | CQLService.storeExists | private boolean storeExists(String tableName) {
KeyspaceMetadata ksMetadata = m_cluster.getMetadata().getKeyspace(m_keyspace);
return (ksMetadata != null) && (ksMetadata.getTable(tableName) != null);
} | java | private boolean storeExists(String tableName) {
KeyspaceMetadata ksMetadata = m_cluster.getMetadata().getKeyspace(m_keyspace);
return (ksMetadata != null) && (ksMetadata.getTable(tableName) != null);
} | [
"private",
"boolean",
"storeExists",
"(",
"String",
"tableName",
")",
"{",
"KeyspaceMetadata",
"ksMetadata",
"=",
"m_cluster",
".",
"getMetadata",
"(",
")",
".",
"getKeyspace",
"(",
"m_keyspace",
")",
";",
"return",
"(",
"ksMetadata",
"!=",
"null",
")",
"&&",
... | Return true if the given table exists in the given keyspace. | [
"Return",
"true",
"if",
"the",
"given",
"table",
"exists",
"in",
"the",
"given",
"keyspace",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLService.java#L303-L306 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLService.java | CQLService.executeQuery | private ResultSet executeQuery(Query query, String tableName, Object... values) {
m_logger.debug("Executing statement {} on table {}.{}; total params={}",
new Object[]{query, m_keyspace, tableName, values.length});
try {
PreparedStatement prepState = getPreparedQuery(q... | java | private ResultSet executeQuery(Query query, String tableName, Object... values) {
m_logger.debug("Executing statement {} on table {}.{}; total params={}",
new Object[]{query, m_keyspace, tableName, values.length});
try {
PreparedStatement prepState = getPreparedQuery(q... | [
"private",
"ResultSet",
"executeQuery",
"(",
"Query",
"query",
",",
"String",
"tableName",
",",
"Object",
"...",
"values",
")",
"{",
"m_logger",
".",
"debug",
"(",
"\"Executing statement {} on table {}.{}; total params={}\"",
",",
"new",
"Object",
"[",
"]",
"{",
"... | Execute the given query for the given table using the given values. | [
"Execute",
"the",
"given",
"query",
"for",
"the",
"given",
"table",
"using",
"the",
"given",
"values",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLService.java#L309-L322 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLService.java | CQLService.buildClusterSpecs | private Cluster buildClusterSpecs() {
Cluster.Builder builder = Cluster.builder();
// dbhost
String dbhost = getParamString("dbhost");
String[] nodeAddresses = dbhost.split(",");
for (String address : nodeAddresses) {
builder.addContactPoint(address);
... | java | private Cluster buildClusterSpecs() {
Cluster.Builder builder = Cluster.builder();
// dbhost
String dbhost = getParamString("dbhost");
String[] nodeAddresses = dbhost.split(",");
for (String address : nodeAddresses) {
builder.addContactPoint(address);
... | [
"private",
"Cluster",
"buildClusterSpecs",
"(",
")",
"{",
"Cluster",
".",
"Builder",
"builder",
"=",
"Cluster",
".",
"builder",
"(",
")",
";",
"// dbhost",
"String",
"dbhost",
"=",
"getParamString",
"(",
"\"dbhost\"",
")",
";",
"String",
"[",
"]",
"nodeAddre... | Build Cluster object from ServerConfig settings. | [
"Build",
"Cluster",
"object",
"from",
"ServerConfig",
"settings",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLService.java#L325-L359 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLService.java | CQLService.getSSLContext | private SSLContext getSSLContext(String truststorePath,
String truststorePassword,
String keystorePath,
String keystorePassword) throws Exception {
FileInputStream tsf = new FileInputStream(truststor... | java | private SSLContext getSSLContext(String truststorePath,
String truststorePassword,
String keystorePath,
String keystorePassword) throws Exception {
FileInputStream tsf = new FileInputStream(truststor... | [
"private",
"SSLContext",
"getSSLContext",
"(",
"String",
"truststorePath",
",",
"String",
"truststorePassword",
",",
"String",
"keystorePath",
",",
"String",
"keystorePassword",
")",
"throws",
"Exception",
"{",
"FileInputStream",
"tsf",
"=",
"new",
"FileInputStream",
... | Build an SSLContext from the given truststore and keystore parameters. | [
"Build",
"an",
"SSLContext",
"from",
"the",
"given",
"truststore",
"and",
"keystore",
"parameters",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLService.java#L380-L400 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLService.java | CQLService.connectToCluster | private void connectToCluster() {
assert m_cluster != null;
try {
m_cluster.init(); // force connection and throw if unavailable
m_session = m_cluster.connect();
displayClusterInfo();
} catch (Exception e) {
m_logger.error("Could not connect to... | java | private void connectToCluster() {
assert m_cluster != null;
try {
m_cluster.init(); // force connection and throw if unavailable
m_session = m_cluster.connect();
displayClusterInfo();
} catch (Exception e) {
m_logger.error("Could not connect to... | [
"private",
"void",
"connectToCluster",
"(",
")",
"{",
"assert",
"m_cluster",
"!=",
"null",
";",
"try",
"{",
"m_cluster",
".",
"init",
"(",
")",
";",
"// force connection and throw if unavailable",
"m_session",
"=",
"m_cluster",
".",
"connect",
"(",
")",
";",
"... | Attempt to connect to the given cluster and throw if it is unavailable. | [
"Attempt",
"to",
"connect",
"to",
"the",
"given",
"cluster",
"and",
"throw",
"if",
"it",
"is",
"unavailable",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLService.java#L403-L413 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLService.java | CQLService.displayClusterInfo | private void displayClusterInfo() {
Metadata metadata = m_cluster.getMetadata();
m_logger.info("Connected to cluster with topography:");
RoundRobinPolicy policy = new RoundRobinPolicy();
for (Host host : metadata.getAllHosts()) {
m_logger.info(" Host {}: datacenter: {}, rac... | java | private void displayClusterInfo() {
Metadata metadata = m_cluster.getMetadata();
m_logger.info("Connected to cluster with topography:");
RoundRobinPolicy policy = new RoundRobinPolicy();
for (Host host : metadata.getAllHosts()) {
m_logger.info(" Host {}: datacenter: {}, rac... | [
"private",
"void",
"displayClusterInfo",
"(",
")",
"{",
"Metadata",
"metadata",
"=",
"m_cluster",
".",
"getMetadata",
"(",
")",
";",
"m_logger",
".",
"info",
"(",
"\"Connected to cluster with topography:\"",
")",
";",
"RoundRobinPolicy",
"policy",
"=",
"new",
"Rou... | Display configuration information for the given cluster. | [
"Display",
"configuration",
"information",
"for",
"the",
"given",
"cluster",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLService.java#L416-L426 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/rest/RESTRequest.java | RESTRequest.getContentType | private ContentType getContentType() {
String contentTypeValue = m_request.getContentType();
if (contentTypeValue == null) {
return ContentType.TEXT_XML;
}
return new ContentType(contentTypeValue);
} | java | private ContentType getContentType() {
String contentTypeValue = m_request.getContentType();
if (contentTypeValue == null) {
return ContentType.TEXT_XML;
}
return new ContentType(contentTypeValue);
} | [
"private",
"ContentType",
"getContentType",
"(",
")",
"{",
"String",
"contentTypeValue",
"=",
"m_request",
".",
"getContentType",
"(",
")",
";",
"if",
"(",
"contentTypeValue",
"==",
"null",
")",
"{",
"return",
"ContentType",
".",
"TEXT_XML",
";",
"}",
"return"... | Get the request's content-type, using XML as the default. | [
"Get",
"the",
"request",
"s",
"content",
"-",
"type",
"using",
"XML",
"as",
"the",
"default",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/rest/RESTRequest.java#L291-L297 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/rest/RESTRequest.java | RESTRequest.getAcceptType | private ContentType getAcceptType() {
// If the format header is present, it overrides the ACCEPT header.
String format = m_variableMap.get("format");
if (format != null) {
return new ContentType(format);
}
String acceptParts = m_request.getHeader(HttpDefs.ACCEP... | java | private ContentType getAcceptType() {
// If the format header is present, it overrides the ACCEPT header.
String format = m_variableMap.get("format");
if (format != null) {
return new ContentType(format);
}
String acceptParts = m_request.getHeader(HttpDefs.ACCEP... | [
"private",
"ContentType",
"getAcceptType",
"(",
")",
"{",
"// If the format header is present, it overrides the ACCEPT header.\r",
"String",
"format",
"=",
"m_variableMap",
".",
"get",
"(",
"\"format\"",
")",
";",
"if",
"(",
"format",
"!=",
"null",
")",
"{",
"return",... | Get the request's accept type, defaulting to content-type if none is specified. | [
"Get",
"the",
"request",
"s",
"accept",
"type",
"defaulting",
"to",
"content",
"-",
"type",
"if",
"none",
"is",
"specified",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/rest/RESTRequest.java#L300-L316 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/rest/RESTRequest.java | RESTRequest.isMessageCompressed | private boolean isMessageCompressed() {
String contentEncoding = m_request.getHeader(HttpDefs.CONTENT_ENCODING);
if (contentEncoding != null) {
if (!contentEncoding.equalsIgnoreCase("gzip")) {
throw new IllegalArgumentException("Unsupported Content-Encoding: " + contentEn... | java | private boolean isMessageCompressed() {
String contentEncoding = m_request.getHeader(HttpDefs.CONTENT_ENCODING);
if (contentEncoding != null) {
if (!contentEncoding.equalsIgnoreCase("gzip")) {
throw new IllegalArgumentException("Unsupported Content-Encoding: " + contentEn... | [
"private",
"boolean",
"isMessageCompressed",
"(",
")",
"{",
"String",
"contentEncoding",
"=",
"m_request",
".",
"getHeader",
"(",
"HttpDefs",
".",
"CONTENT_ENCODING",
")",
";",
"if",
"(",
"contentEncoding",
"!=",
"null",
")",
"{",
"if",
"(",
"!",
"contentEncod... | If Content-Encoding is included, verify that we support it and return true. | [
"If",
"Content",
"-",
"Encoding",
"is",
"included",
"verify",
"that",
"we",
"support",
"it",
"and",
"return",
"true",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/rest/RESTRequest.java#L319-L328 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/utilities/Timer.java | Timer.stop | public long stop(long time) {
m_nesting--;
// not started and stopped
if (m_nesting < 0){
m_nesting = 0;
}
if (m_nesting == 0){
long elapsedTime = time - m_startTime;
m_elapsedTime += elapsedTime;
return elapsedTime;
}
return 0;
} | java | public long stop(long time) {
m_nesting--;
// not started and stopped
if (m_nesting < 0){
m_nesting = 0;
}
if (m_nesting == 0){
long elapsedTime = time - m_startTime;
m_elapsedTime += elapsedTime;
return elapsedTime;
}
return 0;
} | [
"public",
"long",
"stop",
"(",
"long",
"time",
")",
"{",
"m_nesting",
"--",
";",
"// not started and stopped\r",
"if",
"(",
"m_nesting",
"<",
"0",
")",
"{",
"m_nesting",
"=",
"0",
";",
"}",
"if",
"(",
"m_nesting",
"==",
"0",
")",
"{",
"long",
"elapsedT... | Stop the timer. If timer was started, update the elapsed time. | [
"Stop",
"the",
"timer",
".",
"If",
"timer",
"was",
"started",
"update",
"the",
"elapsed",
"time",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/utilities/Timer.java#L52-L64 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java | ScalarFieldUpdater.addValuesForField | @Override
public void addValuesForField() {
FieldDefinition fieldDef = m_tableDef.getFieldDef(m_fieldName);
if (fieldDef == null || !fieldDef.isCollection()) {
addSVScalar();
} else {
addMVScalar();
}
} | java | @Override
public void addValuesForField() {
FieldDefinition fieldDef = m_tableDef.getFieldDef(m_fieldName);
if (fieldDef == null || !fieldDef.isCollection()) {
addSVScalar();
} else {
addMVScalar();
}
} | [
"@",
"Override",
"public",
"void",
"addValuesForField",
"(",
")",
"{",
"FieldDefinition",
"fieldDef",
"=",
"m_tableDef",
".",
"getFieldDef",
"(",
"m_fieldName",
")",
";",
"if",
"(",
"fieldDef",
"==",
"null",
"||",
"!",
"fieldDef",
".",
"isCollection",
"(",
"... | Add scalar value to object record; add term columns for indexed tokens. | [
"Add",
"scalar",
"value",
"to",
"object",
"record",
";",
"add",
"term",
"columns",
"for",
"indexed",
"tokens",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java#L42-L50 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java | ScalarFieldUpdater.mergeMVFieldValues | public static Set<String> mergeMVFieldValues(Collection<String> currValueSet,
Collection<String> removeValueSet,
Collection<String> newValueSet) {
Set<String> resultSet = new HashSet<>();
if (currVal... | java | public static Set<String> mergeMVFieldValues(Collection<String> currValueSet,
Collection<String> removeValueSet,
Collection<String> newValueSet) {
Set<String> resultSet = new HashSet<>();
if (currVal... | [
"public",
"static",
"Set",
"<",
"String",
">",
"mergeMVFieldValues",
"(",
"Collection",
"<",
"String",
">",
"currValueSet",
",",
"Collection",
"<",
"String",
">",
"removeValueSet",
",",
"Collection",
"<",
"String",
">",
"newValueSet",
")",
"{",
"Set",
"<",
"... | Merge the given current, remove, and new MV field values into a new set. | [
"Merge",
"the",
"given",
"current",
"remove",
"and",
"new",
"MV",
"field",
"values",
"into",
"a",
"new",
"set",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java#L71-L85 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java | ScalarFieldUpdater.addFieldTermReferences | private void addFieldTermReferences(Set<String> termSet) {
Map<String, Set<String>> fieldTermRefsMap = new HashMap<String, Set<String>>();
fieldTermRefsMap.put(m_fieldName, termSet);
m_dbTran.addTermReferences(m_tableDef, m_tableDef.getShardNumber(m_dbObj), fieldTermRefsMap);
} | java | private void addFieldTermReferences(Set<String> termSet) {
Map<String, Set<String>> fieldTermRefsMap = new HashMap<String, Set<String>>();
fieldTermRefsMap.put(m_fieldName, termSet);
m_dbTran.addTermReferences(m_tableDef, m_tableDef.getShardNumber(m_dbObj), fieldTermRefsMap);
} | [
"private",
"void",
"addFieldTermReferences",
"(",
"Set",
"<",
"String",
">",
"termSet",
")",
"{",
"Map",
"<",
"String",
",",
"Set",
"<",
"String",
">",
">",
"fieldTermRefsMap",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Set",
"<",
"String",
">",
">",
... | Add references to the given terms for used for this field. | [
"Add",
"references",
"to",
"the",
"given",
"terms",
"for",
"used",
"for",
"this",
"field",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java#L95-L99 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java | ScalarFieldUpdater.addMVScalar | private void addMVScalar() {
Set<String> values = new HashSet<>(m_dbObj.getFieldValues(m_fieldName));
String fieldValue = Utils.concatenate(values, CommonDefs.MV_SCALAR_SEP_CHAR);
m_dbTran.addScalarValueColumn(m_tableDef, m_dbObj.getObjectID(), m_fieldName, fieldValue);
addTermColumn... | java | private void addMVScalar() {
Set<String> values = new HashSet<>(m_dbObj.getFieldValues(m_fieldName));
String fieldValue = Utils.concatenate(values, CommonDefs.MV_SCALAR_SEP_CHAR);
m_dbTran.addScalarValueColumn(m_tableDef, m_dbObj.getObjectID(), m_fieldName, fieldValue);
addTermColumn... | [
"private",
"void",
"addMVScalar",
"(",
")",
"{",
"Set",
"<",
"String",
">",
"values",
"=",
"new",
"HashSet",
"<>",
"(",
"m_dbObj",
".",
"getFieldValues",
"(",
"m_fieldName",
")",
")",
";",
"String",
"fieldValue",
"=",
"Utils",
".",
"concatenate",
"(",
"v... | Add new MV scalar field. | [
"Add",
"new",
"MV",
"scalar",
"field",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java#L102-L107 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java | ScalarFieldUpdater.addSVScalar | private void addSVScalar() {
String fieldValue = m_dbObj.getFieldValue(m_fieldName);
m_dbTran.addScalarValueColumn(m_tableDef, m_dbObj.getObjectID(), m_fieldName, fieldValue);
addTermColumns(fieldValue);
} | java | private void addSVScalar() {
String fieldValue = m_dbObj.getFieldValue(m_fieldName);
m_dbTran.addScalarValueColumn(m_tableDef, m_dbObj.getObjectID(), m_fieldName, fieldValue);
addTermColumns(fieldValue);
} | [
"private",
"void",
"addSVScalar",
"(",
")",
"{",
"String",
"fieldValue",
"=",
"m_dbObj",
".",
"getFieldValue",
"(",
"m_fieldName",
")",
";",
"m_dbTran",
".",
"addScalarValueColumn",
"(",
"m_tableDef",
",",
"m_dbObj",
".",
"getObjectID",
"(",
")",
",",
"m_field... | Add new SV scalar field. | [
"Add",
"new",
"SV",
"scalar",
"field",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java#L110-L114 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java | ScalarFieldUpdater.addTermColumns | private void addTermColumns(String fieldValue) {
Set<String> termSet = tokenize(fieldValue);
indexTerms(termSet);
addFieldTermReferences(termSet);
addFieldReference();
} | java | private void addTermColumns(String fieldValue) {
Set<String> termSet = tokenize(fieldValue);
indexTerms(termSet);
addFieldTermReferences(termSet);
addFieldReference();
} | [
"private",
"void",
"addTermColumns",
"(",
"String",
"fieldValue",
")",
"{",
"Set",
"<",
"String",
">",
"termSet",
"=",
"tokenize",
"(",
"fieldValue",
")",
";",
"indexTerms",
"(",
"termSet",
")",
";",
"addFieldTermReferences",
"(",
"termSet",
")",
";",
"addFi... | Add all Terms columns needed for our scalar field. | [
"Add",
"all",
"Terms",
"columns",
"needed",
"for",
"our",
"scalar",
"field",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java#L117-L122 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java | ScalarFieldUpdater.indexTerms | private void indexTerms(Set<String> termSet) {
for (String term : termSet) {
m_dbTran.addTermIndexColumn(m_tableDef, m_dbObj, m_fieldName, term);
}
} | java | private void indexTerms(Set<String> termSet) {
for (String term : termSet) {
m_dbTran.addTermIndexColumn(m_tableDef, m_dbObj, m_fieldName, term);
}
} | [
"private",
"void",
"indexTerms",
"(",
"Set",
"<",
"String",
">",
"termSet",
")",
"{",
"for",
"(",
"String",
"term",
":",
"termSet",
")",
"{",
"m_dbTran",
".",
"addTermIndexColumn",
"(",
"m_tableDef",
",",
"m_dbObj",
",",
"m_fieldName",
",",
"term",
")",
... | Tokenize the given field with the appropriate analyzer and add Terms columns for each term. | [
"Tokenize",
"the",
"given",
"field",
"with",
"the",
"appropriate",
"analyzer",
"and",
"add",
"Terms",
"columns",
"for",
"each",
"term",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java#L125-L129 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java | ScalarFieldUpdater.tokenize | private Set<String> tokenize(String fieldValue) {
FieldAnalyzer analyzer = FieldAnalyzer.findAnalyzer(m_tableDef, m_fieldName);
return analyzer.extractTerms(fieldValue);
} | java | private Set<String> tokenize(String fieldValue) {
FieldAnalyzer analyzer = FieldAnalyzer.findAnalyzer(m_tableDef, m_fieldName);
return analyzer.extractTerms(fieldValue);
} | [
"private",
"Set",
"<",
"String",
">",
"tokenize",
"(",
"String",
"fieldValue",
")",
"{",
"FieldAnalyzer",
"analyzer",
"=",
"FieldAnalyzer",
".",
"findAnalyzer",
"(",
"m_tableDef",
",",
"m_fieldName",
")",
";",
"return",
"analyzer",
".",
"extractTerms",
"(",
"f... | Tokenize the given field value with the appropriate analyzer. | [
"Tokenize",
"the",
"given",
"field",
"value",
"with",
"the",
"appropriate",
"analyzer",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java#L149-L152 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java | ScalarFieldUpdater.updateSVScalar | private boolean updateSVScalar(String currentValue) {
String newValue = m_dbObj.getFieldValue(m_fieldName);
boolean bUpdated = false;
if (Utils.isEmpty(newValue)) {
if (!Utils.isEmpty(currentValue)) {
m_dbTran.deleteScalarValueColumn(m_tableDef, m_dbObj.getObject... | java | private boolean updateSVScalar(String currentValue) {
String newValue = m_dbObj.getFieldValue(m_fieldName);
boolean bUpdated = false;
if (Utils.isEmpty(newValue)) {
if (!Utils.isEmpty(currentValue)) {
m_dbTran.deleteScalarValueColumn(m_tableDef, m_dbObj.getObject... | [
"private",
"boolean",
"updateSVScalar",
"(",
"String",
"currentValue",
")",
"{",
"String",
"newValue",
"=",
"m_dbObj",
".",
"getFieldValue",
"(",
"m_fieldName",
")",
";",
"boolean",
"bUpdated",
"=",
"false",
";",
"if",
"(",
"Utils",
".",
"isEmpty",
"(",
"new... | Replace our SV scalar's value. | [
"Replace",
"our",
"SV",
"scalar",
"s",
"value",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java#L155-L169 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java | ScalarFieldUpdater.updateMVScalar | private boolean updateMVScalar(String currentValue) {
boolean bUpdated = false;
Set<String> currentValues = Utils.split(currentValue, CommonDefs.MV_SCALAR_SEP_CHAR);
Set<String> newValueSet = mergeMVFieldValues(currentValues,
m_dbObj.getRe... | java | private boolean updateMVScalar(String currentValue) {
boolean bUpdated = false;
Set<String> currentValues = Utils.split(currentValue, CommonDefs.MV_SCALAR_SEP_CHAR);
Set<String> newValueSet = mergeMVFieldValues(currentValues,
m_dbObj.getRe... | [
"private",
"boolean",
"updateMVScalar",
"(",
"String",
"currentValue",
")",
"{",
"boolean",
"bUpdated",
"=",
"false",
";",
"Set",
"<",
"String",
">",
"currentValues",
"=",
"Utils",
".",
"split",
"(",
"currentValue",
",",
"CommonDefs",
".",
"MV_SCALAR_SEP_CHAR",
... | where ~ is the MV value separator. | [
"where",
"~",
"is",
"the",
"MV",
"value",
"separator",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java#L174-L191 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java | ScalarFieldUpdater.updateScalarReplaceValue | private void updateScalarReplaceValue(String currentValue, String newValue) {
m_dbTran.addScalarValueColumn(m_tableDef, m_dbObj.getObjectID(), m_fieldName, newValue);
Set<String> currTermSet = tokenize(Utils.isEmpty(currentValue) ? "" : currentValue);
Set<String> newTermSet = tokenize(newValu... | java | private void updateScalarReplaceValue(String currentValue, String newValue) {
m_dbTran.addScalarValueColumn(m_tableDef, m_dbObj.getObjectID(), m_fieldName, newValue);
Set<String> currTermSet = tokenize(Utils.isEmpty(currentValue) ? "" : currentValue);
Set<String> newTermSet = tokenize(newValu... | [
"private",
"void",
"updateScalarReplaceValue",
"(",
"String",
"currentValue",
",",
"String",
"newValue",
")",
"{",
"m_dbTran",
".",
"addScalarValueColumn",
"(",
"m_tableDef",
",",
"m_dbObj",
".",
"getObjectID",
"(",
")",
",",
"m_fieldName",
",",
"newValue",
")",
... | This works for both SV and MV scalar fields | [
"This",
"works",
"for",
"both",
"SV",
"and",
"MV",
"scalar",
"fields"
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/ScalarFieldUpdater.java#L195-L209 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/FieldDefinition.java | FieldDefinition.isValidFieldName | public static boolean isValidFieldName(String fieldName) {
return fieldName != null &&
fieldName.length() > 0 &&
Utils.isLetter(fieldName.charAt(0)) &&
Utils.allAlphaNumUnderscore(fieldName);
} | java | public static boolean isValidFieldName(String fieldName) {
return fieldName != null &&
fieldName.length() > 0 &&
Utils.isLetter(fieldName.charAt(0)) &&
Utils.allAlphaNumUnderscore(fieldName);
} | [
"public",
"static",
"boolean",
"isValidFieldName",
"(",
"String",
"fieldName",
")",
"{",
"return",
"fieldName",
"!=",
"null",
"&&",
"fieldName",
".",
"length",
"(",
")",
">",
"0",
"&&",
"Utils",
".",
"isLetter",
"(",
"fieldName",
".",
"charAt",
"(",
"0",
... | Indicate if the given field name is valid. Currently, field names must begin with a
letter and consist of all letters, digits, and underscores.
@param fieldName Candidate field name.
@return True if the given name is valid for fields. | [
"Indicate",
"if",
"the",
"given",
"field",
"name",
"is",
"valid",
".",
"Currently",
"field",
"names",
"must",
"begin",
"with",
"a",
"letter",
"and",
"consist",
"of",
"all",
"letters",
"digits",
"and",
"underscores",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/FieldDefinition.java#L56-L61 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/FieldDefinition.java | FieldDefinition.setTableDefinition | public void setTableDefinition(TableDefinition tableDef) {
m_tableDef = tableDef;
// LINK and XLINK 'table' defaults to owning table.
if (m_type.isLinkType() && Utils.isEmpty(m_linkExtent)) {
m_linkExtent = tableDef.getTableName();
}
} | java | public void setTableDefinition(TableDefinition tableDef) {
m_tableDef = tableDef;
// LINK and XLINK 'table' defaults to owning table.
if (m_type.isLinkType() && Utils.isEmpty(m_linkExtent)) {
m_linkExtent = tableDef.getTableName();
}
} | [
"public",
"void",
"setTableDefinition",
"(",
"TableDefinition",
"tableDef",
")",
"{",
"m_tableDef",
"=",
"tableDef",
";",
"// LINK and XLINK 'table' defaults to owning table.\r",
"if",
"(",
"m_type",
".",
"isLinkType",
"(",
")",
"&&",
"Utils",
".",
"isEmpty",
"(",
"... | Make the given table the owner of this field definition and any nested fields it
owns.
@param tableDef {@link TableDefinition} that owns this field. | [
"Make",
"the",
"given",
"table",
"the",
"owner",
"of",
"this",
"field",
"definition",
"and",
"any",
"nested",
"fields",
"it",
"owns",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/FieldDefinition.java#L212-L219 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/FieldDefinition.java | FieldDefinition.hasNestedField | public boolean hasNestedField(String fieldName) {
if (m_type != FieldType.GROUP) {
return false;
}
return m_nestedFieldMap.containsKey(fieldName);
} | java | public boolean hasNestedField(String fieldName) {
if (m_type != FieldType.GROUP) {
return false;
}
return m_nestedFieldMap.containsKey(fieldName);
} | [
"public",
"boolean",
"hasNestedField",
"(",
"String",
"fieldName",
")",
"{",
"if",
"(",
"m_type",
"!=",
"FieldType",
".",
"GROUP",
")",
"{",
"return",
"false",
";",
"}",
"return",
"m_nestedFieldMap",
".",
"containsKey",
"(",
"fieldName",
")",
";",
"}"
] | Indicate if this group field contains an immediated-nested field with the given
name. If this field is not a group, false is returned.
@param fieldName Name of candidate nested field.
@return True if this is a group field that contains the given name
as an immediated nested field. | [
"Indicate",
"if",
"this",
"group",
"field",
"contains",
"an",
"immediated",
"-",
"nested",
"field",
"with",
"the",
"given",
"name",
".",
"If",
"this",
"field",
"is",
"not",
"a",
"group",
"false",
"is",
"returned",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/FieldDefinition.java#L495-L500 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/FieldDefinition.java | FieldDefinition.setName | public void setName(String fieldName) {
if (m_name != null) {
throw new IllegalArgumentException("Field name is already set: " + m_name);
}
if (!isValidFieldName(fieldName)) {
throw new IllegalArgumentException("Invalid field name: " + fieldName);
}
... | java | public void setName(String fieldName) {
if (m_name != null) {
throw new IllegalArgumentException("Field name is already set: " + m_name);
}
if (!isValidFieldName(fieldName)) {
throw new IllegalArgumentException("Invalid field name: " + fieldName);
}
... | [
"public",
"void",
"setName",
"(",
"String",
"fieldName",
")",
"{",
"if",
"(",
"m_name",
"!=",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Field name is already set: \"",
"+",
"m_name",
")",
";",
"}",
"if",
"(",
"!",
"isValidFieldName"... | Set this field's name to the given valid. An IllegalArgumentException is thrown
if the name is already assigned or is not valid.
@param fieldName New name for field. | [
"Set",
"this",
"field",
"s",
"name",
"to",
"the",
"given",
"valid",
".",
"An",
"IllegalArgumentException",
"is",
"thrown",
"if",
"the",
"name",
"is",
"already",
"assigned",
"or",
"is",
"not",
"valid",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/FieldDefinition.java#L577-L585 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/FieldDefinition.java | FieldDefinition.verify | private void verify() {
Utils.require(!Utils.isEmpty(m_name), "Field name is required");
Utils.require(m_type != null, "Field type is required");
// If an 'inverse' or 'table' was specified, type must be LINK or XLINK.
Utils.require(m_linkInverse == null || m_type.isLinkTyp... | java | private void verify() {
Utils.require(!Utils.isEmpty(m_name), "Field name is required");
Utils.require(m_type != null, "Field type is required");
// If an 'inverse' or 'table' was specified, type must be LINK or XLINK.
Utils.require(m_linkInverse == null || m_type.isLinkTyp... | [
"private",
"void",
"verify",
"(",
")",
"{",
"Utils",
".",
"require",
"(",
"!",
"Utils",
".",
"isEmpty",
"(",
"m_name",
")",
",",
"\"Field name is required\"",
")",
";",
"Utils",
".",
"require",
"(",
"m_type",
"!=",
"null",
",",
"\"Field type is required\"",
... | Verify that this field definition is complete and coherent. | [
"Verify",
"that",
"this",
"field",
"definition",
"is",
"complete",
"and",
"coherent",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/FieldDefinition.java#L816-L856 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/utilities/BigSet.java | BigSet.delete | public void delete() {
for(int i = 1; i < m_nextNo; i++) {
new File(m_fileName + "_" + i).delete();
}
m_nextNo = 1;
} | java | public void delete() {
for(int i = 1; i < m_nextNo; i++) {
new File(m_fileName + "_" + i).delete();
}
m_nextNo = 1;
} | [
"public",
"void",
"delete",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"1",
";",
"i",
"<",
"m_nextNo",
";",
"i",
"++",
")",
"{",
"new",
"File",
"(",
"m_fileName",
"+",
"\"_\"",
"+",
"i",
")",
".",
"delete",
"(",
")",
";",
"}",
"m_nextNo",
"=... | Deleting data files. | [
"Deleting",
"data",
"files",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/utilities/BigSet.java#L106-L111 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/olap/Olap.java | Olap.getApplicationDefinition | public ApplicationDefinition getApplicationDefinition(Tenant tenant, String applicationName) {
if(tenant == null) tenant = TenantService.instance().getDefaultTenant();
ApplicationDefinition appDef = SchemaService.instance().getApplication(tenant, applicationName);
return appDef;
} | java | public ApplicationDefinition getApplicationDefinition(Tenant tenant, String applicationName) {
if(tenant == null) tenant = TenantService.instance().getDefaultTenant();
ApplicationDefinition appDef = SchemaService.instance().getApplication(tenant, applicationName);
return appDef;
} | [
"public",
"ApplicationDefinition",
"getApplicationDefinition",
"(",
"Tenant",
"tenant",
",",
"String",
"applicationName",
")",
"{",
"if",
"(",
"tenant",
"==",
"null",
")",
"tenant",
"=",
"TenantService",
".",
"instance",
"(",
")",
".",
"getDefaultTenant",
"(",
"... | If tenant is null then default tenant is used. | [
"If",
"tenant",
"is",
"null",
"then",
"default",
"tenant",
"is",
"used",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/olap/Olap.java#L148-L152 | train |
QSFT/Doradus | doradus-client/src/main/java/com/dell/doradus/client/SSLTransportParameters.java | SSLTransportParameters.setKeyStore | public void setKeyStore(String keyStore, String keyPass, String keyManagerType, String keyStoreType)
{
if((keyStore == null) || (keyPass == null))
{
this.keyStore = System.getProperty("javax.net.ssl.keyStore");
this.keyPass = System.getProperty("javax.net.ssl.keyStoreP... | java | public void setKeyStore(String keyStore, String keyPass, String keyManagerType, String keyStoreType)
{
if((keyStore == null) || (keyPass == null))
{
this.keyStore = System.getProperty("javax.net.ssl.keyStore");
this.keyPass = System.getProperty("javax.net.ssl.keyStoreP... | [
"public",
"void",
"setKeyStore",
"(",
"String",
"keyStore",
",",
"String",
"keyPass",
",",
"String",
"keyManagerType",
",",
"String",
"keyStoreType",
")",
"{",
"if",
"(",
"(",
"keyStore",
"==",
"null",
")",
"||",
"(",
"keyPass",
"==",
"null",
")",
")",
"... | Set the keystore, password, certificate type and the store type
@param keyStore Location of the Keystore on disk
@param keyPass Keystore password
@param keyManagerType The default is X509
@param keyStoreType The default is JKS | [
"Set",
"the",
"keystore",
"password",
"certificate",
"type",
"and",
"the",
"store",
"type"
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/SSLTransportParameters.java#L185-L205 | train |
QSFT/Doradus | doradus-client/src/main/java/com/dell/doradus/client/SSLTransportParameters.java | SSLTransportParameters.setKeyStore | public void setKeyStore(String keyStore, String keyPass)
{
setKeyStore(keyStore, keyPass, null, null);
} | java | public void setKeyStore(String keyStore, String keyPass)
{
setKeyStore(keyStore, keyPass, null, null);
} | [
"public",
"void",
"setKeyStore",
"(",
"String",
"keyStore",
",",
"String",
"keyPass",
")",
"{",
"setKeyStore",
"(",
"keyStore",
",",
"keyPass",
",",
"null",
",",
"null",
")",
";",
"}"
] | Set the keystore and password
@param keyStore Location of the Keystore on disk
@param keyPass Keystore password | [
"Set",
"the",
"keystore",
"and",
"password"
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/SSLTransportParameters.java#L213-L216 | train |
QSFT/Doradus | doradus-client/src/main/java/com/dell/doradus/client/SSLTransportParameters.java | SSLTransportParameters.setTrustStore | public void setTrustStore(String trustStore, String trustPass, String trustManagerType, String trustStoreType)
{
if((trustStore == null) || (trustPass == null))
{
this.trustStore = System.getProperty("javax.net.ssl.trustStore");
this.trustPass = System.getProperty("ja... | java | public void setTrustStore(String trustStore, String trustPass, String trustManagerType, String trustStoreType)
{
if((trustStore == null) || (trustPass == null))
{
this.trustStore = System.getProperty("javax.net.ssl.trustStore");
this.trustPass = System.getProperty("ja... | [
"public",
"void",
"setTrustStore",
"(",
"String",
"trustStore",
",",
"String",
"trustPass",
",",
"String",
"trustManagerType",
",",
"String",
"trustStoreType",
")",
"{",
"if",
"(",
"(",
"trustStore",
"==",
"null",
")",
"||",
"(",
"trustPass",
"==",
"null",
"... | Set the truststore, password, certificate type and the store type
@param trustStore Location of the Truststore on disk
@param trustPass Truststore password
@param trustManagerType The default is X509
@param trustStoreType The default is JKS | [
"Set",
"the",
"truststore",
"password",
"certificate",
"type",
"and",
"the",
"store",
"type"
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/SSLTransportParameters.java#L226-L246 | train |
QSFT/Doradus | doradus-client/src/main/java/com/dell/doradus/client/SSLTransportParameters.java | SSLTransportParameters.setTrustStore | public void setTrustStore(String trustStore, String trustPass) {
setTrustStore(trustStore, trustPass, null, null);
} | java | public void setTrustStore(String trustStore, String trustPass) {
setTrustStore(trustStore, trustPass, null, null);
} | [
"public",
"void",
"setTrustStore",
"(",
"String",
"trustStore",
",",
"String",
"trustPass",
")",
"{",
"setTrustStore",
"(",
"trustStore",
",",
"trustPass",
",",
"null",
",",
"null",
")",
";",
"}"
] | Set the truststore and password
@param trustStore Location of the Truststore on disk
@param trustPass Truststore password | [
"Set",
"the",
"truststore",
"and",
"password"
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/SSLTransportParameters.java#L254-L256 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/rest/RegisteredCommand.java | RegisteredCommand.compareNodes | private static int compareNodes(String node1, String node2) {
assert node1 != null;
assert node2 != null;
if (node1.equals(node2)) {
return 0;
}
if (node1.length() > 0 && node1.charAt(0) == '{') {
if (node2.length() > 0 && node2.charAt(0) == '{') ... | java | private static int compareNodes(String node1, String node2) {
assert node1 != null;
assert node2 != null;
if (node1.equals(node2)) {
return 0;
}
if (node1.length() > 0 && node1.charAt(0) == '{') {
if (node2.length() > 0 && node2.charAt(0) == '{') ... | [
"private",
"static",
"int",
"compareNodes",
"(",
"String",
"node1",
",",
"String",
"node2",
")",
"{",
"assert",
"node1",
"!=",
"null",
";",
"assert",
"node2",
"!=",
"null",
";",
"if",
"(",
"node1",
".",
"equals",
"(",
"node2",
")",
")",
"{",
"return",
... | path nodes are query parameters. Either node can be empty, but not null. | [
"path",
"nodes",
"are",
"query",
"parameters",
".",
"Either",
"node",
"can",
"be",
"empty",
"but",
"not",
"null",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/rest/RegisteredCommand.java#L223-L240 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/rest/RegisteredCommand.java | RegisteredCommand.matches | private static boolean matches(String value, String component, Map<String, String> variableMap) {
if (Utils.isEmpty(component)) {
return Utils.isEmpty(value);
}
if (component.charAt(0) == '{') {
// The component is a variable, so it always matches.
if (!Utils.... | java | private static boolean matches(String value, String component, Map<String, String> variableMap) {
if (Utils.isEmpty(component)) {
return Utils.isEmpty(value);
}
if (component.charAt(0) == '{') {
// The component is a variable, so it always matches.
if (!Utils.... | [
"private",
"static",
"boolean",
"matches",
"(",
"String",
"value",
",",
"String",
"component",
",",
"Map",
"<",
"String",
",",
"String",
">",
"variableMap",
")",
"{",
"if",
"(",
"Utils",
".",
"isEmpty",
"(",
"component",
")",
")",
"{",
"return",
"Utils",... | variable value is extracted and added to the given map. | [
"variable",
"value",
"is",
"extracted",
"and",
"added",
"to",
"the",
"given",
"map",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/rest/RegisteredCommand.java#L245-L258 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/rest/RegisteredCommand.java | RegisteredCommand.getVariableName | private static String getVariableName(String value) {
assert value.charAt(0) == '{';
assert value.charAt(value.length() - 1) == '}';
return value.substring(1, value.length() - 1);
} | java | private static String getVariableName(String value) {
assert value.charAt(0) == '{';
assert value.charAt(value.length() - 1) == '}';
return value.substring(1, value.length() - 1);
} | [
"private",
"static",
"String",
"getVariableName",
"(",
"String",
"value",
")",
"{",
"assert",
"value",
".",
"charAt",
"(",
"0",
")",
"==",
"'",
"'",
";",
"assert",
"value",
".",
"charAt",
"(",
"value",
".",
"length",
"(",
")",
"-",
"1",
")",
"==",
... | thrown if the trailing '}' is missing. | [
"thrown",
"if",
"the",
"trailing",
"}",
"is",
"missing",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/rest/RegisteredCommand.java#L263-L267 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/rest/RegisteredCommand.java | RegisteredCommand.findParamDescMethods | private void findParamDescMethods() {
for (Method method : m_commandClass.getMethods()) {
if (method.isAnnotationPresent(ParamDescription.class)) {
try {
RESTParameter cmdParam = (RESTParameter) method.invoke(null, (Object[])null);
addParameter... | java | private void findParamDescMethods() {
for (Method method : m_commandClass.getMethods()) {
if (method.isAnnotationPresent(ParamDescription.class)) {
try {
RESTParameter cmdParam = (RESTParameter) method.invoke(null, (Object[])null);
addParameter... | [
"private",
"void",
"findParamDescMethods",
"(",
")",
"{",
"for",
"(",
"Method",
"method",
":",
"m_commandClass",
".",
"getMethods",
"(",
")",
")",
"{",
"if",
"(",
"method",
".",
"isAnnotationPresent",
"(",
"ParamDescription",
".",
"class",
")",
")",
"{",
"... | Look for ParamDescription annotations and attempt to call each annotated method. | [
"Look",
"for",
"ParamDescription",
"annotations",
"and",
"attempt",
"to",
"call",
"each",
"annotated",
"method",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/rest/RegisteredCommand.java#L276-L288 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/rest/RegisteredCommand.java | RegisteredCommand.createCommandDescription | private void createCommandDescription(Description descAnnotation) {
setName(descAnnotation.name());
setSummary(descAnnotation.summary());
setMethods(descAnnotation.methods());
setURI(descAnnotation.uri());
setInputEntity(descAnnotation.inputEntity());
setOutputEntity(desc... | java | private void createCommandDescription(Description descAnnotation) {
setName(descAnnotation.name());
setSummary(descAnnotation.summary());
setMethods(descAnnotation.methods());
setURI(descAnnotation.uri());
setInputEntity(descAnnotation.inputEntity());
setOutputEntity(desc... | [
"private",
"void",
"createCommandDescription",
"(",
"Description",
"descAnnotation",
")",
"{",
"setName",
"(",
"descAnnotation",
".",
"name",
"(",
")",
")",
";",
"setSummary",
"(",
"descAnnotation",
".",
"summary",
"(",
")",
")",
";",
"setMethods",
"(",
"descA... | Create a CommandDescription object for the given Description annotation. | [
"Create",
"a",
"CommandDescription",
"object",
"for",
"the",
"given",
"Description",
"annotation",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/rest/RegisteredCommand.java#L303-L312 | train |
QSFT/Doradus | doradus-client/src/main/java/com/dell/doradus/dory/DoradusClient.java | DoradusClient.open | public static DoradusClient open(String host, int port, Credentials credentials, String applicationName) {
DoradusClient doradusClient = new DoradusClient(host, port, null, credentials, applicationName);
doradusClient.setCredentials(credentials);
String storageService = lookupStorageServic... | java | public static DoradusClient open(String host, int port, Credentials credentials, String applicationName) {
DoradusClient doradusClient = new DoradusClient(host, port, null, credentials, applicationName);
doradusClient.setCredentials(credentials);
String storageService = lookupStorageServic... | [
"public",
"static",
"DoradusClient",
"open",
"(",
"String",
"host",
",",
"int",
"port",
",",
"Credentials",
"credentials",
",",
"String",
"applicationName",
")",
"{",
"DoradusClient",
"doradusClient",
"=",
"new",
"DoradusClient",
"(",
"host",
",",
"port",
",",
... | Static factory method to open a 'dory' client session
@param host Doradus Server host name or IP address.
@param port Doradus Server port number.
@param applicationName
@return the instance of the DoradusClient session | [
"Static",
"factory",
"method",
"to",
"open",
"a",
"dory",
"client",
"session"
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/dory/DoradusClient.java#L79-L85 | train |
QSFT/Doradus | doradus-client/src/main/java/com/dell/doradus/dory/DoradusClient.java | DoradusClient.setApplication | public void setApplication(String appName) {
applicationName = appName;
String storageService = lookupStorageServiceByApp(getRestClient(), applicationName);
setStorageService(storageService);
} | java | public void setApplication(String appName) {
applicationName = appName;
String storageService = lookupStorageServiceByApp(getRestClient(), applicationName);
setStorageService(storageService);
} | [
"public",
"void",
"setApplication",
"(",
"String",
"appName",
")",
"{",
"applicationName",
"=",
"appName",
";",
"String",
"storageService",
"=",
"lookupStorageServiceByApp",
"(",
"getRestClient",
"(",
")",
",",
"applicationName",
")",
";",
"setStorageService",
"(",
... | Set the given application name as context for all future commands. This method can
be used when an application name was not given in a constructor.
@param appName Application name that is used for application-specific commands
called from this point forward. | [
"Set",
"the",
"given",
"application",
"name",
"as",
"context",
"for",
"all",
"future",
"commands",
".",
"This",
"method",
"can",
"be",
"used",
"when",
"an",
"application",
"name",
"was",
"not",
"given",
"in",
"a",
"constructor",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/dory/DoradusClient.java#L94-L98 | train |
QSFT/Doradus | doradus-client/src/main/java/com/dell/doradus/dory/DoradusClient.java | DoradusClient.setCredentials | public void setCredentials(String tenant, String username, String userpassword) {
Credentials credentials = new Credentials(tenant, username, userpassword);
restClient.setCredentials(credentials);
} | java | public void setCredentials(String tenant, String username, String userpassword) {
Credentials credentials = new Credentials(tenant, username, userpassword);
restClient.setCredentials(credentials);
} | [
"public",
"void",
"setCredentials",
"(",
"String",
"tenant",
",",
"String",
"username",
",",
"String",
"userpassword",
")",
"{",
"Credentials",
"credentials",
"=",
"new",
"Credentials",
"(",
"tenant",
",",
"username",
",",
"userpassword",
")",
";",
"restClient",... | Set credentials such as tenant, username, password for use with a Doradus application.
@param tenant tenant name
@param username user name use when accessing applications within the specified tenant.
@param userpassword user password | [
"Set",
"credentials",
"such",
"as",
"tenant",
"username",
"password",
"for",
"use",
"with",
"a",
"Doradus",
"application",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/dory/DoradusClient.java#L114-L117 | train |
QSFT/Doradus | doradus-client/src/main/java/com/dell/doradus/dory/DoradusClient.java | DoradusClient.listCommands | public Map<String, List<String>> listCommands() {
Map<String, List<String>> result = new HashMap<String, List<String>>();
for (String cat : restMetadataJson.keySet()) {
JsonObject commands = restMetadataJson.getJsonObject(cat);
List<String> names = new ArrayList<String>();
... | java | public Map<String, List<String>> listCommands() {
Map<String, List<String>> result = new HashMap<String, List<String>>();
for (String cat : restMetadataJson.keySet()) {
JsonObject commands = restMetadataJson.getJsonObject(cat);
List<String> names = new ArrayList<String>();
... | [
"public",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"listCommands",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"result",
"=",
"new",
"HashMap",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
... | Retrieve the map of commands keyed by service name
@return map of commands | [
"Retrieve",
"the",
"map",
"of",
"commands",
"keyed",
"by",
"service",
"name"
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/dory/DoradusClient.java#L131-L142 | train |
QSFT/Doradus | doradus-client/src/main/java/com/dell/doradus/dory/DoradusClient.java | DoradusClient.describeCommand | public JsonObject describeCommand(String service, String command) {
return Command.matchCommand(restMetadataJson, command, service);
} | java | public JsonObject describeCommand(String service, String command) {
return Command.matchCommand(restMetadataJson, command, service);
} | [
"public",
"JsonObject",
"describeCommand",
"(",
"String",
"service",
",",
"String",
"command",
")",
"{",
"return",
"Command",
".",
"matchCommand",
"(",
"restMetadataJson",
",",
"command",
",",
"service",
")",
";",
"}"
] | Describe command that helps give the idea what client needs to build the command
@param service service name such as 'SpiderService' for application commands or '_systems' for system commands
@param command command name
@return JsonObject result in JSON that contains the description of the command | [
"Describe",
"command",
"that",
"helps",
"give",
"the",
"idea",
"what",
"client",
"needs",
"to",
"build",
"the",
"command"
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/dory/DoradusClient.java#L151-L154 | train |
QSFT/Doradus | doradus-client/src/main/java/com/dell/doradus/dory/DoradusClient.java | DoradusClient.lookupStorageServiceByApp | private static String lookupStorageServiceByApp(RESTClient restClient, String applicationName) {
Utils.require(applicationName != null, "Missing application name");
if (applicationName != null) {
ApplicationDefinition appDef = Command.getAppDef(restClient, applicationName);
Util... | java | private static String lookupStorageServiceByApp(RESTClient restClient, String applicationName) {
Utils.require(applicationName != null, "Missing application name");
if (applicationName != null) {
ApplicationDefinition appDef = Command.getAppDef(restClient, applicationName);
Util... | [
"private",
"static",
"String",
"lookupStorageServiceByApp",
"(",
"RESTClient",
"restClient",
",",
"String",
"applicationName",
")",
"{",
"Utils",
".",
"require",
"(",
"applicationName",
"!=",
"null",
",",
"\"Missing application name\"",
")",
";",
"if",
"(",
"applica... | Convenient method to lookup storageService of the application
@param restClient
@param applicationName
@return storage service name | [
"Convenient",
"method",
"to",
"lookup",
"storageService",
"of",
"the",
"application"
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/dory/DoradusClient.java#L208-L216 | train |
QSFT/Doradus | doradus-client/src/main/java/com/dell/doradus/dory/DoradusClient.java | DoradusClient.loadRESTRulesIfNotExist | private synchronized void loadRESTRulesIfNotExist(RESTClient restClient) {
if (restMetadataJson == null || restMetadataJson.isEmpty()) {
restMetadataJson = loadRESTCommandsFromServer(restClient);
}
} | java | private synchronized void loadRESTRulesIfNotExist(RESTClient restClient) {
if (restMetadataJson == null || restMetadataJson.isEmpty()) {
restMetadataJson = loadRESTCommandsFromServer(restClient);
}
} | [
"private",
"synchronized",
"void",
"loadRESTRulesIfNotExist",
"(",
"RESTClient",
"restClient",
")",
"{",
"if",
"(",
"restMetadataJson",
"==",
"null",
"||",
"restMetadataJson",
".",
"isEmpty",
"(",
")",
")",
"{",
"restMetadataJson",
"=",
"loadRESTCommandsFromServer",
... | Load RESTRules once
@param restClient | [
"Load",
"RESTRules",
"once"
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/dory/DoradusClient.java#L231-L235 | train |
QSFT/Doradus | doradus-client/src/main/java/com/dell/doradus/dory/DoradusClient.java | DoradusClient.loadRESTCommandsFromServer | private JsonObject loadRESTCommandsFromServer(RESTClient restClient) {
RESTResponse response = null;
try {
response = restClient.sendRequest(HttpMethod.GET, _DESCRIBE_URI, ContentType.APPLICATION_JSON, null);
} catch (IOException e) {
throw new RuntimeException(e);
... | java | private JsonObject loadRESTCommandsFromServer(RESTClient restClient) {
RESTResponse response = null;
try {
response = restClient.sendRequest(HttpMethod.GET, _DESCRIBE_URI, ContentType.APPLICATION_JSON, null);
} catch (IOException e) {
throw new RuntimeException(e);
... | [
"private",
"JsonObject",
"loadRESTCommandsFromServer",
"(",
"RESTClient",
"restClient",
")",
"{",
"RESTResponse",
"response",
"=",
"null",
";",
"try",
"{",
"response",
"=",
"restClient",
".",
"sendRequest",
"(",
"HttpMethod",
".",
"GET",
",",
"_DESCRIBE_URI",
",",... | Load REST commands by calling describe command
@param restClient
@return JsonObject that contains all the descriptions of all REST commands | [
"Load",
"REST",
"commands",
"by",
"calling",
"describe",
"command"
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/dory/DoradusClient.java#L243-L259 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/rest/RESTCommand.java | RESTCommand.setMethods | private void setMethods(String methodList) {
String[] methodNames = methodList.trim().split(",");
for (String methodName : methodNames) {
HttpMethod method = HttpMethod.valueOf(methodName.trim().toUpperCase());
Utils.require(method != null, "Unknown REST method: " + methodName);
... | java | private void setMethods(String methodList) {
String[] methodNames = methodList.trim().split(",");
for (String methodName : methodNames) {
HttpMethod method = HttpMethod.valueOf(methodName.trim().toUpperCase());
Utils.require(method != null, "Unknown REST method: " + methodName);
... | [
"private",
"void",
"setMethods",
"(",
"String",
"methodList",
")",
"{",
"String",
"[",
"]",
"methodNames",
"=",
"methodList",
".",
"trim",
"(",
")",
".",
"split",
"(",
"\",\"",
")",
";",
"for",
"(",
"String",
"methodName",
":",
"methodNames",
")",
"{",
... | Set methods from a CSV list. | [
"Set",
"methods",
"from",
"a",
"CSV",
"list",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/rest/RESTCommand.java#L384-L391 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/DBObject.java | DBObject.makeCopy | public DBObject makeCopy(String objID) {
DBObject newObj = new DBObject();
newObj.m_valueMap.putAll(m_valueMap);
newObj.setObjectID(objID);
newObj.m_valueRemoveMap.putAll(m_valueRemoveMap);
return newObj;
} | java | public DBObject makeCopy(String objID) {
DBObject newObj = new DBObject();
newObj.m_valueMap.putAll(m_valueMap);
newObj.setObjectID(objID);
newObj.m_valueRemoveMap.putAll(m_valueRemoveMap);
return newObj;
} | [
"public",
"DBObject",
"makeCopy",
"(",
"String",
"objID",
")",
"{",
"DBObject",
"newObj",
"=",
"new",
"DBObject",
"(",
")",
";",
"newObj",
".",
"m_valueMap",
".",
"putAll",
"(",
"m_valueMap",
")",
";",
"newObj",
".",
"setObjectID",
"(",
"objID",
")",
";"... | Make a copy of this object with the same updates and values but with a new object
ID.
@param objID Object IF of new object.
@return Copy of this object except for the object ID. | [
"Make",
"a",
"copy",
"of",
"this",
"object",
"with",
"the",
"same",
"updates",
"and",
"values",
"but",
"with",
"a",
"new",
"object",
"ID",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/DBObject.java#L131-L137 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/DBObject.java | DBObject.getFieldNames | public Set<String> getFieldNames() {
HashSet<String> result = new LinkedHashSet<>(m_valueMap.keySet());
return result;
} | java | public Set<String> getFieldNames() {
HashSet<String> result = new LinkedHashSet<>(m_valueMap.keySet());
return result;
} | [
"public",
"Set",
"<",
"String",
">",
"getFieldNames",
"(",
")",
"{",
"HashSet",
"<",
"String",
">",
"result",
"=",
"new",
"LinkedHashSet",
"<>",
"(",
"m_valueMap",
".",
"keySet",
"(",
")",
")",
";",
"return",
"result",
";",
"}"
] | Return the field names for which this DBObject has a value. The set does not
include fields that have "remove" values stored. The set is copied.
@return Field names for which this DBObject has a value. Empty if there are no
field values for this object.
@see #getUpdatedFieldNames() | [
"Return",
"the",
"field",
"names",
"for",
"which",
"this",
"DBObject",
"has",
"a",
"value",
".",
"The",
"set",
"does",
"not",
"include",
"fields",
"that",
"have",
"remove",
"values",
"stored",
".",
"The",
"set",
"is",
"copied",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/DBObject.java#L149-L152 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/DBObject.java | DBObject.getRemoveValues | public Set<String> getRemoveValues(String fieldName) {
Utils.require(!Utils.isEmpty(fieldName), "fieldName");
if (!m_valueRemoveMap.containsKey(fieldName)) {
return null;
}
return new HashSet<>(m_valueRemoveMap.get(fieldName));
} | java | public Set<String> getRemoveValues(String fieldName) {
Utils.require(!Utils.isEmpty(fieldName), "fieldName");
if (!m_valueRemoveMap.containsKey(fieldName)) {
return null;
}
return new HashSet<>(m_valueRemoveMap.get(fieldName));
} | [
"public",
"Set",
"<",
"String",
">",
"getRemoveValues",
"(",
"String",
"fieldName",
")",
"{",
"Utils",
".",
"require",
"(",
"!",
"Utils",
".",
"isEmpty",
"(",
"fieldName",
")",
",",
"\"fieldName\"",
")",
";",
"if",
"(",
"!",
"m_valueRemoveMap",
".",
"con... | Get all values marked for removal for the given field. The result will be null
if the given field has no values to remove. Otherwise, the set is copied.
@param fieldName Name of link field.
@return Set of all values to be removed for the given link field, or
null if there are none. | [
"Get",
"all",
"values",
"marked",
"for",
"removal",
"for",
"the",
"given",
"field",
".",
"The",
"result",
"will",
"be",
"null",
"if",
"the",
"given",
"field",
"has",
"no",
"values",
"to",
"remove",
".",
"Otherwise",
"the",
"set",
"is",
"copied",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/DBObject.java#L162-L168 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/DBObject.java | DBObject.getFieldValue | public String getFieldValue(String fieldName) {
Utils.require(!Utils.isEmpty(fieldName), "fieldName");
List<String> values = m_valueMap.get(fieldName);
if (values == null || values.size() == 0) {
return null;
}
Utils.require(values.size() == 1, "Field ... | java | public String getFieldValue(String fieldName) {
Utils.require(!Utils.isEmpty(fieldName), "fieldName");
List<String> values = m_valueMap.get(fieldName);
if (values == null || values.size() == 0) {
return null;
}
Utils.require(values.size() == 1, "Field ... | [
"public",
"String",
"getFieldValue",
"(",
"String",
"fieldName",
")",
"{",
"Utils",
".",
"require",
"(",
"!",
"Utils",
".",
"isEmpty",
"(",
"fieldName",
")",
",",
"\"fieldName\"",
")",
";",
"List",
"<",
"String",
">",
"values",
"=",
"m_valueMap",
".",
"g... | Get the single value of the field with the given name or null if no value is
assigned to the given field. This method is intended to be used for fields expected
to have a single value. An exception is thrown if it is called for a field with
multiple values.
@param fieldName Name of a field.
@return Value of f... | [
"Get",
"the",
"single",
"value",
"of",
"the",
"field",
"with",
"the",
"given",
"name",
"or",
"null",
"if",
"no",
"value",
"is",
"assigned",
"to",
"the",
"given",
"field",
".",
"This",
"method",
"is",
"intended",
"to",
"be",
"used",
"for",
"fields",
"ex... | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/DBObject.java#L241-L250 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/DBObject.java | DBObject.isDeleted | public boolean isDeleted() {
String value = getSystemField(_DELETED);
return value == null ? false : Boolean.parseBoolean(value);
} | java | public boolean isDeleted() {
String value = getSystemField(_DELETED);
return value == null ? false : Boolean.parseBoolean(value);
} | [
"public",
"boolean",
"isDeleted",
"(",
")",
"{",
"String",
"value",
"=",
"getSystemField",
"(",
"_DELETED",
")",
";",
"return",
"value",
"==",
"null",
"?",
"false",
":",
"Boolean",
".",
"parseBoolean",
"(",
"value",
")",
";",
"}"
] | Get this object's deleted flag, if set.
@return This DBObject's deleted flag, if set through {@link #setDeleted(boolean)}
or parsed from a UNode tree. | [
"Get",
"this",
"object",
"s",
"deleted",
"flag",
"if",
"set",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/DBObject.java#L272-L275 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/DBObject.java | DBObject.addFieldValue | public void addFieldValue(String fieldName, String value) {
Utils.require(!Utils.isEmpty(fieldName), "fieldName");
if (fieldName.charAt(0) == '_') {
setSystemField(fieldName, value);
} else {
List<String> currValues = m_valueMap.get(fieldName);
... | java | public void addFieldValue(String fieldName, String value) {
Utils.require(!Utils.isEmpty(fieldName), "fieldName");
if (fieldName.charAt(0) == '_') {
setSystemField(fieldName, value);
} else {
List<String> currValues = m_valueMap.get(fieldName);
... | [
"public",
"void",
"addFieldValue",
"(",
"String",
"fieldName",
",",
"String",
"value",
")",
"{",
"Utils",
".",
"require",
"(",
"!",
"Utils",
".",
"isEmpty",
"(",
"fieldName",
")",
",",
"\"fieldName\"",
")",
";",
"if",
"(",
"fieldName",
".",
"charAt",
"("... | Add the given value to the field with the given name. For a system field, its
existing value, if any, is replaced. If a null or empty field is added for an
SV scalar, the field is nullified.
@param fieldName Name of a field.
@param value Value to add to field. Ignored if null or empty. | [
"Add",
"the",
"given",
"value",
"to",
"the",
"field",
"with",
"the",
"given",
"name",
".",
"For",
"a",
"system",
"field",
"its",
"existing",
"value",
"if",
"any",
"is",
"replaced",
".",
"If",
"a",
"null",
"or",
"empty",
"field",
"is",
"added",
"for",
... | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/DBObject.java#L403-L416 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/DBObject.java | DBObject.clearValues | public void clearValues(String fieldName) {
Utils.require(!Utils.isEmpty(fieldName), "fieldName");
m_valueMap.remove(fieldName);
m_valueRemoveMap.remove(fieldName);
} | java | public void clearValues(String fieldName) {
Utils.require(!Utils.isEmpty(fieldName), "fieldName");
m_valueMap.remove(fieldName);
m_valueRemoveMap.remove(fieldName);
} | [
"public",
"void",
"clearValues",
"(",
"String",
"fieldName",
")",
"{",
"Utils",
".",
"require",
"(",
"!",
"Utils",
".",
"isEmpty",
"(",
"fieldName",
")",
",",
"\"fieldName\"",
")",
";",
"m_valueMap",
".",
"remove",
"(",
"fieldName",
")",
";",
"m_valueRemov... | Clear all values for the given field. Both "add" and "remove" values, if any, are
deleted.
@param fieldName Name of a field. | [
"Clear",
"all",
"values",
"for",
"the",
"given",
"field",
".",
"Both",
"add",
"and",
"remove",
"values",
"if",
"any",
"are",
"deleted",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/DBObject.java#L424-L428 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/DBObject.java | DBObject.parse | public DBObject parse(UNode docNode) {
Utils.require(docNode != null, "docNode");
Utils.require(docNode.getName().equals("doc"), "'doc' node expected: %s", docNode.getName());
for (String fieldName : docNode.getMemberNames()) {
UNode fieldValue = docNode.getMember(field... | java | public DBObject parse(UNode docNode) {
Utils.require(docNode != null, "docNode");
Utils.require(docNode.getName().equals("doc"), "'doc' node expected: %s", docNode.getName());
for (String fieldName : docNode.getMemberNames()) {
UNode fieldValue = docNode.getMember(field... | [
"public",
"DBObject",
"parse",
"(",
"UNode",
"docNode",
")",
"{",
"Utils",
".",
"require",
"(",
"docNode",
"!=",
"null",
",",
"\"docNode\"",
")",
";",
"Utils",
".",
"require",
"(",
"docNode",
".",
"getName",
"(",
")",
".",
"equals",
"(",
"\"doc\"",
")"... | Parse an object rooted at the given "doc" UNode. All values parsed are stored in
the object. An exception is thrown if the node structure is incorrect or a field
has an invalid value.
@param docNode Root node of a "doc" UNode structure.
@return This object. | [
"Parse",
"an",
"object",
"rooted",
"at",
"the",
"given",
"doc",
"UNode",
".",
"All",
"values",
"parsed",
"are",
"stored",
"in",
"the",
"object",
".",
"An",
"exception",
"is",
"thrown",
"if",
"the",
"node",
"structure",
"is",
"incorrect",
"or",
"a",
"fiel... | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/DBObject.java#L438-L447 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/DBObject.java | DBObject.removeFieldValues | public void removeFieldValues(String fieldName, Collection<String> values) {
Utils.require(!Utils.isEmpty(fieldName), "fieldName");
if (values != null && values.size() > 0) {
List<String> valueSet = m_valueRemoveMap.get(fieldName);
if (valueSet == null) {
val... | java | public void removeFieldValues(String fieldName, Collection<String> values) {
Utils.require(!Utils.isEmpty(fieldName), "fieldName");
if (values != null && values.size() > 0) {
List<String> valueSet = m_valueRemoveMap.get(fieldName);
if (valueSet == null) {
val... | [
"public",
"void",
"removeFieldValues",
"(",
"String",
"fieldName",
",",
"Collection",
"<",
"String",
">",
"values",
")",
"{",
"Utils",
".",
"require",
"(",
"!",
"Utils",
".",
"isEmpty",
"(",
"fieldName",
")",
",",
"\"fieldName\"",
")",
";",
"if",
"(",
"v... | Add "remove" values for the given field. This method should only be called for MV
scalar and link fields. When the updates in this DBObject are applied to the
database, the given set of values are removed for the object. An exception is
thrown if the field is not MV. If the given set of values is null or empty, this
me... | [
"Add",
"remove",
"values",
"for",
"the",
"given",
"field",
".",
"This",
"method",
"should",
"only",
"be",
"called",
"for",
"MV",
"scalar",
"and",
"link",
"fields",
".",
"When",
"the",
"updates",
"in",
"this",
"DBObject",
"are",
"applied",
"to",
"the",
"d... | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/DBObject.java#L459-L469 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/DBObject.java | DBObject.leafFieldtoDoc | private void leafFieldtoDoc(UNode parentNode, String fieldName) {
assert parentNode != null;
Set<String> addSet = null;
if (m_valueMap.containsKey(fieldName)) {
addSet = new TreeSet<String>(m_valueMap.get(fieldName));
}
List<String> removeSet = m_value... | java | private void leafFieldtoDoc(UNode parentNode, String fieldName) {
assert parentNode != null;
Set<String> addSet = null;
if (m_valueMap.containsKey(fieldName)) {
addSet = new TreeSet<String>(m_valueMap.get(fieldName));
}
List<String> removeSet = m_value... | [
"private",
"void",
"leafFieldtoDoc",
"(",
"UNode",
"parentNode",
",",
"String",
"fieldName",
")",
"{",
"assert",
"parentNode",
"!=",
"null",
";",
"Set",
"<",
"String",
">",
"addSet",
"=",
"null",
";",
"if",
"(",
"m_valueMap",
".",
"containsKey",
"(",
"fiel... | parent node. | [
"parent",
"node",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/DBObject.java#L515-L540 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/DBObject.java | DBObject.groupFieldtoDoc | private void groupFieldtoDoc(UNode parentNode,
FieldDefinition groupFieldDef,
Set<FieldDefinition> deferredFields) {
// Prerequisities:
assert parentNode != null;
assert groupFieldDef != null && groupField... | java | private void groupFieldtoDoc(UNode parentNode,
FieldDefinition groupFieldDef,
Set<FieldDefinition> deferredFields) {
// Prerequisities:
assert parentNode != null;
assert groupFieldDef != null && groupField... | [
"private",
"void",
"groupFieldtoDoc",
"(",
"UNode",
"parentNode",
",",
"FieldDefinition",
"groupFieldDef",
",",
"Set",
"<",
"FieldDefinition",
">",
"deferredFields",
")",
"{",
"// Prerequisities:\r",
"assert",
"parentNode",
"!=",
"null",
";",
"assert",
"groupFieldDef"... | given deferred-field map. Recurse is any child fields are also groups. | [
"given",
"deferred",
"-",
"field",
"map",
".",
"Recurse",
"is",
"any",
"child",
"fields",
"are",
"also",
"groups",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/DBObject.java#L545-L564 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/DBObject.java | DBObject.parseFieldUpdate | private void parseFieldUpdate(String fieldName, UNode valueNode) {
if (valueNode.isValue()) {
addFieldValue(fieldName, valueNode.getValue());
} else if (valueNode.childrenAreValues()) {
parseFieldAdd(fieldName, valueNode);
} else {
for (UNode childNode :... | java | private void parseFieldUpdate(String fieldName, UNode valueNode) {
if (valueNode.isValue()) {
addFieldValue(fieldName, valueNode.getValue());
} else if (valueNode.childrenAreValues()) {
parseFieldAdd(fieldName, valueNode);
} else {
for (UNode childNode :... | [
"private",
"void",
"parseFieldUpdate",
"(",
"String",
"fieldName",
",",
"UNode",
"valueNode",
")",
"{",
"if",
"(",
"valueNode",
".",
"isValue",
"(",
")",
")",
"{",
"addFieldValue",
"(",
"fieldName",
",",
"valueNode",
".",
"getValue",
"(",
")",
")",
";",
... | Parse update to outer or nested field. | [
"Parse",
"update",
"to",
"outer",
"or",
"nested",
"field",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/DBObject.java#L567-L585 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/DBObject.java | DBObject.getSystemField | private String getSystemField(String fieldName) {
List<String> values = m_valueMap.get(fieldName);
return values == null ? null : values.get(0);
} | java | private String getSystemField(String fieldName) {
List<String> values = m_valueMap.get(fieldName);
return values == null ? null : values.get(0);
} | [
"private",
"String",
"getSystemField",
"(",
"String",
"fieldName",
")",
"{",
"List",
"<",
"String",
">",
"values",
"=",
"m_valueMap",
".",
"get",
"(",
"fieldName",
")",
";",
"return",
"values",
"==",
"null",
"?",
"null",
":",
"values",
".",
"get",
"(",
... | Get the first value of the given field, or null if there is no value. | [
"Get",
"the",
"first",
"value",
"of",
"the",
"given",
"field",
"or",
"null",
"if",
"there",
"is",
"no",
"value",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/DBObject.java#L610-L613 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/AliasDefinition.java | AliasDefinition.parse | public void parse(UNode aliasNode) {
assert aliasNode != null;
// Ensure the alias name is valid and save it.
setName(aliasNode.getName());
// The only child element we expect is "expression".
for (String childName : aliasNode.getMemberNames()) {
... | java | public void parse(UNode aliasNode) {
assert aliasNode != null;
// Ensure the alias name is valid and save it.
setName(aliasNode.getName());
// The only child element we expect is "expression".
for (String childName : aliasNode.getMemberNames()) {
... | [
"public",
"void",
"parse",
"(",
"UNode",
"aliasNode",
")",
"{",
"assert",
"aliasNode",
"!=",
"null",
";",
"// Ensure the alias name is valid and save it.\r",
"setName",
"(",
"aliasNode",
".",
"getName",
"(",
")",
")",
";",
"// The only child element we expect is \"expre... | Parse the alias definition rooted at the given UNode, copying its properties into
this object.
@param aliasNode Root of an alias definition. | [
"Parse",
"the",
"alias",
"definition",
"rooted",
"at",
"the",
"given",
"UNode",
"copying",
"its",
"properties",
"into",
"this",
"object",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/AliasDefinition.java#L62-L83 | train |
QSFT/Doradus | doradus-common/src/main/java/com/dell/doradus/common/AliasDefinition.java | AliasDefinition.update | public void update(AliasDefinition newAliasDef) {
assert m_aliasName.equals(newAliasDef.m_aliasName);
assert m_tableName.equals(newAliasDef.m_tableName);
// Currently, all we have to do is copy over the "expression" property.
m_expression = newAliasDef.m_expression;
} | java | public void update(AliasDefinition newAliasDef) {
assert m_aliasName.equals(newAliasDef.m_aliasName);
assert m_tableName.equals(newAliasDef.m_tableName);
// Currently, all we have to do is copy over the "expression" property.
m_expression = newAliasDef.m_expression;
} | [
"public",
"void",
"update",
"(",
"AliasDefinition",
"newAliasDef",
")",
"{",
"assert",
"m_aliasName",
".",
"equals",
"(",
"newAliasDef",
".",
"m_aliasName",
")",
";",
"assert",
"m_tableName",
".",
"equals",
"(",
"newAliasDef",
".",
"m_tableName",
")",
";",
"//... | Update this alias definition to match the given updated one. The updated alias must
have the same name and table name.
@param newAliasDef Updated alias definition. | [
"Update",
"this",
"alias",
"definition",
"to",
"match",
"the",
"given",
"updated",
"one",
".",
"The",
"updated",
"alias",
"must",
"have",
"the",
"same",
"name",
"and",
"table",
"name",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/AliasDefinition.java#L134-L140 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/spider/IDFieldUpdater.java | IDFieldUpdater.addValuesForField | @Override
public void addValuesForField() {
String objID = m_dbObj.getObjectID();
assert !Utils.isEmpty(objID);
m_dbTran.addIDValueColumn(m_tableDef, objID);
m_dbTran.addAllObjectsColumn(m_tableDef, objID, m_tableDef.getShardNumber(m_dbObj));
} | java | @Override
public void addValuesForField() {
String objID = m_dbObj.getObjectID();
assert !Utils.isEmpty(objID);
m_dbTran.addIDValueColumn(m_tableDef, objID);
m_dbTran.addAllObjectsColumn(m_tableDef, objID, m_tableDef.getShardNumber(m_dbObj));
} | [
"@",
"Override",
"public",
"void",
"addValuesForField",
"(",
")",
"{",
"String",
"objID",
"=",
"m_dbObj",
".",
"getObjectID",
"(",
")",
";",
"assert",
"!",
"Utils",
".",
"isEmpty",
"(",
"objID",
")",
";",
"m_dbTran",
".",
"addIDValueColumn",
"(",
"m_tableD... | and the encoded object ID as the value. | [
"and",
"the",
"encoded",
"object",
"ID",
"as",
"the",
"value",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/IDFieldUpdater.java#L35-L41 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/spider/IDFieldUpdater.java | IDFieldUpdater.deleteValuesForField | @Override
public void deleteValuesForField() {
int shardNo = m_tableDef.getShardNumber(m_dbObj);
m_dbTran.deleteAllObjectsColumn(m_tableDef, m_dbObj.getObjectID(), shardNo);
} | java | @Override
public void deleteValuesForField() {
int shardNo = m_tableDef.getShardNumber(m_dbObj);
m_dbTran.deleteAllObjectsColumn(m_tableDef, m_dbObj.getObjectID(), shardNo);
} | [
"@",
"Override",
"public",
"void",
"deleteValuesForField",
"(",
")",
"{",
"int",
"shardNo",
"=",
"m_tableDef",
".",
"getShardNumber",
"(",
"m_dbObj",
")",
";",
"m_dbTran",
".",
"deleteAllObjectsColumn",
"(",
"m_tableDef",
",",
"m_dbObj",
".",
"getObjectID",
"(",... | Object is being deleted. Just delete column in "all objects" row. | [
"Object",
"is",
"being",
"deleted",
".",
"Just",
"delete",
"column",
"in",
"all",
"objects",
"row",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/IDFieldUpdater.java#L44-L48 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/spider/IDFieldUpdater.java | IDFieldUpdater.updateValuesForField | @Override
public boolean updateValuesForField(String currentValue) {
Utils.require(m_dbObj.getObjectID().equals(currentValue), "Object ID cannot be changed");
return false;
} | java | @Override
public boolean updateValuesForField(String currentValue) {
Utils.require(m_dbObj.getObjectID().equals(currentValue), "Object ID cannot be changed");
return false;
} | [
"@",
"Override",
"public",
"boolean",
"updateValuesForField",
"(",
"String",
"currentValue",
")",
"{",
"Utils",
".",
"require",
"(",
"m_dbObj",
".",
"getObjectID",
"(",
")",
".",
"equals",
"(",
"currentValue",
")",
",",
"\"Object ID cannot be changed\"",
")",
";... | Object is being updated, but _ID field cannot be changed. | [
"Object",
"is",
"being",
"updated",
"but",
"_ID",
"field",
"cannot",
"be",
"changed",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/IDFieldUpdater.java#L51-L55 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java | DoradusServer.findStorageService | public StorageService findStorageService(String serviceName) {
Utils.require(m_bInitialized, "DoradusService has not yet initialized");
for (StorageService service : m_storageServices) {
if (service.getClass().getSimpleName().equals(serviceName)) {
return service;
... | java | public StorageService findStorageService(String serviceName) {
Utils.require(m_bInitialized, "DoradusService has not yet initialized");
for (StorageService service : m_storageServices) {
if (service.getClass().getSimpleName().equals(serviceName)) {
return service;
... | [
"public",
"StorageService",
"findStorageService",
"(",
"String",
"serviceName",
")",
"{",
"Utils",
".",
"require",
"(",
"m_bInitialized",
",",
"\"DoradusService has not yet initialized\"",
")",
";",
"for",
"(",
"StorageService",
"service",
":",
"m_storageServices",
")",... | Find a registered storage service with the given name. If there is no storage
service with the registered name, null is returned. This method can only be called
after the DoradusServer has initialized.
@param serviceName Name of the storage service to find. This is the same as the
class's "simple" name. For example,... | [
"Find",
"a",
"registered",
"storage",
"service",
"with",
"the",
"given",
"name",
".",
"If",
"there",
"is",
"no",
"storage",
"service",
"with",
"the",
"registered",
"name",
"null",
"is",
"returned",
".",
"This",
"method",
"can",
"only",
"be",
"called",
"aft... | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L214-L222 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java | DoradusServer.getDoradusVersion | public static String getDoradusVersion() {
String version = null;
try {
//first read from the local git repository
Git git = Git.open(new File("../.git"));
String url = git.getRepository().getConfig().getString("remote", "origin", "url");
instanc... | java | public static String getDoradusVersion() {
String version = null;
try {
//first read from the local git repository
Git git = Git.open(new File("../.git"));
String url = git.getRepository().getConfig().getString("remote", "origin", "url");
instanc... | [
"public",
"static",
"String",
"getDoradusVersion",
"(",
")",
"{",
"String",
"version",
"=",
"null",
";",
"try",
"{",
"//first read from the local git repository\r",
"Git",
"git",
"=",
"Git",
".",
"open",
"(",
"new",
"File",
"(",
"\"../.git\"",
")",
")",
";",
... | Get Doradus Version from git repo if it exists; otherwise get it from the local doradus.ver file
@return version | [
"Get",
"Doradus",
"Version",
"from",
"git",
"repo",
"if",
"it",
"exists",
";",
"otherwise",
"get",
"it",
"from",
"the",
"local",
"doradus",
".",
"ver",
"file"
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L228-L254 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java | DoradusServer.writeVersionToVerFile | private static void writeVersionToVerFile(String version) throws IOException {
//declared in a try-with-resource statement, it will be closed regardless of it completes normally or not
try (PrintWriter writer = new PrintWriter(new File(DoradusServer.class.getResource("/" + VERSION_FILE).getPath()))... | java | private static void writeVersionToVerFile(String version) throws IOException {
//declared in a try-with-resource statement, it will be closed regardless of it completes normally or not
try (PrintWriter writer = new PrintWriter(new File(DoradusServer.class.getResource("/" + VERSION_FILE).getPath()))... | [
"private",
"static",
"void",
"writeVersionToVerFile",
"(",
"String",
"version",
")",
"throws",
"IOException",
"{",
"//declared in a try-with-resource statement, it will be closed regardless of it completes normally or not \r",
"try",
"(",
"PrintWriter",
"writer",
"=",
"new",
... | Write version to local file | [
"Write",
"version",
"to",
"local",
"file"
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L257-L263 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java | DoradusServer.getVersionFromVerFile | private static String getVersionFromVerFile() throws IOException {
//declared in a try-with-resource statement, it will be closed regardless of it completes normally or not
try (BufferedReader br = new BufferedReader(new InputStreamReader(DoradusServer.class.getResourceAsStream("/" + VERSION_FILE), "U... | java | private static String getVersionFromVerFile() throws IOException {
//declared in a try-with-resource statement, it will be closed regardless of it completes normally or not
try (BufferedReader br = new BufferedReader(new InputStreamReader(DoradusServer.class.getResourceAsStream("/" + VERSION_FILE), "U... | [
"private",
"static",
"String",
"getVersionFromVerFile",
"(",
")",
"throws",
"IOException",
"{",
"//declared in a try-with-resource statement, it will be closed regardless of it completes normally or not\r",
"try",
"(",
"BufferedReader",
"br",
"=",
"new",
"BufferedReader",
"(",
"n... | Get version from local file | [
"Get",
"version",
"from",
"local",
"file"
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L265-L271 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java | DoradusServer.addConfiguredStorageServices | private void addConfiguredStorageServices(Set<String> serviceSet) {
List<String> ssList = ServerParams.instance().getModuleParamList("DoradusServer", "storage_services");
if (ssList != null) {
serviceSet.addAll(ssList);
}
} | java | private void addConfiguredStorageServices(Set<String> serviceSet) {
List<String> ssList = ServerParams.instance().getModuleParamList("DoradusServer", "storage_services");
if (ssList != null) {
serviceSet.addAll(ssList);
}
} | [
"private",
"void",
"addConfiguredStorageServices",
"(",
"Set",
"<",
"String",
">",
"serviceSet",
")",
"{",
"List",
"<",
"String",
">",
"ssList",
"=",
"ServerParams",
".",
"instance",
"(",
")",
".",
"getModuleParamList",
"(",
"\"DoradusServer\"",
",",
"\"storage_... | Add configured storage_services to the given set. | [
"Add",
"configured",
"storage_services",
"to",
"the",
"given",
"set",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L279-L284 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java | DoradusServer.addDefaultServices | private void addDefaultServices(Set<String> serviceSet) {
List<String> defaultServices = ServerParams.instance().getModuleParamList("DoradusServer", "default_services");
if (defaultServices != null) {
serviceSet.addAll(defaultServices);
}
} | java | private void addDefaultServices(Set<String> serviceSet) {
List<String> defaultServices = ServerParams.instance().getModuleParamList("DoradusServer", "default_services");
if (defaultServices != null) {
serviceSet.addAll(defaultServices);
}
} | [
"private",
"void",
"addDefaultServices",
"(",
"Set",
"<",
"String",
">",
"serviceSet",
")",
"{",
"List",
"<",
"String",
">",
"defaultServices",
"=",
"ServerParams",
".",
"instance",
"(",
")",
".",
"getModuleParamList",
"(",
"\"DoradusServer\"",
",",
"\"default_s... | Add configured default_services to the given set. | [
"Add",
"configured",
"default_services",
"to",
"the",
"given",
"set",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L287-L292 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java | DoradusServer.initEmbedded | private void initEmbedded(String[] args, String[] services) {
if (m_bInitialized) {
m_logger.warn("initEmbedded: Already initialized -- ignoring");
return;
}
m_logger.info("Initializing embedded mode");
initConfig(args);
initEmbeddedServices(service... | java | private void initEmbedded(String[] args, String[] services) {
if (m_bInitialized) {
m_logger.warn("initEmbedded: Already initialized -- ignoring");
return;
}
m_logger.info("Initializing embedded mode");
initConfig(args);
initEmbeddedServices(service... | [
"private",
"void",
"initEmbedded",
"(",
"String",
"[",
"]",
"args",
",",
"String",
"[",
"]",
"services",
")",
"{",
"if",
"(",
"m_bInitialized",
")",
"{",
"m_logger",
".",
"warn",
"(",
"\"initEmbedded: Already initialized -- ignoring\"",
")",
";",
"return",
";"... | Initialize server configuration and given+required services for embedded running. | [
"Initialize",
"server",
"configuration",
"and",
"given",
"+",
"required",
"services",
"for",
"embedded",
"running",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L305-L315 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java | DoradusServer.initEmbeddedServices | private void initEmbeddedServices(String[] requestedServices) {
Set<String> serviceSet = new LinkedHashSet<>();
if (requestedServices != null) {
serviceSet.addAll(Arrays.asList(requestedServices));
}
addRequiredServices(serviceSet);
initServices(serviceSet);
... | java | private void initEmbeddedServices(String[] requestedServices) {
Set<String> serviceSet = new LinkedHashSet<>();
if (requestedServices != null) {
serviceSet.addAll(Arrays.asList(requestedServices));
}
addRequiredServices(serviceSet);
initServices(serviceSet);
... | [
"private",
"void",
"initEmbeddedServices",
"(",
"String",
"[",
"]",
"requestedServices",
")",
"{",
"Set",
"<",
"String",
">",
"serviceSet",
"=",
"new",
"LinkedHashSet",
"<>",
"(",
")",
";",
"if",
"(",
"requestedServices",
"!=",
"null",
")",
"{",
"serviceSet"... | Initialize services required for embedded start. | [
"Initialize",
"services",
"required",
"for",
"embedded",
"start",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L318-L325 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java | DoradusServer.initStandAlone | private void initStandAlone(String[] args) {
if (m_bInitialized) {
m_logger.warn("initStandAlone: Already initialized -- ignoring");
return;
}
m_logger.info("Initializing standalone mode");
initConfig(args);
initStandaAloneServices();
RESTS... | java | private void initStandAlone(String[] args) {
if (m_bInitialized) {
m_logger.warn("initStandAlone: Already initialized -- ignoring");
return;
}
m_logger.info("Initializing standalone mode");
initConfig(args);
initStandaAloneServices();
RESTS... | [
"private",
"void",
"initStandAlone",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"if",
"(",
"m_bInitialized",
")",
"{",
"m_logger",
".",
"warn",
"(",
"\"initStandAlone: Already initialized -- ignoring\"",
")",
";",
"return",
";",
"}",
"m_logger",
".",
"info",
"... | Initialize server configuration and all services for stand-alone running. | [
"Initialize",
"server",
"configuration",
"and",
"all",
"services",
"for",
"stand",
"-",
"alone",
"running",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L328-L338 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java | DoradusServer.initStandaAloneServices | private void initStandaAloneServices() {
Set<String> serviceSet = new LinkedHashSet<>();
addDefaultServices(serviceSet);
addRequiredServices(serviceSet);
addConfiguredStorageServices(serviceSet);
initServices(serviceSet);
} | java | private void initStandaAloneServices() {
Set<String> serviceSet = new LinkedHashSet<>();
addDefaultServices(serviceSet);
addRequiredServices(serviceSet);
addConfiguredStorageServices(serviceSet);
initServices(serviceSet);
} | [
"private",
"void",
"initStandaAloneServices",
"(",
")",
"{",
"Set",
"<",
"String",
">",
"serviceSet",
"=",
"new",
"LinkedHashSet",
"<>",
"(",
")",
";",
"addDefaultServices",
"(",
"serviceSet",
")",
";",
"addRequiredServices",
"(",
"serviceSet",
")",
";",
"addC... | Initialize services configured+needed for stand-alone operation. | [
"Initialize",
"services",
"configured",
"+",
"needed",
"for",
"stand",
"-",
"alone",
"operation",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L341-L347 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java | DoradusServer.initConfig | private void initConfig(String[] args) {
try {
ServerParams.load(args);
if (Utils.isEmpty(ServerParams.instance().getModuleParamString("DoradusServer", "super_user"))) {
m_logger.warn("'DoradusServer.super_user' parameter is not defined. " +
... | java | private void initConfig(String[] args) {
try {
ServerParams.load(args);
if (Utils.isEmpty(ServerParams.instance().getModuleParamString("DoradusServer", "super_user"))) {
m_logger.warn("'DoradusServer.super_user' parameter is not defined. " +
... | [
"private",
"void",
"initConfig",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"try",
"{",
"ServerParams",
".",
"load",
"(",
"args",
")",
";",
"if",
"(",
"Utils",
".",
"isEmpty",
"(",
"ServerParams",
".",
"instance",
"(",
")",
".",
"getModuleParamString",
... | Initialize the ServerParams module, which loads the doradus.yaml file. | [
"Initialize",
"the",
"ServerParams",
"module",
"which",
"loads",
"the",
"doradus",
".",
"yaml",
"file",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L350-L360 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java | DoradusServer.initServices | private void initServices(Set<String> serviceSet) {
for (String serviceName : serviceSet) {
Service service = initService(serviceName);
m_initializedServices.add(service);
if (service instanceof StorageService) {
m_storageServices.add((StorageService) ser... | java | private void initServices(Set<String> serviceSet) {
for (String serviceName : serviceSet) {
Service service = initService(serviceName);
m_initializedServices.add(service);
if (service instanceof StorageService) {
m_storageServices.add((StorageService) ser... | [
"private",
"void",
"initServices",
"(",
"Set",
"<",
"String",
">",
"serviceSet",
")",
"{",
"for",
"(",
"String",
"serviceName",
":",
"serviceSet",
")",
"{",
"Service",
"service",
"=",
"initService",
"(",
"serviceName",
")",
";",
"m_initializedServices",
".",
... | StorageService objects. Throw if a storage service is not requested. | [
"StorageService",
"objects",
".",
"Throw",
"if",
"a",
"storage",
"service",
"is",
"not",
"requested",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L364-L375 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java | DoradusServer.initService | private Service initService(String serviceName) {
m_logger.debug("Initializing service: " + serviceName);
try {
@SuppressWarnings("unchecked")
Class<Service> serviceClass = (Class<Service>) Class.forName(serviceName);
Method instanceMethod = serviceClass.getMetho... | java | private Service initService(String serviceName) {
m_logger.debug("Initializing service: " + serviceName);
try {
@SuppressWarnings("unchecked")
Class<Service> serviceClass = (Class<Service>) Class.forName(serviceName);
Method instanceMethod = serviceClass.getMetho... | [
"private",
"Service",
"initService",
"(",
"String",
"serviceName",
")",
"{",
"m_logger",
".",
"debug",
"(",
"\"Initializing service: \"",
"+",
"serviceName",
")",
";",
"try",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"Class",
"<",
"Service",
">",
... | Initialize the service with the given package name. | [
"Initialize",
"the",
"service",
"with",
"the",
"given",
"package",
"name",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L378-L390 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java | DoradusServer.start | private void start() {
if (m_bRunning) {
m_logger.warn("start: Already started -- ignoring");
return;
}
Locale.setDefault(Locale.ROOT);
m_logger.info("Doradus Version: {}", getDoradusVersion());
hookShutdownEvent();
startServices();
... | java | private void start() {
if (m_bRunning) {
m_logger.warn("start: Already started -- ignoring");
return;
}
Locale.setDefault(Locale.ROOT);
m_logger.info("Doradus Version: {}", getDoradusVersion());
hookShutdownEvent();
startServices();
... | [
"private",
"void",
"start",
"(",
")",
"{",
"if",
"(",
"m_bRunning",
")",
"{",
"m_logger",
".",
"warn",
"(",
"\"start: Already started -- ignoring\"",
")",
";",
"return",
";",
"}",
"Locale",
".",
"setDefault",
"(",
"Locale",
".",
"ROOT",
")",
";",
"m_logger... | Start the DoradusServer services. | [
"Start",
"the",
"DoradusServer",
"services",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L398-L408 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java | DoradusServer.startServices | private void startServices() {
m_logger.info("Starting services: {}", simpleServiceNames(m_initializedServices));
for (Service service : m_initializedServices) {
m_logger.debug("Starting service: " + service.getClass().getSimpleName());
service.start();
m_started... | java | private void startServices() {
m_logger.info("Starting services: {}", simpleServiceNames(m_initializedServices));
for (Service service : m_initializedServices) {
m_logger.debug("Starting service: " + service.getClass().getSimpleName());
service.start();
m_started... | [
"private",
"void",
"startServices",
"(",
")",
"{",
"m_logger",
".",
"info",
"(",
"\"Starting services: {}\"",
",",
"simpleServiceNames",
"(",
"m_initializedServices",
")",
")",
";",
"for",
"(",
"Service",
"service",
":",
"m_initializedServices",
")",
"{",
"m_logge... | Start all registered services. | [
"Start",
"all",
"registered",
"services",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L411-L418 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java | DoradusServer.simpleServiceNames | private String simpleServiceNames(Collection<Service> services) {
StringBuilder buffer = new StringBuilder();
for (Service service : services) {
if (buffer.length() > 0) {
buffer.append(",");
}
buffer.append(service.getClass().getSimpleName());
... | java | private String simpleServiceNames(Collection<Service> services) {
StringBuilder buffer = new StringBuilder();
for (Service service : services) {
if (buffer.length() > 0) {
buffer.append(",");
}
buffer.append(service.getClass().getSimpleName());
... | [
"private",
"String",
"simpleServiceNames",
"(",
"Collection",
"<",
"Service",
">",
"services",
")",
"{",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"Service",
"service",
":",
"services",
")",
"{",
"if",
"(",
"buffer",
... | Get simple service names as a comma-separated list. | [
"Get",
"simple",
"service",
"names",
"as",
"a",
"comma",
"-",
"separated",
"list",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L421-L430 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java | DoradusServer.stopServices | private void stopServices() {
// Stop services in reverse order of starting.
m_logger.debug("Stopping all services");
ListIterator<Service> iter = m_startedServices.listIterator(m_startedServices.size());
while (iter.hasPrevious()) {
Service service = iter.previous();
... | java | private void stopServices() {
// Stop services in reverse order of starting.
m_logger.debug("Stopping all services");
ListIterator<Service> iter = m_startedServices.listIterator(m_startedServices.size());
while (iter.hasPrevious()) {
Service service = iter.previous();
... | [
"private",
"void",
"stopServices",
"(",
")",
"{",
"// Stop services in reverse order of starting.\r",
"m_logger",
".",
"debug",
"(",
"\"Stopping all services\"",
")",
";",
"ListIterator",
"<",
"Service",
">",
"iter",
"=",
"m_startedServices",
".",
"listIterator",
"(",
... | Stop all registered services. | [
"Stop",
"all",
"registered",
"services",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L433-L445 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java | DoradusServer.stop | private void stop() {
if (m_bRunning) {
instance().m_logger.info("Doradus Server shutting down");
stopServices();
ServerParams.unload();
m_bRunning = false;
m_bInitialized = false;
}
} | java | private void stop() {
if (m_bRunning) {
instance().m_logger.info("Doradus Server shutting down");
stopServices();
ServerParams.unload();
m_bRunning = false;
m_bInitialized = false;
}
} | [
"private",
"void",
"stop",
"(",
")",
"{",
"if",
"(",
"m_bRunning",
")",
"{",
"instance",
"(",
")",
".",
"m_logger",
".",
"info",
"(",
"\"Doradus Server shutting down\"",
")",
";",
"stopServices",
"(",
")",
";",
"ServerParams",
".",
"unload",
"(",
")",
";... | Shutdown all services and terminate. | [
"Shutdown",
"all",
"services",
"and",
"terminate",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L448-L456 | train |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/spider/FieldUpdater.java | FieldUpdater.createFieldUpdater | public static FieldUpdater createFieldUpdater(ObjectUpdater objUpdater, DBObject dbObj, String fieldName) {
if (fieldName.charAt(0) == '_') {
if (fieldName.equals(CommonDefs.ID_FIELD)) {
return new IDFieldUpdater(objUpdater, dbObj);
} else {
// Allow ... | java | public static FieldUpdater createFieldUpdater(ObjectUpdater objUpdater, DBObject dbObj, String fieldName) {
if (fieldName.charAt(0) == '_') {
if (fieldName.equals(CommonDefs.ID_FIELD)) {
return new IDFieldUpdater(objUpdater, dbObj);
} else {
// Allow ... | [
"public",
"static",
"FieldUpdater",
"createFieldUpdater",
"(",
"ObjectUpdater",
"objUpdater",
",",
"DBObject",
"dbObj",
",",
"String",
"fieldName",
")",
"{",
"if",
"(",
"fieldName",
".",
"charAt",
"(",
"0",
")",
"==",
"'",
"'",
")",
"{",
"if",
"(",
"fieldN... | Create a FieldUpdater that will handle updates for the given object and field.
@param tableDef {@link TableDefinition} of table in which object resides.
@param dbObj {@link DBObject} of object being added, updated, or deleted.
@param fieldName Name of field the new FieldUpdater will handle. Can be the... | [
"Create",
"a",
"FieldUpdater",
"that",
"will",
"handle",
"updates",
"for",
"the",
"given",
"object",
"and",
"field",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/FieldUpdater.java#L54-L70 | train |
QSFT/Doradus | doradus-client/src/main/java/com/dell/doradus/client/SpiderSession.java | SpiderSession.getObject | public DBObject getObject(String tableName, String objectID) {
Utils.require(!Utils.isEmpty(tableName), "tableName");
Utils.require(!Utils.isEmpty(objectID), "objectID");
TableDefinition tableDef = m_appDef.getTableDef(tableName);
Utils.require(tableDef != null,
... | java | public DBObject getObject(String tableName, String objectID) {
Utils.require(!Utils.isEmpty(tableName), "tableName");
Utils.require(!Utils.isEmpty(objectID), "objectID");
TableDefinition tableDef = m_appDef.getTableDef(tableName);
Utils.require(tableDef != null,
... | [
"public",
"DBObject",
"getObject",
"(",
"String",
"tableName",
",",
"String",
"objectID",
")",
"{",
"Utils",
".",
"require",
"(",
"!",
"Utils",
".",
"isEmpty",
"(",
"tableName",
")",
",",
"\"tableName\"",
")",
";",
"Utils",
".",
"require",
"(",
"!",
"Uti... | Get the object with the given ID from the given table. Null is returned if there is
no such object.
@param tableName Name of table to get object from. It must belong to this
session's application.
@param objectID Object's ID.
@return {@link DBObject} containing all of the object's scalar and link... | [
"Get",
"the",
"object",
"with",
"the",
"given",
"ID",
"from",
"the",
"given",
"table",
".",
"Null",
"is",
"returned",
"if",
"there",
"is",
"no",
"such",
"object",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/SpiderSession.java#L349-L376 | train |
QSFT/Doradus | doradus-client/src/main/java/com/dell/doradus/client/SpiderSession.java | SpiderSession.createBatchResult | private BatchResult createBatchResult(RESTResponse response, DBObjectBatch dbObjBatch) {
// See what kind of message payload, if any, we received.
BatchResult result = null;
if (response.getCode().isError()) {
String errMsg = response.getBody();
if (errMsg.length() =... | java | private BatchResult createBatchResult(RESTResponse response, DBObjectBatch dbObjBatch) {
// See what kind of message payload, if any, we received.
BatchResult result = null;
if (response.getCode().isError()) {
String errMsg = response.getBody();
if (errMsg.length() =... | [
"private",
"BatchResult",
"createBatchResult",
"(",
"RESTResponse",
"response",
",",
"DBObjectBatch",
"dbObjBatch",
")",
"{",
"// See what kind of message payload, if any, we received.\r",
"BatchResult",
"result",
"=",
"null",
";",
"if",
"(",
"response",
".",
"getCode",
"... | Extract the BatchResult from the given RESTResponse. Could be an error. | [
"Extract",
"the",
"BatchResult",
"from",
"the",
"given",
"RESTResponse",
".",
"Could",
"be",
"an",
"error",
"."
] | ad64d3c37922eefda68ec8869ef089c1ca604b70 | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/SpiderSession.java#L534-L548 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.