id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
25,700 | apache/incubator-gobblin | gobblin-core/src/main/java/org/apache/gobblin/converter/csv/CsvToJsonConverter.java | CsvToJsonConverter.convertRecord | @Override
public Iterable<JsonObject> convertRecord(JsonArray outputSchema, String inputRecord, WorkUnitState workUnit)
throws DataConversionException {
try {
String strDelimiter = workUnit.getProp(ConfigurationKeys.CONVERTER_CSV_TO_JSON_DELIMITER);
if (Strings.isNullOrEmpty(strDelimiter)) {
... | java | @Override
public Iterable<JsonObject> convertRecord(JsonArray outputSchema, String inputRecord, WorkUnitState workUnit)
throws DataConversionException {
try {
String strDelimiter = workUnit.getProp(ConfigurationKeys.CONVERTER_CSV_TO_JSON_DELIMITER);
if (Strings.isNullOrEmpty(strDelimiter)) {
... | [
"@",
"Override",
"public",
"Iterable",
"<",
"JsonObject",
">",
"convertRecord",
"(",
"JsonArray",
"outputSchema",
",",
"String",
"inputRecord",
",",
"WorkUnitState",
"workUnit",
")",
"throws",
"DataConversionException",
"{",
"try",
"{",
"String",
"strDelimiter",
"="... | Takes in a record with format String and splits the data based on SOURCE_SCHEMA_DELIMITER
Uses the inputSchema and the split record to convert the record to a JsonObject
@return a JsonObject representing the record
@throws DataConversionException | [
"Takes",
"in",
"a",
"record",
"with",
"format",
"String",
"and",
"splits",
"the",
"data",
"based",
"on",
"SOURCE_SCHEMA_DELIMITER",
"Uses",
"the",
"inputSchema",
"and",
"the",
"split",
"record",
"to",
"convert",
"the",
"record",
"to",
"a",
"JsonObject"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/converter/csv/CsvToJsonConverter.java#L60-L92 |
25,701 | apache/incubator-gobblin | gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/HiveRegistrationUnitComparator.java | HiveRegistrationUnitComparator.compareAll | @SuppressWarnings("unchecked")
public T compareAll() {
this.compareInputFormat().compareOutputFormat().compareIsCompressed().compareIsStoredAsSubDirs().compareNumBuckets()
.compareBucketCols().compareRawLocation().compareParameters();
return (T) this;
} | java | @SuppressWarnings("unchecked")
public T compareAll() {
this.compareInputFormat().compareOutputFormat().compareIsCompressed().compareIsStoredAsSubDirs().compareNumBuckets()
.compareBucketCols().compareRawLocation().compareParameters();
return (T) this;
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"T",
"compareAll",
"(",
")",
"{",
"this",
".",
"compareInputFormat",
"(",
")",
".",
"compareOutputFormat",
"(",
")",
".",
"compareIsCompressed",
"(",
")",
".",
"compareIsStoredAsSubDirs",
"(",
")",
... | Compare all parameters. | [
"Compare",
"all",
"parameters",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/HiveRegistrationUnitComparator.java#L158-L163 |
25,702 | apache/incubator-gobblin | gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/Counters.java | Counters.inc | public void inc(E e, long n) {
if (counters != null && counters.containsKey(e)) {
counters.get(e).inc(n);
}
} | java | public void inc(E e, long n) {
if (counters != null && counters.containsKey(e)) {
counters.get(e).inc(n);
}
} | [
"public",
"void",
"inc",
"(",
"E",
"e",
",",
"long",
"n",
")",
"{",
"if",
"(",
"counters",
"!=",
"null",
"&&",
"counters",
".",
"containsKey",
"(",
"e",
")",
")",
"{",
"counters",
".",
"get",
"(",
"e",
")",
".",
"inc",
"(",
"n",
")",
";",
"}"... | Increment the counter associated with enum value passed.
@param e Counter to increment.
@param n the value to increment | [
"Increment",
"the",
"counter",
"associated",
"with",
"enum",
"value",
"passed",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/Counters.java#L62-L66 |
25,703 | apache/incubator-gobblin | gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/Counters.java | Counters.getCount | public long getCount(E e) {
if (counters.containsKey(e)) {
return counters.get(e).getCount();
} else {
return 0l;
}
} | java | public long getCount(E e) {
if (counters.containsKey(e)) {
return counters.get(e).getCount();
} else {
return 0l;
}
} | [
"public",
"long",
"getCount",
"(",
"E",
"e",
")",
"{",
"if",
"(",
"counters",
".",
"containsKey",
"(",
"e",
")",
")",
"{",
"return",
"counters",
".",
"get",
"(",
"e",
")",
".",
"getCount",
"(",
")",
";",
"}",
"else",
"{",
"return",
"0l",
";",
"... | Get count for counter associated with enum value passed.
@param e Counter to query.
@return the count for this counter. | [
"Get",
"count",
"for",
"counter",
"associated",
"with",
"enum",
"value",
"passed",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/Counters.java#L73-L79 |
25,704 | apache/incubator-gobblin | gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/HiveRegister.java | HiveRegister.addOrAlterPartition | public void addOrAlterPartition(HiveTable table, HivePartition partition) throws IOException {
if (!addPartitionIfNotExists(table, partition)) {
alterPartition(table, partition);
}
} | java | public void addOrAlterPartition(HiveTable table, HivePartition partition) throws IOException {
if (!addPartitionIfNotExists(table, partition)) {
alterPartition(table, partition);
}
} | [
"public",
"void",
"addOrAlterPartition",
"(",
"HiveTable",
"table",
",",
"HivePartition",
"partition",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"addPartitionIfNotExists",
"(",
"table",
",",
"partition",
")",
")",
"{",
"alterPartition",
"(",
"table",
",... | Add a partition to a table if not exists, or alter a partition if exists.
@param table the {@link HiveTable} to which the partition belongs.
@param partition a {@link HivePartition} to which the existing partition should be updated.
@throws IOException | [
"Add",
"a",
"partition",
"to",
"a",
"table",
"if",
"not",
"exists",
"or",
"alter",
"a",
"partition",
"if",
"exists",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/HiveRegister.java#L285-L289 |
25,705 | apache/incubator-gobblin | gobblin-core/src/main/java/org/apache/gobblin/source/extractor/hadoop/AvroFileExtractor.java | AvroFileExtractor.getSchema | @Override
public Schema getSchema() {
if (this.workUnit.contains(ConfigurationKeys.SOURCE_SCHEMA)) {
return new Schema.Parser().parse(this.workUnit.getProp(ConfigurationKeys.SOURCE_SCHEMA));
}
AvroFsHelper hfsHelper = (AvroFsHelper) this.fsHelper;
if (this.filesToPull.isEmpty()) {
return ... | java | @Override
public Schema getSchema() {
if (this.workUnit.contains(ConfigurationKeys.SOURCE_SCHEMA)) {
return new Schema.Parser().parse(this.workUnit.getProp(ConfigurationKeys.SOURCE_SCHEMA));
}
AvroFsHelper hfsHelper = (AvroFsHelper) this.fsHelper;
if (this.filesToPull.isEmpty()) {
return ... | [
"@",
"Override",
"public",
"Schema",
"getSchema",
"(",
")",
"{",
"if",
"(",
"this",
".",
"workUnit",
".",
"contains",
"(",
"ConfigurationKeys",
".",
"SOURCE_SCHEMA",
")",
")",
"{",
"return",
"new",
"Schema",
".",
"Parser",
"(",
")",
".",
"parse",
"(",
... | Assumption is that all files in the input directory have the same schema | [
"Assumption",
"is",
"that",
"all",
"files",
"in",
"the",
"input",
"directory",
"have",
"the",
"same",
"schema"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/source/extractor/hadoop/AvroFileExtractor.java#L56-L72 |
25,706 | apache/incubator-gobblin | gobblin-compaction/src/main/java/org/apache/gobblin/compaction/verify/CompactionTimeRangeVerifier.java | CompactionTimeRangeVerifier.getMachedLookbackTime | public static String getMachedLookbackTime (String datasetName, String datasetsAndLookBacks, String sysDefaultLookback) {
String defaultLookback = sysDefaultLookback;
for (String entry : Splitter.on(";").trimResults()
.omitEmptyStrings().splitToList(datasetsAndLookBacks)) {
List<String> datasetAn... | java | public static String getMachedLookbackTime (String datasetName, String datasetsAndLookBacks, String sysDefaultLookback) {
String defaultLookback = sysDefaultLookback;
for (String entry : Splitter.on(";").trimResults()
.omitEmptyStrings().splitToList(datasetsAndLookBacks)) {
List<String> datasetAn... | [
"public",
"static",
"String",
"getMachedLookbackTime",
"(",
"String",
"datasetName",
",",
"String",
"datasetsAndLookBacks",
",",
"String",
"sysDefaultLookback",
")",
"{",
"String",
"defaultLookback",
"=",
"sysDefaultLookback",
";",
"for",
"(",
"String",
"entry",
":",
... | Find the correct lookback time for a given dataset.
@param datasetsAndLookBacks Lookback string for multiple datasets. Datasets is represented by Regex pattern.
Multiple 'datasets and lookback' pairs were joined by semi-colon. A default
lookback time can be given without any Regex prefix. If nothing found, we will use... | [
"Find",
"the",
"correct",
"lookback",
"time",
"for",
"a",
"given",
"dataset",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-compaction/src/main/java/org/apache/gobblin/compaction/verify/CompactionTimeRangeVerifier.java#L112-L130 |
25,707 | apache/incubator-gobblin | gobblin-service/src/main/java/org/apache/gobblin/service/modules/template_catalog/FSFlowTemplateCatalog.java | FSFlowTemplateCatalog.validateTemplateURI | private boolean validateTemplateURI(URI flowURI) {
if (!this.sysConfig.hasPath(ServiceConfigKeys.TEMPLATE_CATALOGS_FULLY_QUALIFIED_PATH_KEY)) {
log.error("Missing config " + ServiceConfigKeys.TEMPLATE_CATALOGS_FULLY_QUALIFIED_PATH_KEY);
return false;
}
if (!flowURI.getScheme().equals(FS_SCHEME))... | java | private boolean validateTemplateURI(URI flowURI) {
if (!this.sysConfig.hasPath(ServiceConfigKeys.TEMPLATE_CATALOGS_FULLY_QUALIFIED_PATH_KEY)) {
log.error("Missing config " + ServiceConfigKeys.TEMPLATE_CATALOGS_FULLY_QUALIFIED_PATH_KEY);
return false;
}
if (!flowURI.getScheme().equals(FS_SCHEME))... | [
"private",
"boolean",
"validateTemplateURI",
"(",
"URI",
"flowURI",
")",
"{",
"if",
"(",
"!",
"this",
".",
"sysConfig",
".",
"hasPath",
"(",
"ServiceConfigKeys",
".",
"TEMPLATE_CATALOGS_FULLY_QUALIFIED_PATH_KEY",
")",
")",
"{",
"log",
".",
"error",
"(",
"\"Missi... | Determine if an URI of a jobTemplate or a FlowTemplate is valid.
@param flowURI The given job/flow template
@return true if the URI is valid. | [
"Determine",
"if",
"an",
"URI",
"of",
"a",
"jobTemplate",
"or",
"a",
"FlowTemplate",
"is",
"valid",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-service/src/main/java/org/apache/gobblin/service/modules/template_catalog/FSFlowTemplateCatalog.java#L176-L188 |
25,708 | apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/materializer/HiveMaterializerFromEntityQueryGenerator.java | HiveMaterializerFromEntityQueryGenerator.generatePublishQueries | public QueryBasedHivePublishEntity generatePublishQueries() throws DataConversionException {
QueryBasedHivePublishEntity publishEntity = new QueryBasedHivePublishEntity();
List<String> publishQueries = publishEntity.getPublishQueries();
Map<String, String> publishDirectories = publishEntity.getPublishDirec... | java | public QueryBasedHivePublishEntity generatePublishQueries() throws DataConversionException {
QueryBasedHivePublishEntity publishEntity = new QueryBasedHivePublishEntity();
List<String> publishQueries = publishEntity.getPublishQueries();
Map<String, String> publishDirectories = publishEntity.getPublishDirec... | [
"public",
"QueryBasedHivePublishEntity",
"generatePublishQueries",
"(",
")",
"throws",
"DataConversionException",
"{",
"QueryBasedHivePublishEntity",
"publishEntity",
"=",
"new",
"QueryBasedHivePublishEntity",
"(",
")",
";",
"List",
"<",
"String",
">",
"publishQueries",
"="... | Returns a QueryBasedHivePublishEntity which includes publish level queries and cleanup commands.
@return QueryBasedHivePublishEntity
@throws DataConversionException | [
"Returns",
"a",
"QueryBasedHivePublishEntity",
"which",
"includes",
"publish",
"level",
"queries",
"and",
"cleanup",
"commands",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/materializer/HiveMaterializerFromEntityQueryGenerator.java#L114-L175 |
25,709 | apache/incubator-gobblin | gobblin-modules/gobblin-http/src/main/java/org/apache/gobblin/http/ApacheHttpRequestBuilder.java | ApacheHttpRequestBuilder.buildWriteRequest | private ApacheHttpRequest<GenericRecord> buildWriteRequest(BufferedRecord<GenericRecord> record) {
if (record == null) {
return null;
}
ApacheHttpRequest<GenericRecord> request = new ApacheHttpRequest<>();
HttpOperation httpOperation = HttpUtils.toHttpOperation(record.getRecord());
// Set ur... | java | private ApacheHttpRequest<GenericRecord> buildWriteRequest(BufferedRecord<GenericRecord> record) {
if (record == null) {
return null;
}
ApacheHttpRequest<GenericRecord> request = new ApacheHttpRequest<>();
HttpOperation httpOperation = HttpUtils.toHttpOperation(record.getRecord());
// Set ur... | [
"private",
"ApacheHttpRequest",
"<",
"GenericRecord",
">",
"buildWriteRequest",
"(",
"BufferedRecord",
"<",
"GenericRecord",
">",
"record",
")",
"{",
"if",
"(",
"record",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"ApacheHttpRequest",
"<",
"GenericRecor... | Build a write request from a single record | [
"Build",
"a",
"write",
"request",
"from",
"a",
"single",
"record"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-http/src/main/java/org/apache/gobblin/http/ApacheHttpRequestBuilder.java#L68-L102 |
25,710 | apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/runtime/embedded/EmbeddedGobblinDistcp.java | EmbeddedGobblinDistcp.update | @CliObjectOption(description = "Specifies files should be updated if they're different in the source.")
public EmbeddedGobblinDistcp update() {
this.setConfiguration(RecursiveCopyableDataset.UPDATE_KEY, Boolean.toString(true));
return this;
} | java | @CliObjectOption(description = "Specifies files should be updated if they're different in the source.")
public EmbeddedGobblinDistcp update() {
this.setConfiguration(RecursiveCopyableDataset.UPDATE_KEY, Boolean.toString(true));
return this;
} | [
"@",
"CliObjectOption",
"(",
"description",
"=",
"\"Specifies files should be updated if they're different in the source.\"",
")",
"public",
"EmbeddedGobblinDistcp",
"update",
"(",
")",
"{",
"this",
".",
"setConfiguration",
"(",
"RecursiveCopyableDataset",
".",
"UPDATE_KEY",
... | Specifies that files in the target should be updated if they have changed in the source. Equivalent to -update
option in Hadoop distcp. | [
"Specifies",
"that",
"files",
"in",
"the",
"target",
"should",
"be",
"updated",
"if",
"they",
"have",
"changed",
"in",
"the",
"source",
".",
"Equivalent",
"to",
"-",
"update",
"option",
"in",
"Hadoop",
"distcp",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/runtime/embedded/EmbeddedGobblinDistcp.java#L92-L96 |
25,711 | apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/runtime/embedded/EmbeddedGobblinDistcp.java | EmbeddedGobblinDistcp.delete | @CliObjectOption(description = "Delete files in target that don't exist on source.")
public EmbeddedGobblinDistcp delete() {
this.setConfiguration(RecursiveCopyableDataset.DELETE_KEY, Boolean.toString(true));
return this;
} | java | @CliObjectOption(description = "Delete files in target that don't exist on source.")
public EmbeddedGobblinDistcp delete() {
this.setConfiguration(RecursiveCopyableDataset.DELETE_KEY, Boolean.toString(true));
return this;
} | [
"@",
"CliObjectOption",
"(",
"description",
"=",
"\"Delete files in target that don't exist on source.\"",
")",
"public",
"EmbeddedGobblinDistcp",
"delete",
"(",
")",
"{",
"this",
".",
"setConfiguration",
"(",
"RecursiveCopyableDataset",
".",
"DELETE_KEY",
",",
"Boolean",
... | Specifies that files in the target that don't exist in the source should be deleted. Equivalent to -delete
option in Hadoop distcp. | [
"Specifies",
"that",
"files",
"in",
"the",
"target",
"that",
"don",
"t",
"exist",
"in",
"the",
"source",
"should",
"be",
"deleted",
".",
"Equivalent",
"to",
"-",
"delete",
"option",
"in",
"Hadoop",
"distcp",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/runtime/embedded/EmbeddedGobblinDistcp.java#L102-L106 |
25,712 | apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/runtime/embedded/EmbeddedGobblinDistcp.java | EmbeddedGobblinDistcp.setTemplate | @Override
@NotOnCli
public EmbeddedGobblin setTemplate(String templateURI)
throws URISyntaxException, SpecNotFoundException, JobTemplate.TemplateException {
return super.setTemplate(templateURI);
} | java | @Override
@NotOnCli
public EmbeddedGobblin setTemplate(String templateURI)
throws URISyntaxException, SpecNotFoundException, JobTemplate.TemplateException {
return super.setTemplate(templateURI);
} | [
"@",
"Override",
"@",
"NotOnCli",
"public",
"EmbeddedGobblin",
"setTemplate",
"(",
"String",
"templateURI",
")",
"throws",
"URISyntaxException",
",",
"SpecNotFoundException",
",",
"JobTemplate",
".",
"TemplateException",
"{",
"return",
"super",
".",
"setTemplate",
"("... | Remove template from CLI | [
"Remove",
"template",
"from",
"CLI"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/runtime/embedded/EmbeddedGobblinDistcp.java#L126-L131 |
25,713 | apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveTask.java | HiveTask.addFile | public static void addFile(State state, String file) {
state.setProp(ADD_FILES, state.getProp(ADD_FILES, "") + "," + file);
} | java | public static void addFile(State state, String file) {
state.setProp(ADD_FILES, state.getProp(ADD_FILES, "") + "," + file);
} | [
"public",
"static",
"void",
"addFile",
"(",
"State",
"state",
",",
"String",
"file",
")",
"{",
"state",
".",
"setProp",
"(",
"ADD_FILES",
",",
"state",
".",
"getProp",
"(",
"ADD_FILES",
",",
"\"\"",
")",
"+",
"\",\"",
"+",
"file",
")",
";",
"}"
] | Add the input file to the Hive session before running the task. | [
"Add",
"the",
"input",
"file",
"to",
"the",
"Hive",
"session",
"before",
"running",
"the",
"task",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveTask.java#L73-L75 |
25,714 | apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveTask.java | HiveTask.addJar | public static void addJar(State state, String jar) {
state.setProp(ADD_JARS, state.getProp(ADD_JARS, "") + "," + jar);
} | java | public static void addJar(State state, String jar) {
state.setProp(ADD_JARS, state.getProp(ADD_JARS, "") + "," + jar);
} | [
"public",
"static",
"void",
"addJar",
"(",
"State",
"state",
",",
"String",
"jar",
")",
"{",
"state",
".",
"setProp",
"(",
"ADD_JARS",
",",
"state",
".",
"getProp",
"(",
"ADD_JARS",
",",
"\"\"",
")",
"+",
"\",\"",
"+",
"jar",
")",
";",
"}"
] | Add the input jar to the Hive session before running the task. | [
"Add",
"the",
"input",
"jar",
"to",
"the",
"Hive",
"session",
"before",
"running",
"the",
"task",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveTask.java#L80-L82 |
25,715 | apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveTask.java | HiveTask.addSetupQuery | public static void addSetupQuery(State state, String query) {
state.setProp(SETUP_QUERIES, state.getProp(SETUP_QUERIES, "") + ";" + query);
} | java | public static void addSetupQuery(State state, String query) {
state.setProp(SETUP_QUERIES, state.getProp(SETUP_QUERIES, "") + ";" + query);
} | [
"public",
"static",
"void",
"addSetupQuery",
"(",
"State",
"state",
",",
"String",
"query",
")",
"{",
"state",
".",
"setProp",
"(",
"SETUP_QUERIES",
",",
"state",
".",
"getProp",
"(",
"SETUP_QUERIES",
",",
"\"\"",
")",
"+",
"\";\"",
"+",
"query",
")",
";... | Run the specified setup query on the Hive session before running the task. | [
"Run",
"the",
"specified",
"setup",
"query",
"on",
"the",
"Hive",
"session",
"before",
"running",
"the",
"task",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveTask.java#L87-L89 |
25,716 | apache/incubator-gobblin | gobblin-modules/gobblin-compliance/src/main/java/org/apache/gobblin/compliance/utils/PartitionUtils.java | PartitionUtils.getQuotedString | public static String getQuotedString(String st) {
Preconditions.checkNotNull(st);
String quotedString = "";
if (!st.startsWith(SINGLE_QUOTE)) {
quotedString += SINGLE_QUOTE;
}
quotedString += st;
if (!st.endsWith(SINGLE_QUOTE)) {
quotedString += SINGLE_QUOTE;
}
return quotedS... | java | public static String getQuotedString(String st) {
Preconditions.checkNotNull(st);
String quotedString = "";
if (!st.startsWith(SINGLE_QUOTE)) {
quotedString += SINGLE_QUOTE;
}
quotedString += st;
if (!st.endsWith(SINGLE_QUOTE)) {
quotedString += SINGLE_QUOTE;
}
return quotedS... | [
"public",
"static",
"String",
"getQuotedString",
"(",
"String",
"st",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"st",
")",
";",
"String",
"quotedString",
"=",
"\"\"",
";",
"if",
"(",
"!",
"st",
".",
"startsWith",
"(",
"SINGLE_QUOTE",
")",
")",
... | Add single quotes to the string, if not present.
TestString will be converted to 'TestString' | [
"Add",
"single",
"quotes",
"to",
"the",
"string",
"if",
"not",
"present",
".",
"TestString",
"will",
"be",
"converted",
"to",
"TestString"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-compliance/src/main/java/org/apache/gobblin/compliance/utils/PartitionUtils.java#L38-L49 |
25,717 | apache/incubator-gobblin | gobblin-modules/gobblin-compliance/src/main/java/org/apache/gobblin/compliance/utils/PartitionUtils.java | PartitionUtils.isUnixTimeStamp | public static boolean isUnixTimeStamp(String timeStamp) {
if (timeStamp.length() != ComplianceConfigurationKeys.TIME_STAMP_LENGTH) {
return false;
}
try {
Long.parseLong(timeStamp);
return true;
} catch (NumberFormatException e) {
return false;
}
} | java | public static boolean isUnixTimeStamp(String timeStamp) {
if (timeStamp.length() != ComplianceConfigurationKeys.TIME_STAMP_LENGTH) {
return false;
}
try {
Long.parseLong(timeStamp);
return true;
} catch (NumberFormatException e) {
return false;
}
} | [
"public",
"static",
"boolean",
"isUnixTimeStamp",
"(",
"String",
"timeStamp",
")",
"{",
"if",
"(",
"timeStamp",
".",
"length",
"(",
")",
"!=",
"ComplianceConfigurationKeys",
".",
"TIME_STAMP_LENGTH",
")",
"{",
"return",
"false",
";",
"}",
"try",
"{",
"Long",
... | Check if a given string is a valid unixTimeStamp | [
"Check",
"if",
"a",
"given",
"string",
"is",
"a",
"valid",
"unixTimeStamp"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-compliance/src/main/java/org/apache/gobblin/compliance/utils/PartitionUtils.java#L71-L81 |
25,718 | apache/incubator-gobblin | gobblin-metrics-libs/gobblin-metrics/src/main/java/org/apache/gobblin/metrics/GobblinMetrics.java | GobblinMetrics.stopMetricsReporting | public void stopMetricsReporting() {
LOGGER.info("Metrics reporting will be stopped: GobblinMetrics {}", this.toString());
if (!this.metricsReportingStarted) {
LOGGER.warn("Metric reporting has not started yet");
return;
}
// Stop the JMX reporter
if (this.jmxReporter.isPresent()) {
... | java | public void stopMetricsReporting() {
LOGGER.info("Metrics reporting will be stopped: GobblinMetrics {}", this.toString());
if (!this.metricsReportingStarted) {
LOGGER.warn("Metric reporting has not started yet");
return;
}
// Stop the JMX reporter
if (this.jmxReporter.isPresent()) {
... | [
"public",
"void",
"stopMetricsReporting",
"(",
")",
"{",
"LOGGER",
".",
"info",
"(",
"\"Metrics reporting will be stopped: GobblinMetrics {}\"",
",",
"this",
".",
"toString",
"(",
")",
")",
";",
"if",
"(",
"!",
"this",
".",
"metricsReportingStarted",
")",
"{",
"... | Stop metric reporting. | [
"Stop",
"metric",
"reporting",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-metrics-libs/gobblin-metrics/src/main/java/org/apache/gobblin/metrics/GobblinMetrics.java#L435-L470 |
25,719 | apache/incubator-gobblin | gobblin-runtime/src/main/java/org/apache/gobblin/runtime/spec_executorInstance/InMemorySpecExecutor.java | InMemorySpecExecutor.createDummySpecExecutor | public static SpecExecutor createDummySpecExecutor(URI uri) {
Properties properties = new Properties();
properties.setProperty(ConfigurationKeys.SPECEXECUTOR_INSTANCE_URI_KEY, uri.toString());
return new InMemorySpecExecutor(ConfigFactory.parseProperties(properties));
} | java | public static SpecExecutor createDummySpecExecutor(URI uri) {
Properties properties = new Properties();
properties.setProperty(ConfigurationKeys.SPECEXECUTOR_INSTANCE_URI_KEY, uri.toString());
return new InMemorySpecExecutor(ConfigFactory.parseProperties(properties));
} | [
"public",
"static",
"SpecExecutor",
"createDummySpecExecutor",
"(",
"URI",
"uri",
")",
"{",
"Properties",
"properties",
"=",
"new",
"Properties",
"(",
")",
";",
"properties",
".",
"setProperty",
"(",
"ConfigurationKeys",
".",
"SPECEXECUTOR_INSTANCE_URI_KEY",
",",
"u... | A creator that create a SpecExecutor only specifying URI for uniqueness.
@param uri | [
"A",
"creator",
"that",
"create",
"a",
"SpecExecutor",
"only",
"specifying",
"URI",
"for",
"uniqueness",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/spec_executorInstance/InMemorySpecExecutor.java#L67-L71 |
25,720 | apache/incubator-gobblin | gobblin-core/src/main/java/org/apache/gobblin/writer/partitioner/TimeBasedAvroWriterPartitioner.java | TimeBasedAvroWriterPartitioner.getRecordTimestamp | private static long getRecordTimestamp(Optional<Object> writerPartitionColumnValue) {
return writerPartitionColumnValue.orNull() instanceof Long ? (Long) writerPartitionColumnValue.get()
: System.currentTimeMillis();
} | java | private static long getRecordTimestamp(Optional<Object> writerPartitionColumnValue) {
return writerPartitionColumnValue.orNull() instanceof Long ? (Long) writerPartitionColumnValue.get()
: System.currentTimeMillis();
} | [
"private",
"static",
"long",
"getRecordTimestamp",
"(",
"Optional",
"<",
"Object",
">",
"writerPartitionColumnValue",
")",
"{",
"return",
"writerPartitionColumnValue",
".",
"orNull",
"(",
")",
"instanceof",
"Long",
"?",
"(",
"Long",
")",
"writerPartitionColumnValue",
... | Check if the partition column value is present and is a Long object. Otherwise, use current system time. | [
"Check",
"if",
"the",
"partition",
"column",
"value",
"is",
"present",
"and",
"is",
"a",
"Long",
"object",
".",
"Otherwise",
"use",
"current",
"system",
"time",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/writer/partitioner/TimeBasedAvroWriterPartitioner.java#L71-L74 |
25,721 | apache/incubator-gobblin | gobblin-core/src/main/java/org/apache/gobblin/writer/partitioner/TimeBasedAvroWriterPartitioner.java | TimeBasedAvroWriterPartitioner.getWriterPartitionColumnValue | private Optional<Object> getWriterPartitionColumnValue(GenericRecord record) {
if (!this.partitionColumns.isPresent()) {
return Optional.absent();
}
for (String partitionColumn : this.partitionColumns.get()) {
Optional<Object> fieldValue = AvroUtils.getFieldValue(record, partitionColumn);
... | java | private Optional<Object> getWriterPartitionColumnValue(GenericRecord record) {
if (!this.partitionColumns.isPresent()) {
return Optional.absent();
}
for (String partitionColumn : this.partitionColumns.get()) {
Optional<Object> fieldValue = AvroUtils.getFieldValue(record, partitionColumn);
... | [
"private",
"Optional",
"<",
"Object",
">",
"getWriterPartitionColumnValue",
"(",
"GenericRecord",
"record",
")",
"{",
"if",
"(",
"!",
"this",
".",
"partitionColumns",
".",
"isPresent",
"(",
")",
")",
"{",
"return",
"Optional",
".",
"absent",
"(",
")",
";",
... | Retrieve the value of the partition column field specified by this.partitionColumns | [
"Retrieve",
"the",
"value",
"of",
"the",
"partition",
"column",
"field",
"specified",
"by",
"this",
".",
"partitionColumns"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/writer/partitioner/TimeBasedAvroWriterPartitioner.java#L79-L91 |
25,722 | apache/incubator-gobblin | gobblin-utility/src/main/java/org/apache/gobblin/util/callbacks/CallbacksDispatcher.java | CallbacksDispatcher.addWeakListener | public synchronized void addWeakListener(L listener) {
Preconditions.checkNotNull(listener);
_log.info("Adding a weak listener " + listener);
_autoListeners.put(listener, null);
} | java | public synchronized void addWeakListener(L listener) {
Preconditions.checkNotNull(listener);
_log.info("Adding a weak listener " + listener);
_autoListeners.put(listener, null);
} | [
"public",
"synchronized",
"void",
"addWeakListener",
"(",
"L",
"listener",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"listener",
")",
";",
"_log",
".",
"info",
"(",
"\"Adding a weak listener \"",
"+",
"listener",
")",
";",
"_autoListeners",
".",
"put"... | Only weak references are stored for weak listeners. They will be removed from the dispatcher
automatically, once the listener objects are GCed. Note that weak listeners cannot be removed
explicitly. | [
"Only",
"weak",
"references",
"are",
"stored",
"for",
"weak",
"listeners",
".",
"They",
"will",
"be",
"removed",
"from",
"the",
"dispatcher",
"automatically",
"once",
"the",
"listener",
"objects",
"are",
"GCed",
".",
"Note",
"that",
"weak",
"listeners",
"canno... | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/callbacks/CallbacksDispatcher.java#L118-L123 |
25,723 | apache/incubator-gobblin | gobblin-service/src/main/java/org/apache/gobblin/service/modules/spec/JobExecutionPlanDagFactory.java | JobExecutionPlanDagFactory.getDependencies | private static List<String> getDependencies(Config config) {
return config.hasPath(ConfigurationKeys.JOB_DEPENDENCIES) ? Arrays
.asList(config.getString(ConfigurationKeys.JOB_DEPENDENCIES).split(",")) : new ArrayList<>();
} | java | private static List<String> getDependencies(Config config) {
return config.hasPath(ConfigurationKeys.JOB_DEPENDENCIES) ? Arrays
.asList(config.getString(ConfigurationKeys.JOB_DEPENDENCIES).split(",")) : new ArrayList<>();
} | [
"private",
"static",
"List",
"<",
"String",
">",
"getDependencies",
"(",
"Config",
"config",
")",
"{",
"return",
"config",
".",
"hasPath",
"(",
"ConfigurationKeys",
".",
"JOB_DEPENDENCIES",
")",
"?",
"Arrays",
".",
"asList",
"(",
"config",
".",
"getString",
... | Get job dependencies of a given job from its config.
@param config of a job.
@return a list of dependencies of the job. | [
"Get",
"job",
"dependencies",
"of",
"a",
"given",
"job",
"from",
"its",
"config",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-service/src/main/java/org/apache/gobblin/service/modules/spec/JobExecutionPlanDagFactory.java#L90-L93 |
25,724 | apache/incubator-gobblin | gobblin-api/src/main/java/org/apache/gobblin/util/DecoratorUtils.java | DecoratorUtils.getDecoratorLineage | public static List<Object> getDecoratorLineage(Object obj) {
List<Object> lineage = Lists.newArrayList(obj);
Object currentObject = obj;
while(currentObject instanceof Decorator) {
currentObject = ((Decorator)currentObject).getDecoratedObject();
lineage.add(currentObject);
}
return List... | java | public static List<Object> getDecoratorLineage(Object obj) {
List<Object> lineage = Lists.newArrayList(obj);
Object currentObject = obj;
while(currentObject instanceof Decorator) {
currentObject = ((Decorator)currentObject).getDecoratedObject();
lineage.add(currentObject);
}
return List... | [
"public",
"static",
"List",
"<",
"Object",
">",
"getDecoratorLineage",
"(",
"Object",
"obj",
")",
"{",
"List",
"<",
"Object",
">",
"lineage",
"=",
"Lists",
".",
"newArrayList",
"(",
"obj",
")",
";",
"Object",
"currentObject",
"=",
"obj",
";",
"while",
"(... | Finds the decorator lineage of the given object.
<p>
If object is not a {@link org.apache.gobblin.util.Decorator}, this method will return a singleton list with just the object.
If object is a {@link org.apache.gobblin.util.Decorator}, it will return a list of the underlying object followed by the
decorator lineage up... | [
"Finds",
"the",
"decorator",
"lineage",
"of",
"the",
"given",
"object",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-api/src/main/java/org/apache/gobblin/util/DecoratorUtils.java#L56-L65 |
25,725 | apache/incubator-gobblin | gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/MRCompactorJobRunner.java | MRCompactorJobRunner.getCompactionTimestamp | private DateTime getCompactionTimestamp() throws IOException {
DateTimeZone timeZone = DateTimeZone.forID(
this.dataset.jobProps().getProp(MRCompactor.COMPACTION_TIMEZONE, MRCompactor.DEFAULT_COMPACTION_TIMEZONE));
if (!this.recompactFromDestPaths) {
return new DateTime(timeZone);
}
Set<... | java | private DateTime getCompactionTimestamp() throws IOException {
DateTimeZone timeZone = DateTimeZone.forID(
this.dataset.jobProps().getProp(MRCompactor.COMPACTION_TIMEZONE, MRCompactor.DEFAULT_COMPACTION_TIMEZONE));
if (!this.recompactFromDestPaths) {
return new DateTime(timeZone);
}
Set<... | [
"private",
"DateTime",
"getCompactionTimestamp",
"(",
")",
"throws",
"IOException",
"{",
"DateTimeZone",
"timeZone",
"=",
"DateTimeZone",
".",
"forID",
"(",
"this",
".",
"dataset",
".",
"jobProps",
"(",
")",
".",
"getProp",
"(",
"MRCompactor",
".",
"COMPACTION_T... | For regular compactions, compaction timestamp is the time the compaction job starts.
If this is a recompaction from output paths, the compaction timestamp will remain the same as previously
persisted compaction time. This is because such a recompaction doesn't consume input data, so next time,
whether a file in the in... | [
"For",
"regular",
"compactions",
"compaction",
"timestamp",
"is",
"the",
"time",
"the",
"compaction",
"job",
"starts",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/MRCompactorJobRunner.java#L372-L386 |
25,726 | apache/incubator-gobblin | gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/MRCompactorJobRunner.java | MRCompactorJobRunner.submitSlaEvent | private void submitSlaEvent(Job job) {
try {
CompactionSlaEventHelper
.getEventSubmitterBuilder(this.dataset, Optional.of(job), this.fs)
.eventSubmitter(this.eventSubmitter)
.eventName(CompactionSlaEventHelper.COMPACTION_COMPLETED_EVENT_NAME)
.additionalMetadata(
... | java | private void submitSlaEvent(Job job) {
try {
CompactionSlaEventHelper
.getEventSubmitterBuilder(this.dataset, Optional.of(job), this.fs)
.eventSubmitter(this.eventSubmitter)
.eventName(CompactionSlaEventHelper.COMPACTION_COMPLETED_EVENT_NAME)
.additionalMetadata(
... | [
"private",
"void",
"submitSlaEvent",
"(",
"Job",
"job",
")",
"{",
"try",
"{",
"CompactionSlaEventHelper",
".",
"getEventSubmitterBuilder",
"(",
"this",
".",
"dataset",
",",
"Optional",
".",
"of",
"(",
"job",
")",
",",
"this",
".",
"fs",
")",
".",
"eventSub... | Submit an event when compaction MR job completes | [
"Submit",
"an",
"event",
"when",
"compaction",
"MR",
"job",
"completes"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/MRCompactorJobRunner.java#L696-L715 |
25,727 | apache/incubator-gobblin | gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/MRCompactorJobRunner.java | MRCompactorJobRunner.submitRecordsCountsEvent | private void submitRecordsCountsEvent() {
long lateOutputRecordCount = this.datasetHelper.getLateOutputRecordCount();
long outputRecordCount = this.datasetHelper.getOutputRecordCount();
try {
CompactionSlaEventHelper
.getEventSubmitterBuilder(this.dataset, Optional.<Job> absent(), this.fs)
... | java | private void submitRecordsCountsEvent() {
long lateOutputRecordCount = this.datasetHelper.getLateOutputRecordCount();
long outputRecordCount = this.datasetHelper.getOutputRecordCount();
try {
CompactionSlaEventHelper
.getEventSubmitterBuilder(this.dataset, Optional.<Job> absent(), this.fs)
... | [
"private",
"void",
"submitRecordsCountsEvent",
"(",
")",
"{",
"long",
"lateOutputRecordCount",
"=",
"this",
".",
"datasetHelper",
".",
"getLateOutputRecordCount",
"(",
")",
";",
"long",
"outputRecordCount",
"=",
"this",
".",
"datasetHelper",
".",
"getOutputRecordCount... | Submit an event reporting late record counts and non-late record counts. | [
"Submit",
"an",
"event",
"reporting",
"late",
"record",
"counts",
"and",
"non",
"-",
"late",
"record",
"counts",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/MRCompactorJobRunner.java#L720-L741 |
25,728 | apache/incubator-gobblin | gobblin-core/src/main/java/org/apache/gobblin/qualitychecker/row/RowLevelPolicyChecker.java | RowLevelPolicyChecker.processStream | @Override
public RecordStreamWithMetadata<D, S> processStream(RecordStreamWithMetadata<D, S> inputStream, WorkUnitState state) {
Flowable<StreamEntity<D>> filteredStream =
inputStream.getRecordStream().filter(r -> {
if (r instanceof ControlMessage) {
getMessageHandler().handleMessage... | java | @Override
public RecordStreamWithMetadata<D, S> processStream(RecordStreamWithMetadata<D, S> inputStream, WorkUnitState state) {
Flowable<StreamEntity<D>> filteredStream =
inputStream.getRecordStream().filter(r -> {
if (r instanceof ControlMessage) {
getMessageHandler().handleMessage... | [
"@",
"Override",
"public",
"RecordStreamWithMetadata",
"<",
"D",
",",
"S",
">",
"processStream",
"(",
"RecordStreamWithMetadata",
"<",
"D",
",",
"S",
">",
"inputStream",
",",
"WorkUnitState",
"state",
")",
"{",
"Flowable",
"<",
"StreamEntity",
"<",
"D",
">>",
... | Process the stream and drop any records that fail the quality check. | [
"Process",
"the",
"stream",
"and",
"drop",
"any",
"records",
"that",
"fail",
"the",
"quality",
"check",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/qualitychecker/row/RowLevelPolicyChecker.java#L135-L154 |
25,729 | apache/incubator-gobblin | gobblin-core-base/src/main/java/org/apache/gobblin/instrumented/qualitychecker/InstrumentedRowLevelPolicyBase.java | InstrumentedRowLevelPolicyBase.afterCheck | public void afterCheck(Result result, long startTimeNanos) {
switch (result) {
case FAILED:
Instrumented.markMeter(this.failedRecordsMeter);
break;
case PASSED:
Instrumented.markMeter(this.passedRecordsMeter);
break;
default:
}
Instrumented.updateTimer(this... | java | public void afterCheck(Result result, long startTimeNanos) {
switch (result) {
case FAILED:
Instrumented.markMeter(this.failedRecordsMeter);
break;
case PASSED:
Instrumented.markMeter(this.passedRecordsMeter);
break;
default:
}
Instrumented.updateTimer(this... | [
"public",
"void",
"afterCheck",
"(",
"Result",
"result",
",",
"long",
"startTimeNanos",
")",
"{",
"switch",
"(",
"result",
")",
"{",
"case",
"FAILED",
":",
"Instrumented",
".",
"markMeter",
"(",
"this",
".",
"failedRecordsMeter",
")",
";",
"break",
";",
"c... | Called after check is run.
@param result result from check.
@param startTimeNanos start time of check. | [
"Called",
"after",
"check",
"is",
"run",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core-base/src/main/java/org/apache/gobblin/instrumented/qualitychecker/InstrumentedRowLevelPolicyBase.java#L144-L156 |
25,730 | apache/incubator-gobblin | gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/orc/HiveOrcSerDeManager.java | HiveOrcSerDeManager.addSerDeProperties | @Override
public void addSerDeProperties(Path path, HiveRegistrationUnit hiveUnit)
throws IOException {
hiveUnit.setSerDeType(this.serDeWrapper.getSerDe().getClass().getName());
hiveUnit.setInputFormat(this.serDeWrapper.getInputFormatClassName());
hiveUnit.setOutputFormat(this.serDeWrapper.getOutput... | java | @Override
public void addSerDeProperties(Path path, HiveRegistrationUnit hiveUnit)
throws IOException {
hiveUnit.setSerDeType(this.serDeWrapper.getSerDe().getClass().getName());
hiveUnit.setInputFormat(this.serDeWrapper.getInputFormatClassName());
hiveUnit.setOutputFormat(this.serDeWrapper.getOutput... | [
"@",
"Override",
"public",
"void",
"addSerDeProperties",
"(",
"Path",
"path",
",",
"HiveRegistrationUnit",
"hiveUnit",
")",
"throws",
"IOException",
"{",
"hiveUnit",
".",
"setSerDeType",
"(",
"this",
".",
"serDeWrapper",
".",
"getSerDe",
"(",
")",
".",
"getClass... | Add ORC SerDe attributes into HiveUnit
@param path
@param hiveUnit
@throws IOException | [
"Add",
"ORC",
"SerDe",
"attributes",
"into",
"HiveUnit"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/orc/HiveOrcSerDeManager.java#L128-L136 |
25,731 | apache/incubator-gobblin | gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/orc/HiveOrcSerDeManager.java | HiveOrcSerDeManager.addSchemaPropertiesHelper | protected void addSchemaPropertiesHelper(Path path, HiveRegistrationUnit hiveUnit) throws IOException {
TypeInfo schema = getSchemaFromLatestFile(path, this.fs);
if (schema instanceof StructTypeInfo) {
StructTypeInfo structTypeInfo = (StructTypeInfo) schema;
hiveUnit.setSerDeProp(SCHEMA_LITERAL, sc... | java | protected void addSchemaPropertiesHelper(Path path, HiveRegistrationUnit hiveUnit) throws IOException {
TypeInfo schema = getSchemaFromLatestFile(path, this.fs);
if (schema instanceof StructTypeInfo) {
StructTypeInfo structTypeInfo = (StructTypeInfo) schema;
hiveUnit.setSerDeProp(SCHEMA_LITERAL, sc... | [
"protected",
"void",
"addSchemaPropertiesHelper",
"(",
"Path",
"path",
",",
"HiveRegistrationUnit",
"hiveUnit",
")",
"throws",
"IOException",
"{",
"TypeInfo",
"schema",
"=",
"getSchemaFromLatestFile",
"(",
"path",
",",
"this",
".",
"fs",
")",
";",
"if",
"(",
"sc... | Extensible if there's other source-of-truth for fetching schema instead of interacting with HDFS.
For purpose of initializing {@link org.apache.hadoop.hive.ql.io.orc.OrcSerde} object, it will require:
org.apache.hadoop.hive.serde.serdeConstants#LIST_COLUMNS and
org.apache.hadoop.hive.serde.serdeConstants#LIST_COLUMN_T... | [
"Extensible",
"if",
"there",
"s",
"other",
"source",
"-",
"of",
"-",
"truth",
"for",
"fetching",
"schema",
"instead",
"of",
"interacting",
"with",
"HDFS",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/orc/HiveOrcSerDeManager.java#L257-L274 |
25,732 | apache/incubator-gobblin | gobblin-utility/src/main/java/org/apache/gobblin/util/retry/RetryerFactory.java | RetryerFactory.newInstance | public static <T> Retryer<T> newInstance(Config config) {
config = config.withFallback(DEFAULTS);
RetryType type = RetryType.valueOf(config.getString(RETRY_TYPE).toUpperCase());
switch (type) {
case EXPONENTIAL:
return newExponentialRetryer(config);
case FIXED:
return newFixedRe... | java | public static <T> Retryer<T> newInstance(Config config) {
config = config.withFallback(DEFAULTS);
RetryType type = RetryType.valueOf(config.getString(RETRY_TYPE).toUpperCase());
switch (type) {
case EXPONENTIAL:
return newExponentialRetryer(config);
case FIXED:
return newFixedRe... | [
"public",
"static",
"<",
"T",
">",
"Retryer",
"<",
"T",
">",
"newInstance",
"(",
"Config",
"config",
")",
"{",
"config",
"=",
"config",
".",
"withFallback",
"(",
"DEFAULTS",
")",
";",
"RetryType",
"type",
"=",
"RetryType",
".",
"valueOf",
"(",
"config",
... | Creates new instance of retryer based on the config.
Accepted config keys are defined in RetryerFactory as static member variable.
You can use State along with ConfigBuilder and config prefix to build config.
@param config
@return | [
"Creates",
"new",
"instance",
"of",
"retryer",
"based",
"on",
"the",
"config",
".",
"Accepted",
"config",
"keys",
"are",
"defined",
"in",
"RetryerFactory",
"as",
"static",
"member",
"variable",
".",
"You",
"can",
"use",
"State",
"along",
"with",
"ConfigBuilder... | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/retry/RetryerFactory.java#L84-L96 |
25,733 | apache/incubator-gobblin | gobblin-api/src/main/java/org/apache/gobblin/password/PasswordManager.java | PasswordManager.getInstance | public static PasswordManager getInstance(State state) {
try {
return CACHED_INSTANCES
.get(new CachedInstanceKey(state));
} catch (ExecutionException e) {
throw new RuntimeException("Unable to get an instance of PasswordManager", e);
}
} | java | public static PasswordManager getInstance(State state) {
try {
return CACHED_INSTANCES
.get(new CachedInstanceKey(state));
} catch (ExecutionException e) {
throw new RuntimeException("Unable to get an instance of PasswordManager", e);
}
} | [
"public",
"static",
"PasswordManager",
"getInstance",
"(",
"State",
"state",
")",
"{",
"try",
"{",
"return",
"CACHED_INSTANCES",
".",
"get",
"(",
"new",
"CachedInstanceKey",
"(",
"state",
")",
")",
";",
"}",
"catch",
"(",
"ExecutionException",
"e",
")",
"{",... | Get an instance. The location of the master password file is provided via "encrypt.key.loc". | [
"Get",
"an",
"instance",
".",
"The",
"location",
"of",
"the",
"master",
"password",
"file",
"is",
"provided",
"via",
"encrypt",
".",
"key",
".",
"loc",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-api/src/main/java/org/apache/gobblin/password/PasswordManager.java#L159-L166 |
25,734 | apache/incubator-gobblin | gobblin-api/src/main/java/org/apache/gobblin/password/PasswordManager.java | PasswordManager.getInstance | public static PasswordManager getInstance(Path masterPwdLoc) {
State state = new State();
state.setProp(ConfigurationKeys.ENCRYPT_KEY_LOC, masterPwdLoc.toString());
state.setProp(ConfigurationKeys.ENCRYPT_KEY_FS_URI, masterPwdLoc.toUri());
try {
return CACHED_INSTANCES
.get(new CachedIns... | java | public static PasswordManager getInstance(Path masterPwdLoc) {
State state = new State();
state.setProp(ConfigurationKeys.ENCRYPT_KEY_LOC, masterPwdLoc.toString());
state.setProp(ConfigurationKeys.ENCRYPT_KEY_FS_URI, masterPwdLoc.toUri());
try {
return CACHED_INSTANCES
.get(new CachedIns... | [
"public",
"static",
"PasswordManager",
"getInstance",
"(",
"Path",
"masterPwdLoc",
")",
"{",
"State",
"state",
"=",
"new",
"State",
"(",
")",
";",
"state",
".",
"setProp",
"(",
"ConfigurationKeys",
".",
"ENCRYPT_KEY_LOC",
",",
"masterPwdLoc",
".",
"toString",
... | Get an instance. The master password file is given by masterPwdLoc. | [
"Get",
"an",
"instance",
".",
"The",
"master",
"password",
"file",
"is",
"given",
"by",
"masterPwdLoc",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-api/src/main/java/org/apache/gobblin/password/PasswordManager.java#L178-L188 |
25,735 | apache/incubator-gobblin | gobblin-api/src/main/java/org/apache/gobblin/password/PasswordManager.java | PasswordManager.encryptPassword | public String encryptPassword(String plain) {
Preconditions.checkArgument(this.encryptors.size() > 0,
"A master password needs to be provided for encrypting passwords.");
try {
return this.encryptors.get(0).encrypt(plain);
} catch (Exception e) {
throw new RuntimeException("Failed to en... | java | public String encryptPassword(String plain) {
Preconditions.checkArgument(this.encryptors.size() > 0,
"A master password needs to be provided for encrypting passwords.");
try {
return this.encryptors.get(0).encrypt(plain);
} catch (Exception e) {
throw new RuntimeException("Failed to en... | [
"public",
"String",
"encryptPassword",
"(",
"String",
"plain",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"this",
".",
"encryptors",
".",
"size",
"(",
")",
">",
"0",
",",
"\"A master password needs to be provided for encrypting passwords.\"",
")",
";",
"t... | Encrypt a password. A master password must have been provided in the constructor.
@param plain A plain password to be encrypted.
@return The encrypted password. | [
"Encrypt",
"a",
"password",
".",
"A",
"master",
"password",
"must",
"have",
"been",
"provided",
"in",
"the",
"constructor",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-api/src/main/java/org/apache/gobblin/password/PasswordManager.java#L200-L209 |
25,736 | apache/incubator-gobblin | gobblin-api/src/main/java/org/apache/gobblin/password/PasswordManager.java | PasswordManager.decryptPassword | public String decryptPassword(String encrypted) {
Preconditions.checkArgument(this.encryptors.size() > 0,
"A master password needs to be provided for decrypting passwords.");
for (TextEncryptor encryptor : encryptors) {
try {
return encryptor.decrypt(encrypted);
} catch (Exception e... | java | public String decryptPassword(String encrypted) {
Preconditions.checkArgument(this.encryptors.size() > 0,
"A master password needs to be provided for decrypting passwords.");
for (TextEncryptor encryptor : encryptors) {
try {
return encryptor.decrypt(encrypted);
} catch (Exception e... | [
"public",
"String",
"decryptPassword",
"(",
"String",
"encrypted",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"this",
".",
"encryptors",
".",
"size",
"(",
")",
">",
"0",
",",
"\"A master password needs to be provided for decrypting passwords.\"",
")",
";",
... | Decrypt an encrypted password. A master password file must have been provided in the constructor.
@param encrypted An encrypted password.
@return The decrypted password. | [
"Decrypt",
"an",
"encrypted",
"password",
".",
"A",
"master",
"password",
"file",
"must",
"have",
"been",
"provided",
"in",
"the",
"constructor",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-api/src/main/java/org/apache/gobblin/password/PasswordManager.java#L216-L229 |
25,737 | apache/incubator-gobblin | gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixDistributeJobExecutionLauncher.java | GobblinHelixDistributeJobExecutionLauncher.createJobBuilder | private JobConfig.Builder createJobBuilder (Properties jobProps) {
// Create a single task for job planning
String planningId = getPlanningJobId(jobProps);
Map<String, TaskConfig> taskConfigMap = Maps.newHashMap();
Map<String, String> rawConfigMap = Maps.newHashMap();
for (String key : jobProps.stri... | java | private JobConfig.Builder createJobBuilder (Properties jobProps) {
// Create a single task for job planning
String planningId = getPlanningJobId(jobProps);
Map<String, TaskConfig> taskConfigMap = Maps.newHashMap();
Map<String, String> rawConfigMap = Maps.newHashMap();
for (String key : jobProps.stri... | [
"private",
"JobConfig",
".",
"Builder",
"createJobBuilder",
"(",
"Properties",
"jobProps",
")",
"{",
"// Create a single task for job planning",
"String",
"planningId",
"=",
"getPlanningJobId",
"(",
"jobProps",
")",
";",
"Map",
"<",
"String",
",",
"TaskConfig",
">",
... | Create a job config builder which has a single task that wraps the original jobProps.
The planning job (which runs the original {@link GobblinHelixJobLauncher}) will be
executed on one of the Helix participants.
We rely on the underlying {@link GobblinHelixJobLauncher} to correctly handle the task
execution timeout s... | [
"Create",
"a",
"job",
"config",
"builder",
"which",
"has",
"a",
"single",
"task",
"that",
"wraps",
"the",
"original",
"jobProps",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixDistributeJobExecutionLauncher.java#L202-L244 |
25,738 | apache/incubator-gobblin | gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixDistributeJobExecutionLauncher.java | GobblinHelixDistributeJobExecutionLauncher.submitJobToHelix | private void submitJobToHelix(String jobName, String jobId, JobConfig.Builder jobConfigBuilder) throws Exception {
TaskDriver taskDriver = new TaskDriver(this.planningJobHelixManager);
HelixUtils.submitJobToWorkFlow(jobConfigBuilder,
jobName,
jobId,
taskDriver,
this.planningJobHe... | java | private void submitJobToHelix(String jobName, String jobId, JobConfig.Builder jobConfigBuilder) throws Exception {
TaskDriver taskDriver = new TaskDriver(this.planningJobHelixManager);
HelixUtils.submitJobToWorkFlow(jobConfigBuilder,
jobName,
jobId,
taskDriver,
this.planningJobHe... | [
"private",
"void",
"submitJobToHelix",
"(",
"String",
"jobName",
",",
"String",
"jobId",
",",
"JobConfig",
".",
"Builder",
"jobConfigBuilder",
")",
"throws",
"Exception",
"{",
"TaskDriver",
"taskDriver",
"=",
"new",
"TaskDriver",
"(",
"this",
".",
"planningJobHeli... | Submit a planning job to helix so that it can launched from a remote node.
@param jobName A planning job name which has prefix {@link GobblinClusterConfigurationKeys#PLANNING_JOB_NAME_PREFIX}.
@param jobId A planning job id created by {@link GobblinHelixDistributeJobExecutionLauncher#getPlanningJobId}.
@param jobConf... | [
"Submit",
"a",
"planning",
"job",
"to",
"helix",
"so",
"that",
"it",
"can",
"launched",
"from",
"a",
"remote",
"node",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixDistributeJobExecutionLauncher.java#L252-L261 |
25,739 | apache/incubator-gobblin | gobblin-utility/src/main/java/org/apache/gobblin/util/FileListUtils.java | FileListUtils.listMostNestedPathRecursively | public static List<FileStatus> listMostNestedPathRecursively(FileSystem fs, Path path)
throws IOException {
return listMostNestedPathRecursively(fs, path, NO_OP_PATH_FILTER);
} | java | public static List<FileStatus> listMostNestedPathRecursively(FileSystem fs, Path path)
throws IOException {
return listMostNestedPathRecursively(fs, path, NO_OP_PATH_FILTER);
} | [
"public",
"static",
"List",
"<",
"FileStatus",
">",
"listMostNestedPathRecursively",
"(",
"FileSystem",
"fs",
",",
"Path",
"path",
")",
"throws",
"IOException",
"{",
"return",
"listMostNestedPathRecursively",
"(",
"fs",
",",
"path",
",",
"NO_OP_PATH_FILTER",
")",
... | Method to list out all files, or directory if no file exists, under a specified path. | [
"Method",
"to",
"list",
"out",
"all",
"files",
"or",
"directory",
"if",
"no",
"file",
"exists",
"under",
"a",
"specified",
"path",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/FileListUtils.java#L166-L169 |
25,740 | apache/incubator-gobblin | gobblin-utility/src/main/java/org/apache/gobblin/util/FileListUtils.java | FileListUtils.getAnyNonHiddenFile | public static FileStatus getAnyNonHiddenFile(FileSystem fs, Path path)
throws IOException {
HiddenFilter hiddenFilter = new HiddenFilter();
FileStatus root = fs.getFileStatus(path);
if (!root.isDirectory()) {
return hiddenFilter.accept(path) ? root : null;
}
// DFS to get the first dat... | java | public static FileStatus getAnyNonHiddenFile(FileSystem fs, Path path)
throws IOException {
HiddenFilter hiddenFilter = new HiddenFilter();
FileStatus root = fs.getFileStatus(path);
if (!root.isDirectory()) {
return hiddenFilter.accept(path) ? root : null;
}
// DFS to get the first dat... | [
"public",
"static",
"FileStatus",
"getAnyNonHiddenFile",
"(",
"FileSystem",
"fs",
",",
"Path",
"path",
")",
"throws",
"IOException",
"{",
"HiddenFilter",
"hiddenFilter",
"=",
"new",
"HiddenFilter",
"(",
")",
";",
"FileStatus",
"root",
"=",
"fs",
".",
"getFileSta... | Get any data file, which is not hidden or a directory, from the given path | [
"Get",
"any",
"data",
"file",
"which",
"is",
"not",
"hidden",
"or",
"a",
"directory",
"from",
"the",
"given",
"path"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/FileListUtils.java#L237-L265 |
25,741 | apache/incubator-gobblin | gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowStatusResource.java | FlowStatusResource.get | @Override
public FlowStatus get(ComplexResourceKey<FlowStatusId, EmptyRecord> key) {
String flowGroup = key.getKey().getFlowGroup();
String flowName = key.getKey().getFlowName();
long flowExecutionId = key.getKey().getFlowExecutionId();
LOG.info("Get called with flowGroup " + flowGroup + " flowName "... | java | @Override
public FlowStatus get(ComplexResourceKey<FlowStatusId, EmptyRecord> key) {
String flowGroup = key.getKey().getFlowGroup();
String flowName = key.getKey().getFlowName();
long flowExecutionId = key.getKey().getFlowExecutionId();
LOG.info("Get called with flowGroup " + flowGroup + " flowName "... | [
"@",
"Override",
"public",
"FlowStatus",
"get",
"(",
"ComplexResourceKey",
"<",
"FlowStatusId",
",",
"EmptyRecord",
">",
"key",
")",
"{",
"String",
"flowGroup",
"=",
"key",
".",
"getKey",
"(",
")",
".",
"getFlowGroup",
"(",
")",
";",
"String",
"flowName",
... | Retrieve the FlowStatus with the given key
@param key flow status id key containing group name and flow name
@return {@link FlowStatus} with flow status for the latest execution of the flow | [
"Retrieve",
"the",
"FlowStatus",
"with",
"the",
"given",
"key"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowStatusResource.java#L61-L74 |
25,742 | apache/incubator-gobblin | gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowStatusResource.java | FlowStatusResource.updatedFlowExecutionStatus | static ExecutionStatus updatedFlowExecutionStatus(ExecutionStatus jobExecutionStatus,
ExecutionStatus currentFlowExecutionStatus) {
// if any job failed or flow has failed then return failed status
if (currentFlowExecutionStatus == ExecutionStatus.FAILED ||
jobExecutionStatus == ExecutionStatus.F... | java | static ExecutionStatus updatedFlowExecutionStatus(ExecutionStatus jobExecutionStatus,
ExecutionStatus currentFlowExecutionStatus) {
// if any job failed or flow has failed then return failed status
if (currentFlowExecutionStatus == ExecutionStatus.FAILED ||
jobExecutionStatus == ExecutionStatus.F... | [
"static",
"ExecutionStatus",
"updatedFlowExecutionStatus",
"(",
"ExecutionStatus",
"jobExecutionStatus",
",",
"ExecutionStatus",
"currentFlowExecutionStatus",
")",
"{",
"// if any job failed or flow has failed then return failed status",
"if",
"(",
"currentFlowExecutionStatus",
"==",
... | Determines the new flow status based on the current flow status and new job status
@param jobExecutionStatus job status
@param currentFlowExecutionStatus current flow status
@return updated flow status | [
"Determines",
"the",
"new",
"flow",
"status",
"based",
"on",
"the",
"current",
"flow",
"status",
"and",
"new",
"job",
"status"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowStatusResource.java#L171-L194 |
25,743 | apache/incubator-gobblin | gobblin-service/src/main/java/org/apache/gobblin/service/modules/flow/LoadBasedFlowEdgeImpl.java | LoadBasedFlowEdgeImpl.calculateEdgeIdentity | public static String calculateEdgeIdentity(ServiceNode sourceNode, ServiceNode targetNode, SpecExecutor specExecutorInstance){
return sourceNode.getNodeName() + "-" + specExecutorInstance.getUri() + "-" + targetNode.getNodeName();
} | java | public static String calculateEdgeIdentity(ServiceNode sourceNode, ServiceNode targetNode, SpecExecutor specExecutorInstance){
return sourceNode.getNodeName() + "-" + specExecutorInstance.getUri() + "-" + targetNode.getNodeName();
} | [
"public",
"static",
"String",
"calculateEdgeIdentity",
"(",
"ServiceNode",
"sourceNode",
",",
"ServiceNode",
"targetNode",
",",
"SpecExecutor",
"specExecutorInstance",
")",
"{",
"return",
"sourceNode",
".",
"getNodeName",
"(",
")",
"+",
"\"-\"",
"+",
"specExecutorInst... | A naive implementation of edge identity calculation.
@return | [
"A",
"naive",
"implementation",
"of",
"edge",
"identity",
"calculation",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-service/src/main/java/org/apache/gobblin/service/modules/flow/LoadBasedFlowEdgeImpl.java#L136-L138 |
25,744 | apache/incubator-gobblin | gobblin-config-management/gobblin-config-core/src/main/java/org/apache/gobblin/config/store/zip/IvyConfigStoreFactory.java | IvyConfigStoreFactory.getBaseURI | private URI getBaseURI(URI configKey) throws URISyntaxException {
return new URI(configKey.getScheme(), configKey.getAuthority(), null, configKey.getQuery(), configKey.getFragment());
} | java | private URI getBaseURI(URI configKey) throws URISyntaxException {
return new URI(configKey.getScheme(), configKey.getAuthority(), null, configKey.getQuery(), configKey.getFragment());
} | [
"private",
"URI",
"getBaseURI",
"(",
"URI",
"configKey",
")",
"throws",
"URISyntaxException",
"{",
"return",
"new",
"URI",
"(",
"configKey",
".",
"getScheme",
"(",
")",
",",
"configKey",
".",
"getAuthority",
"(",
")",
",",
"null",
",",
"configKey",
".",
"g... | Base URI for a config store should be root of the zip file, so change path part of URI to be null | [
"Base",
"URI",
"for",
"a",
"config",
"store",
"should",
"be",
"root",
"of",
"the",
"zip",
"file",
"so",
"change",
"path",
"part",
"of",
"URI",
"to",
"be",
"null"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-config-management/gobblin-config-core/src/main/java/org/apache/gobblin/config/store/zip/IvyConfigStoreFactory.java#L123-L125 |
25,745 | apache/incubator-gobblin | gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/event/TimingEvent.java | TimingEvent.stop | public void stop(Map<String, String> additionalMetadata) {
if (this.stopped) {
return;
}
this.stopped = true;
long endTime = System.currentTimeMillis();
long duration = endTime - this.startTime;
Map<String, String> finalMetadata = Maps.newHashMap();
finalMetadata.putAll(additionalMeta... | java | public void stop(Map<String, String> additionalMetadata) {
if (this.stopped) {
return;
}
this.stopped = true;
long endTime = System.currentTimeMillis();
long duration = endTime - this.startTime;
Map<String, String> finalMetadata = Maps.newHashMap();
finalMetadata.putAll(additionalMeta... | [
"public",
"void",
"stop",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"additionalMetadata",
")",
"{",
"if",
"(",
"this",
".",
"stopped",
")",
"{",
"return",
";",
"}",
"this",
".",
"stopped",
"=",
"true",
";",
"long",
"endTime",
"=",
"System",
".",... | Stop the timer and submit the event, along with the additional metadata specified. If the timer was already stopped
before, this is a no-op.
@param additionalMetadata a {@link Map} of additional metadata that should be submitted along with this event | [
"Stop",
"the",
"timer",
"and",
"submit",
"the",
"event",
"along",
"with",
"the",
"additional",
"metadata",
"specified",
".",
"If",
"the",
"timer",
"was",
"already",
"stopped",
"before",
"this",
"is",
"a",
"no",
"-",
"op",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/event/TimingEvent.java#L109-L125 |
25,746 | apache/incubator-gobblin | gobblin-core/src/main/java/org/apache/gobblin/recordaccess/RecordAccessorProviderFactory.java | RecordAccessorProviderFactory.getRecordAccessorForObject | public synchronized static RecordAccessor getRecordAccessorForObject(Object obj) {
for (RecordAccessorProvider p: recordAccessorProviders) {
RecordAccessor accessor = p.recordAccessorForObject(obj);
if (accessor != null) {
return accessor;
}
}
throw new IllegalArgumentException("C... | java | public synchronized static RecordAccessor getRecordAccessorForObject(Object obj) {
for (RecordAccessorProvider p: recordAccessorProviders) {
RecordAccessor accessor = p.recordAccessorForObject(obj);
if (accessor != null) {
return accessor;
}
}
throw new IllegalArgumentException("C... | [
"public",
"synchronized",
"static",
"RecordAccessor",
"getRecordAccessorForObject",
"(",
"Object",
"obj",
")",
"{",
"for",
"(",
"RecordAccessorProvider",
"p",
":",
"recordAccessorProviders",
")",
"{",
"RecordAccessor",
"accessor",
"=",
"p",
".",
"recordAccessorForObject... | Get a RecordAccessor for a given object. Throws IllegalArgumentException if none
can be built. | [
"Get",
"a",
"RecordAccessor",
"for",
"a",
"given",
"object",
".",
"Throws",
"IllegalArgumentException",
"if",
"none",
"can",
"be",
"built",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/recordaccess/RecordAccessorProviderFactory.java#L36-L45 |
25,747 | apache/incubator-gobblin | gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/MRCompactorJobPropCreator.java | MRCompactorJobPropCreator.getNewDataInFolder | private Set<Path> getNewDataInFolder(Path inputFolder, Path outputFolder) throws IOException {
Set<Path> newFiles = Sets.newHashSet();
if (!this.fs.exists(inputFolder) || !this.fs.exists(outputFolder)) {
return newFiles;
}
DateTime lastCompactionTime = new DateTime(MRCompactor.readCompactionTime... | java | private Set<Path> getNewDataInFolder(Path inputFolder, Path outputFolder) throws IOException {
Set<Path> newFiles = Sets.newHashSet();
if (!this.fs.exists(inputFolder) || !this.fs.exists(outputFolder)) {
return newFiles;
}
DateTime lastCompactionTime = new DateTime(MRCompactor.readCompactionTime... | [
"private",
"Set",
"<",
"Path",
">",
"getNewDataInFolder",
"(",
"Path",
"inputFolder",
",",
"Path",
"outputFolder",
")",
"throws",
"IOException",
"{",
"Set",
"<",
"Path",
">",
"newFiles",
"=",
"Sets",
".",
"newHashSet",
"(",
")",
";",
"if",
"(",
"!",
"thi... | Check if inputFolder contains any files which have modification times which are more
recent than the last compaction time as stored within outputFolder; return any files
which do. An empty list will be returned if all files are older than the last compaction time. | [
"Check",
"if",
"inputFolder",
"contains",
"any",
"files",
"which",
"have",
"modification",
"times",
"which",
"are",
"more",
"recent",
"than",
"the",
"last",
"compaction",
"time",
"as",
"stored",
"within",
"outputFolder",
";",
"return",
"any",
"files",
"which",
... | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/MRCompactorJobPropCreator.java#L314-L335 |
25,748 | apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveConverterUtils.java | HiveConverterUtils.generateStagingCTASStatement | public static String generateStagingCTASStatement(HiveDatasetFinder.DbAndTable outputDbAndTable,
String sourceQuery, StorageFormat storageFormat, String outputTableLocation) {
Preconditions.checkArgument(!Strings.isNullOrEmpty(outputDbAndTable.getDb()) &&
!Strings.isNullOrEmpty(outputDbAndTable.getTab... | java | public static String generateStagingCTASStatement(HiveDatasetFinder.DbAndTable outputDbAndTable,
String sourceQuery, StorageFormat storageFormat, String outputTableLocation) {
Preconditions.checkArgument(!Strings.isNullOrEmpty(outputDbAndTable.getDb()) &&
!Strings.isNullOrEmpty(outputDbAndTable.getTab... | [
"public",
"static",
"String",
"generateStagingCTASStatement",
"(",
"HiveDatasetFinder",
".",
"DbAndTable",
"outputDbAndTable",
",",
"String",
"sourceQuery",
",",
"StorageFormat",
"storageFormat",
",",
"String",
"outputTableLocation",
")",
"{",
"Preconditions",
".",
"check... | Generates a CTAS statement to dump the results of a query into a new table.
@param outputDbAndTable output db and table where contents should be written.
@param sourceQuery query to materialize.
@param storageFormat format of output table.
@param outputTableLocation location where files of output table should be writte... | [
"Generates",
"a",
"CTAS",
"statement",
"to",
"dump",
"the",
"results",
"of",
"a",
"query",
"into",
"a",
"new",
"table",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveConverterUtils.java#L183-L190 |
25,749 | apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveConverterUtils.java | HiveConverterUtils.generateTableCopy | public static String generateTableCopy(
String inputTblName,
String outputTblName,
String inputDbName,
String outputDbName,
Optional<Map<String, String>> optionalPartitionDMLInfo) {
Preconditions.checkArgument(StringUtils.isNotBlank(inputTblName));
Preconditions.checkArgument(Strin... | java | public static String generateTableCopy(
String inputTblName,
String outputTblName,
String inputDbName,
String outputDbName,
Optional<Map<String, String>> optionalPartitionDMLInfo) {
Preconditions.checkArgument(StringUtils.isNotBlank(inputTblName));
Preconditions.checkArgument(Strin... | [
"public",
"static",
"String",
"generateTableCopy",
"(",
"String",
"inputTblName",
",",
"String",
"outputTblName",
",",
"String",
"inputDbName",
",",
"String",
"outputDbName",
",",
"Optional",
"<",
"Map",
"<",
"String",
",",
"String",
">",
">",
"optionalPartitionDM... | Fills data from input table into output table.
@param inputTblName input hive table name
@param outputTblName output hive table name
@param inputDbName input hive database name
@param outputDbName output hive database name
@param optionalPartitionDMLInfo input hive table's partition's name and value
@return Hive query ... | [
"Fills",
"data",
"from",
"input",
"table",
"into",
"output",
"table",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveConverterUtils.java#L201-L234 |
25,750 | apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveConverterUtils.java | HiveConverterUtils.populatePartitionInfo | public static void populatePartitionInfo(HiveProcessingEntity conversionEntity, Map<String, String> partitionsDDLInfo,
Map<String, String> partitionsDMLInfo) {
String partitionsInfoString = null;
String partitionsTypeString = null;
if (conversionEntity.getPartition().isPresent()) {
partitionsI... | java | public static void populatePartitionInfo(HiveProcessingEntity conversionEntity, Map<String, String> partitionsDDLInfo,
Map<String, String> partitionsDMLInfo) {
String partitionsInfoString = null;
String partitionsTypeString = null;
if (conversionEntity.getPartition().isPresent()) {
partitionsI... | [
"public",
"static",
"void",
"populatePartitionInfo",
"(",
"HiveProcessingEntity",
"conversionEntity",
",",
"Map",
"<",
"String",
",",
"String",
">",
"partitionsDDLInfo",
",",
"Map",
"<",
"String",
",",
"String",
">",
"partitionsDMLInfo",
")",
"{",
"String",
"parti... | It fills partitionsDDLInfo and partitionsDMLInfo with the partition information
@param conversionEntity conversion entity to
@param partitionsDDLInfo partition type information, to be filled by this method
@param partitionsDMLInfo partition key-value pair, to be filled by this method | [
"It",
"fills",
"partitionsDDLInfo",
"and",
"partitionsDMLInfo",
"with",
"the",
"partition",
"information"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveConverterUtils.java#L251-L285 |
25,751 | apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveConverterUtils.java | HiveConverterUtils.createStagingDirectory | public static void createStagingDirectory(FileSystem fs, String destination, HiveProcessingEntity conversionEntity,
WorkUnitState workUnit) {
/*
* Create staging data location with the same permissions as source data location
*
* Note that hive can also automatically create the non-existing dir... | java | public static void createStagingDirectory(FileSystem fs, String destination, HiveProcessingEntity conversionEntity,
WorkUnitState workUnit) {
/*
* Create staging data location with the same permissions as source data location
*
* Note that hive can also automatically create the non-existing dir... | [
"public",
"static",
"void",
"createStagingDirectory",
"(",
"FileSystem",
"fs",
",",
"String",
"destination",
",",
"HiveProcessingEntity",
"conversionEntity",
",",
"WorkUnitState",
"workUnit",
")",
"{",
"/*\n * Create staging data location with the same permissions as source d... | Creates a staging directory with the permission as in source directory.
@param fs filesystem object
@param destination staging directory location
@param conversionEntity conversion entity used to get source directory permissions
@param workUnit workunit | [
"Creates",
"a",
"staging",
"directory",
"with",
"the",
"permission",
"as",
"in",
"source",
"directory",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveConverterUtils.java#L294-L333 |
25,752 | apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveConverterUtils.java | HiveConverterUtils.getDestinationTableMeta | public static Pair<Optional<Table>, Optional<List<Partition>>> getDestinationTableMeta(String dbName,
String tableName, Properties props) {
Optional<Table> table = Optional.<Table>absent();
Optional<List<Partition>> partitions = Optional.<List<Partition>>absent();
try {
HiveMetastoreClientPool... | java | public static Pair<Optional<Table>, Optional<List<Partition>>> getDestinationTableMeta(String dbName,
String tableName, Properties props) {
Optional<Table> table = Optional.<Table>absent();
Optional<List<Partition>> partitions = Optional.<List<Partition>>absent();
try {
HiveMetastoreClientPool... | [
"public",
"static",
"Pair",
"<",
"Optional",
"<",
"Table",
">",
",",
"Optional",
"<",
"List",
"<",
"Partition",
">",
">",
">",
"getDestinationTableMeta",
"(",
"String",
"dbName",
",",
"String",
"tableName",
",",
"Properties",
"props",
")",
"{",
"Optional",
... | Returns a pair of Hive table and its partitions
@param dbName db name
@param tableName table name
@param props properties
@return a pair of Hive table and its partitions
@throws DataConversionException | [
"Returns",
"a",
"pair",
"of",
"Hive",
"table",
"and",
"its",
"partitions"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveConverterUtils.java#L425-L450 |
25,753 | apache/incubator-gobblin | gobblin-modules/gobblin-sql/src/main/java/org/apache/gobblin/writer/commands/TeradataBufferedInserter.java | TeradataBufferedInserter.getColumnPosSqlTypes | private Map<Integer, Integer> getColumnPosSqlTypes() {
try {
final Map<Integer, Integer> columnPosSqlTypes = Maps.newHashMap();
ParameterMetaData pMetaData = this.insertPstmtForFixedBatch.getParameterMetaData();
for (int i = 1; i <= pMetaData.getParameterCount(); i++) {
columnPosSqlTypes.p... | java | private Map<Integer, Integer> getColumnPosSqlTypes() {
try {
final Map<Integer, Integer> columnPosSqlTypes = Maps.newHashMap();
ParameterMetaData pMetaData = this.insertPstmtForFixedBatch.getParameterMetaData();
for (int i = 1; i <= pMetaData.getParameterCount(); i++) {
columnPosSqlTypes.p... | [
"private",
"Map",
"<",
"Integer",
",",
"Integer",
">",
"getColumnPosSqlTypes",
"(",
")",
"{",
"try",
"{",
"final",
"Map",
"<",
"Integer",
",",
"Integer",
">",
"columnPosSqlTypes",
"=",
"Maps",
".",
"newHashMap",
"(",
")",
";",
"ParameterMetaData",
"pMetaData... | Creates a mapping between column positions and their data types
@return A map containing the position of the columns along with their data type as value | [
"Creates",
"a",
"mapping",
"between",
"column",
"positions",
"and",
"their",
"data",
"types"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-sql/src/main/java/org/apache/gobblin/writer/commands/TeradataBufferedInserter.java#L108-L119 |
25,754 | apache/incubator-gobblin | gobblin-core/src/main/java/org/apache/gobblin/writer/http/SalesforceRestWriter.java | SalesforceRestWriter.processBatchRequestResponse | private void processBatchRequestResponse(CloseableHttpResponse response) throws IOException,
UnexpectedResponseException {
String entityStr = EntityUtils.toString(response.getEntity());
int statusCode = response.getStatusLine().getStatusCode();
if (statusCode >= 400) {
throw new RuntimeException... | java | private void processBatchRequestResponse(CloseableHttpResponse response) throws IOException,
UnexpectedResponseException {
String entityStr = EntityUtils.toString(response.getEntity());
int statusCode = response.getStatusLine().getStatusCode();
if (statusCode >= 400) {
throw new RuntimeException... | [
"private",
"void",
"processBatchRequestResponse",
"(",
"CloseableHttpResponse",
"response",
")",
"throws",
"IOException",
",",
"UnexpectedResponseException",
"{",
"String",
"entityStr",
"=",
"EntityUtils",
".",
"toString",
"(",
"response",
".",
"getEntity",
"(",
")",
... | Check results from batch response, if any of the results is failure throw exception.
@param response
@throws IOException
@throws UnexpectedResponseException | [
"Check",
"results",
"from",
"batch",
"response",
"if",
"any",
"of",
"the",
"results",
"is",
"failure",
"throw",
"exception",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/writer/http/SalesforceRestWriter.java#L326-L358 |
25,755 | apache/incubator-gobblin | gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/kafka/serialize/MD5Digest.java | MD5Digest.fromString | public static MD5Digest fromString(String md5String) {
byte[] bytes;
try {
bytes = Hex.decodeHex(md5String.toCharArray());
return new MD5Digest(md5String, bytes);
} catch (DecoderException e) {
throw new IllegalArgumentException("Unable to convert md5string", e);
}
} | java | public static MD5Digest fromString(String md5String) {
byte[] bytes;
try {
bytes = Hex.decodeHex(md5String.toCharArray());
return new MD5Digest(md5String, bytes);
} catch (DecoderException e) {
throw new IllegalArgumentException("Unable to convert md5string", e);
}
} | [
"public",
"static",
"MD5Digest",
"fromString",
"(",
"String",
"md5String",
")",
"{",
"byte",
"[",
"]",
"bytes",
";",
"try",
"{",
"bytes",
"=",
"Hex",
".",
"decodeHex",
"(",
"md5String",
".",
"toCharArray",
"(",
")",
")",
";",
"return",
"new",
"MD5Digest"... | Static method to get an MD5Digest from a human-readable string representation
@param md5String
@return a filled out MD5Digest | [
"Static",
"method",
"to",
"get",
"an",
"MD5Digest",
"from",
"a",
"human",
"-",
"readable",
"string",
"representation"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/kafka/serialize/MD5Digest.java#L57-L65 |
25,756 | apache/incubator-gobblin | gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/kafka/serialize/MD5Digest.java | MD5Digest.fromBytes | public static MD5Digest fromBytes(byte[] md5Bytes)
{
Preconditions.checkArgument(md5Bytes.length == MD5_BYTES_LENGTH,
"md5 bytes must be " + MD5_BYTES_LENGTH + " bytes in length, found " + md5Bytes.length + " bytes.");
String md5String = Hex.encodeHexString(md5Bytes);
return new MD5Digest(md5Strin... | java | public static MD5Digest fromBytes(byte[] md5Bytes)
{
Preconditions.checkArgument(md5Bytes.length == MD5_BYTES_LENGTH,
"md5 bytes must be " + MD5_BYTES_LENGTH + " bytes in length, found " + md5Bytes.length + " bytes.");
String md5String = Hex.encodeHexString(md5Bytes);
return new MD5Digest(md5Strin... | [
"public",
"static",
"MD5Digest",
"fromBytes",
"(",
"byte",
"[",
"]",
"md5Bytes",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"md5Bytes",
".",
"length",
"==",
"MD5_BYTES_LENGTH",
",",
"\"md5 bytes must be \"",
"+",
"MD5_BYTES_LENGTH",
"+",
"\" bytes in leng... | Static method to get an MD5Digest from a binary byte representation
@param md5Bytes
@return a filled out MD5Digest | [
"Static",
"method",
"to",
"get",
"an",
"MD5Digest",
"from",
"a",
"binary",
"byte",
"representation"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/kafka/serialize/MD5Digest.java#L72-L78 |
25,757 | apache/incubator-gobblin | gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/kafka/serialize/MD5Digest.java | MD5Digest.fromBytes | public static MD5Digest fromBytes(byte[] md5Bytes, int offset) {
byte[] md5BytesCopy = Arrays.copyOfRange(md5Bytes, offset, offset + MD5_BYTES_LENGTH);
//TODO: Replace this with a version that encodes without needing a copy.
String md5String = Hex.encodeHexString(md5BytesCopy);
return new MD5Digest(md5S... | java | public static MD5Digest fromBytes(byte[] md5Bytes, int offset) {
byte[] md5BytesCopy = Arrays.copyOfRange(md5Bytes, offset, offset + MD5_BYTES_LENGTH);
//TODO: Replace this with a version that encodes without needing a copy.
String md5String = Hex.encodeHexString(md5BytesCopy);
return new MD5Digest(md5S... | [
"public",
"static",
"MD5Digest",
"fromBytes",
"(",
"byte",
"[",
"]",
"md5Bytes",
",",
"int",
"offset",
")",
"{",
"byte",
"[",
"]",
"md5BytesCopy",
"=",
"Arrays",
".",
"copyOfRange",
"(",
"md5Bytes",
",",
"offset",
",",
"offset",
"+",
"MD5_BYTES_LENGTH",
")... | Static method to get an MD5Digest from a binary byte representation.
@param md5Bytes
@param offset in the byte array to start reading from
@return a filled out MD5Digest | [
"Static",
"method",
"to",
"get",
"an",
"MD5Digest",
"from",
"a",
"binary",
"byte",
"representation",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/kafka/serialize/MD5Digest.java#L86-L91 |
25,758 | apache/incubator-gobblin | gobblin-utility/src/main/java/org/apache/gobblin/util/request_allocation/ConcurrentBoundedPriorityIterable.java | ConcurrentBoundedPriorityIterable.add | public boolean add(T t) {
if (this.closed) {
throw new RuntimeException(
ConcurrentBoundedPriorityIterable.class.getSimpleName() + " is no longer accepting requests!");
}
AllocatedRequestsIteratorBase.RequestWithResourceRequirement<T> newElement =
new AllocatedRequestsIteratorBase.R... | java | public boolean add(T t) {
if (this.closed) {
throw new RuntimeException(
ConcurrentBoundedPriorityIterable.class.getSimpleName() + " is no longer accepting requests!");
}
AllocatedRequestsIteratorBase.RequestWithResourceRequirement<T> newElement =
new AllocatedRequestsIteratorBase.R... | [
"public",
"boolean",
"add",
"(",
"T",
"t",
")",
"{",
"if",
"(",
"this",
".",
"closed",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"ConcurrentBoundedPriorityIterable",
".",
"class",
".",
"getSimpleName",
"(",
")",
"+",
"\" is no longer accepting requests!... | Offer an element to the container.
@return true if the element was added, false if there was no space and we could not evict any elements to make it fit.
Note that the element may get evicted by future offers, so a return of true is not a guarantee that the
element will be present at any time in the future. | [
"Offer",
"an",
"element",
"to",
"the",
"container",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/request_allocation/ConcurrentBoundedPriorityIterable.java#L127-L141 |
25,759 | apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/hive/HiveDataset.java | HiveDataset.sortPartitions | public static List<Partition> sortPartitions(List<Partition> partitions) {
Collections.sort(partitions, new Comparator<Partition>() {
@Override
public int compare(Partition o1, Partition o2) {
return o1.getCompleteName().compareTo(o2.getCompleteName());
}
});
return partitions;
} | java | public static List<Partition> sortPartitions(List<Partition> partitions) {
Collections.sort(partitions, new Comparator<Partition>() {
@Override
public int compare(Partition o1, Partition o2) {
return o1.getCompleteName().compareTo(o2.getCompleteName());
}
});
return partitions;
} | [
"public",
"static",
"List",
"<",
"Partition",
">",
"sortPartitions",
"(",
"List",
"<",
"Partition",
">",
"partitions",
")",
"{",
"Collections",
".",
"sort",
"(",
"partitions",
",",
"new",
"Comparator",
"<",
"Partition",
">",
"(",
")",
"{",
"@",
"Override",... | Sort all partitions inplace on the basis of complete name ie dbName.tableName.partitionName | [
"Sort",
"all",
"partitions",
"inplace",
"on",
"the",
"basis",
"of",
"complete",
"name",
"ie",
"dbName",
".",
"tableName",
".",
"partitionName"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/hive/HiveDataset.java#L303-L311 |
25,760 | apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/hive/HiveDataset.java | HiveDataset.getPartitionsFromDataset | public List<Partition> getPartitionsFromDataset() throws IOException{
try (AutoReturnableObject<IMetaStoreClient> client = getClientPool().getClient()) {
List<Partition> partitions =
HiveUtils.getPartitions(client.get(), getTable(), Optional.<String>absent());
return sortPartitions(partitions)... | java | public List<Partition> getPartitionsFromDataset() throws IOException{
try (AutoReturnableObject<IMetaStoreClient> client = getClientPool().getClient()) {
List<Partition> partitions =
HiveUtils.getPartitions(client.get(), getTable(), Optional.<String>absent());
return sortPartitions(partitions)... | [
"public",
"List",
"<",
"Partition",
">",
"getPartitionsFromDataset",
"(",
")",
"throws",
"IOException",
"{",
"try",
"(",
"AutoReturnableObject",
"<",
"IMetaStoreClient",
">",
"client",
"=",
"getClientPool",
"(",
")",
".",
"getClient",
"(",
")",
")",
"{",
"List... | This method returns a sorted list of partitions. | [
"This",
"method",
"returns",
"a",
"sorted",
"list",
"of",
"partitions",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/hive/HiveDataset.java#L316-L322 |
25,761 | apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/ConcurrentBoundedWorkUnitList.java | ConcurrentBoundedWorkUnitList.addFileSet | public boolean addFileSet(FileSet<CopyEntity> fileSet, List<WorkUnit> workUnits) {
boolean addedWorkunits = addFileSetImpl(fileSet, workUnits);
if (!addedWorkunits) {
this.rejectedFileSet = true;
}
return addedWorkunits;
} | java | public boolean addFileSet(FileSet<CopyEntity> fileSet, List<WorkUnit> workUnits) {
boolean addedWorkunits = addFileSetImpl(fileSet, workUnits);
if (!addedWorkunits) {
this.rejectedFileSet = true;
}
return addedWorkunits;
} | [
"public",
"boolean",
"addFileSet",
"(",
"FileSet",
"<",
"CopyEntity",
">",
"fileSet",
",",
"List",
"<",
"WorkUnit",
">",
"workUnits",
")",
"{",
"boolean",
"addedWorkunits",
"=",
"addFileSetImpl",
"(",
"fileSet",
",",
"workUnits",
")",
";",
"if",
"(",
"!",
... | Add a file set to the container.
@param fileSet File set, expressed as a {@link org.apache.gobblin.data.management.partition.FileSet} of {@link CopyEntity}s.
@param workUnits List of {@link WorkUnit}s corresponding to this file set.
@return true if the file set was added to the container, false otherwise (i.e. has reac... | [
"Add",
"a",
"file",
"set",
"to",
"the",
"container",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/ConcurrentBoundedWorkUnitList.java#L108-L114 |
25,762 | apache/incubator-gobblin | gobblin-modules/gobblin-compliance/src/main/java/org/apache/gobblin/compliance/retention/HivePartitionVersionRetentionCleaner.java | HivePartitionVersionRetentionCleaner.clean | @Override
public void clean()
throws IOException {
Path versionLocation = ((HivePartitionRetentionVersion) this.datasetVersion).getLocation();
Path datasetLocation = ((CleanableHivePartitionDataset) this.cleanableDataset).getLocation();
String completeName = ((HivePartitionRetentionVersion) this.dat... | java | @Override
public void clean()
throws IOException {
Path versionLocation = ((HivePartitionRetentionVersion) this.datasetVersion).getLocation();
Path datasetLocation = ((CleanableHivePartitionDataset) this.cleanableDataset).getLocation();
String completeName = ((HivePartitionRetentionVersion) this.dat... | [
"@",
"Override",
"public",
"void",
"clean",
"(",
")",
"throws",
"IOException",
"{",
"Path",
"versionLocation",
"=",
"(",
"(",
"HivePartitionRetentionVersion",
")",
"this",
".",
"datasetVersion",
")",
".",
"getLocation",
"(",
")",
";",
"Path",
"datasetLocation",
... | If simulate is set to true, this will simply return.
If version is pointing to an empty location, drop the partition and close the jdbc connection.
If version is pointing to the same location as of the dataset, then drop the partition and close the jdbc connection.
If version is pointing to the non deletable version lo... | [
"If",
"simulate",
"is",
"set",
"to",
"true",
"this",
"will",
"simply",
"return",
".",
"If",
"version",
"is",
"pointing",
"to",
"an",
"empty",
"location",
"drop",
"the",
"partition",
"and",
"close",
"the",
"jdbc",
"connection",
".",
"If",
"version",
"is",
... | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-compliance/src/main/java/org/apache/gobblin/compliance/retention/HivePartitionVersionRetentionCleaner.java#L70-L102 |
25,763 | apache/incubator-gobblin | gobblin-utility/src/main/java/org/apache/gobblin/util/HiveJdbcConnector.java | HiveJdbcConnector.addHiveSiteDirToClasspath | private static void addHiveSiteDirToClasspath(String hiveSiteDir) {
LOG.info("Adding " + hiveSiteDir + " to CLASSPATH");
File f = new File(hiveSiteDir);
try {
URL u = f.toURI().toURL();
URLClassLoader urlClassLoader = (URLClassLoader) ClassLoader.getSystemClassLoader();
Class<URLClassLoade... | java | private static void addHiveSiteDirToClasspath(String hiveSiteDir) {
LOG.info("Adding " + hiveSiteDir + " to CLASSPATH");
File f = new File(hiveSiteDir);
try {
URL u = f.toURI().toURL();
URLClassLoader urlClassLoader = (URLClassLoader) ClassLoader.getSystemClassLoader();
Class<URLClassLoade... | [
"private",
"static",
"void",
"addHiveSiteDirToClasspath",
"(",
"String",
"hiveSiteDir",
")",
"{",
"LOG",
".",
"info",
"(",
"\"Adding \"",
"+",
"hiveSiteDir",
"+",
"\" to CLASSPATH\"",
")",
";",
"File",
"f",
"=",
"new",
"File",
"(",
"hiveSiteDir",
")",
";",
"... | Helper method to add the directory containing the hive-site.xml file to the classpath
@param hiveSiteDir is the path to to the folder containing the hive-site.xml file | [
"Helper",
"method",
"to",
"add",
"the",
"directory",
"containing",
"the",
"hive",
"-",
"site",
".",
"xml",
"file",
"to",
"the",
"classpath"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/HiveJdbcConnector.java#L195-L208 |
25,764 | apache/incubator-gobblin | gobblin-utility/src/main/java/org/apache/gobblin/util/HiveJdbcConnector.java | HiveJdbcConnector.choppedStatementNoLineChange | static String choppedStatementNoLineChange(String statement) {
// \r\n needs to be the first element in the pipe.
statement = statement.replaceAll("\\r\\n|\\r|\\n", " ");
if (statement.length() <= MAX_OUTPUT_STMT_LENGTH) {
return statement;
}
return statement.substring(0, MAX_OUTPUT_STMT_LENGT... | java | static String choppedStatementNoLineChange(String statement) {
// \r\n needs to be the first element in the pipe.
statement = statement.replaceAll("\\r\\n|\\r|\\n", " ");
if (statement.length() <= MAX_OUTPUT_STMT_LENGTH) {
return statement;
}
return statement.substring(0, MAX_OUTPUT_STMT_LENGT... | [
"static",
"String",
"choppedStatementNoLineChange",
"(",
"String",
"statement",
")",
"{",
"// \\r\\n needs to be the first element in the pipe.",
"statement",
"=",
"statement",
".",
"replaceAll",
"(",
"\"\\\\r\\\\n|\\\\r|\\\\n\"",
",",
"\" \"",
")",
";",
"if",
"(",
"state... | Chopped statements with all line-changing character being removed for saving space of log. | [
"Chopped",
"statements",
"with",
"all",
"line",
"-",
"changing",
"character",
"being",
"removed",
"for",
"saving",
"space",
"of",
"log",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/HiveJdbcConnector.java#L260-L268 |
25,765 | apache/incubator-gobblin | gobblin-service/src/main/java/org/apache/gobblin/service/modules/flow/MultiHopFlowCompiler.java | MultiHopFlowCompiler.addShutdownHook | private void addShutdownHook() {
ServiceManager manager = this.serviceManager;
Runtime.getRuntime().addShutdownHook(new Thread() {
public void run() {
// Give the services 5 seconds to stop to ensure that we are responsive to shutdown
// requests.
try {
manager.stopAsync(... | java | private void addShutdownHook() {
ServiceManager manager = this.serviceManager;
Runtime.getRuntime().addShutdownHook(new Thread() {
public void run() {
// Give the services 5 seconds to stop to ensure that we are responsive to shutdown
// requests.
try {
manager.stopAsync(... | [
"private",
"void",
"addShutdownHook",
"(",
")",
"{",
"ServiceManager",
"manager",
"=",
"this",
".",
"serviceManager",
";",
"Runtime",
".",
"getRuntime",
"(",
")",
".",
"addShutdownHook",
"(",
"new",
"Thread",
"(",
")",
"{",
"public",
"void",
"run",
"(",
")... | Register a shutdown hook for this thread. | [
"Register",
"a",
"shutdown",
"hook",
"for",
"this",
"thread",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-service/src/main/java/org/apache/gobblin/service/modules/flow/MultiHopFlowCompiler.java#L200-L213 |
25,766 | apache/incubator-gobblin | gobblin-core/src/main/java/org/apache/gobblin/policies/avro/AvroHeaderTimestampPolicy.java | AvroHeaderTimestampPolicy.executePolicy | @Override
public Result executePolicy(Object record) {
if (!(record instanceof GenericRecord)) {
return RowLevelPolicy.Result.FAILED;
}
GenericRecord header = (GenericRecord) ((GenericRecord) record).get("header");
if (header == null) {
return RowLevelPolicy.Result.FAILED;
}
if (h... | java | @Override
public Result executePolicy(Object record) {
if (!(record instanceof GenericRecord)) {
return RowLevelPolicy.Result.FAILED;
}
GenericRecord header = (GenericRecord) ((GenericRecord) record).get("header");
if (header == null) {
return RowLevelPolicy.Result.FAILED;
}
if (h... | [
"@",
"Override",
"public",
"Result",
"executePolicy",
"(",
"Object",
"record",
")",
"{",
"if",
"(",
"!",
"(",
"record",
"instanceof",
"GenericRecord",
")",
")",
"{",
"return",
"RowLevelPolicy",
".",
"Result",
".",
"FAILED",
";",
"}",
"GenericRecord",
"header... | Return PASS if the record has either header.time or header.timestamp field. | [
"Return",
"PASS",
"if",
"the",
"record",
"has",
"either",
"header",
".",
"time",
"or",
"header",
".",
"timestamp",
"field",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/policies/avro/AvroHeaderTimestampPolicy.java#L40-L54 |
25,767 | apache/incubator-gobblin | gobblin-core/src/main/java/org/apache/gobblin/source/extractor/extract/sftp/SftpFsHelper.java | SftpFsHelper.getSftpChannel | public ChannelSftp getSftpChannel() throws SftpException {
try {
ChannelSftp channelSftp = (ChannelSftp) this.session.openChannel("sftp");
channelSftp.connect();
return channelSftp;
} catch (JSchException e) {
throw new SftpException(0, "Cannot open a channel to SFTP server", e);
}
... | java | public ChannelSftp getSftpChannel() throws SftpException {
try {
ChannelSftp channelSftp = (ChannelSftp) this.session.openChannel("sftp");
channelSftp.connect();
return channelSftp;
} catch (JSchException e) {
throw new SftpException(0, "Cannot open a channel to SFTP server", e);
}
... | [
"public",
"ChannelSftp",
"getSftpChannel",
"(",
")",
"throws",
"SftpException",
"{",
"try",
"{",
"ChannelSftp",
"channelSftp",
"=",
"(",
"ChannelSftp",
")",
"this",
".",
"session",
".",
"openChannel",
"(",
"\"sftp\"",
")",
";",
"channelSftp",
".",
"connect",
"... | Create new channel every time a command needs to be executed. This is required to support execution of multiple
commands in parallel. All created channels are cleaned up when the session is closed.
@return a new {@link ChannelSftp}
@throws SftpException | [
"Create",
"new",
"channel",
"every",
"time",
"a",
"command",
"needs",
"to",
"be",
"executed",
".",
"This",
"is",
"required",
"to",
"support",
"execution",
"of",
"multiple",
"commands",
"in",
"parallel",
".",
"All",
"created",
"channels",
"are",
"cleaned",
"u... | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/source/extractor/extract/sftp/SftpFsHelper.java#L98-L107 |
25,768 | apache/incubator-gobblin | gobblin-core/src/main/java/org/apache/gobblin/source/extractor/extract/sftp/SftpFsHelper.java | SftpFsHelper.getExecChannel | public ChannelExec getExecChannel(String command) throws SftpException {
ChannelExec channelExec;
try {
channelExec = (ChannelExec) this.session.openChannel("exec");
channelExec.setCommand(command);
channelExec.connect();
return channelExec;
} catch (JSchException e) {
throw ne... | java | public ChannelExec getExecChannel(String command) throws SftpException {
ChannelExec channelExec;
try {
channelExec = (ChannelExec) this.session.openChannel("exec");
channelExec.setCommand(command);
channelExec.connect();
return channelExec;
} catch (JSchException e) {
throw ne... | [
"public",
"ChannelExec",
"getExecChannel",
"(",
"String",
"command",
")",
"throws",
"SftpException",
"{",
"ChannelExec",
"channelExec",
";",
"try",
"{",
"channelExec",
"=",
"(",
"ChannelExec",
")",
"this",
".",
"session",
".",
"openChannel",
"(",
"\"exec\"",
")"... | Create a new sftp channel to execute commands.
@param command to execute on the remote machine
@return a new execution channel
@throws SftpException if a channel could not be opened | [
"Create",
"a",
"new",
"sftp",
"channel",
"to",
"execute",
"commands",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/source/extractor/extract/sftp/SftpFsHelper.java#L116-L126 |
25,769 | apache/incubator-gobblin | gobblin-core/src/main/java/org/apache/gobblin/source/extractor/extract/sftp/SftpFsHelper.java | SftpFsHelper.connect | @Override
public void connect() throws FileBasedHelperException {
String privateKey = PasswordManager.getInstance(this.state)
.readPassword(this.state.getProp(ConfigurationKeys.SOURCE_CONN_PRIVATE_KEY));
String password = PasswordManager.getInstance(this.state)
.readPassword(this.state.getPro... | java | @Override
public void connect() throws FileBasedHelperException {
String privateKey = PasswordManager.getInstance(this.state)
.readPassword(this.state.getProp(ConfigurationKeys.SOURCE_CONN_PRIVATE_KEY));
String password = PasswordManager.getInstance(this.state)
.readPassword(this.state.getPro... | [
"@",
"Override",
"public",
"void",
"connect",
"(",
")",
"throws",
"FileBasedHelperException",
"{",
"String",
"privateKey",
"=",
"PasswordManager",
".",
"getInstance",
"(",
"this",
".",
"state",
")",
".",
"readPassword",
"(",
"this",
".",
"state",
".",
"getProp... | Opens up a connection to specified host using the username. Connects to the source using a private key without
prompting for a password. This method does not support connecting to a source using a password, only by private
key
@throws org.apache.gobblin.source.extractor.filebased.FileBasedHelperException | [
"Opens",
"up",
"a",
"connection",
"to",
"specified",
"host",
"using",
"the",
"username",
".",
"Connects",
"to",
"the",
"source",
"using",
"a",
"private",
"key",
"without",
"prompting",
"for",
"a",
"password",
".",
"This",
"method",
"does",
"not",
"support",
... | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/source/extractor/extract/sftp/SftpFsHelper.java#L134-L201 |
25,770 | apache/incubator-gobblin | gobblin-core/src/main/java/org/apache/gobblin/source/extractor/extract/sftp/SftpFsHelper.java | SftpFsHelper.getFileStream | @Override
public InputStream getFileStream(String file) throws FileBasedHelperException {
SftpGetMonitor monitor = new SftpGetMonitor();
try {
ChannelSftp channel = getSftpChannel();
return new SftpFsFileInputStream(channel.get(file, monitor), channel);
} catch (SftpException e) {
throw ... | java | @Override
public InputStream getFileStream(String file) throws FileBasedHelperException {
SftpGetMonitor monitor = new SftpGetMonitor();
try {
ChannelSftp channel = getSftpChannel();
return new SftpFsFileInputStream(channel.get(file, monitor), channel);
} catch (SftpException e) {
throw ... | [
"@",
"Override",
"public",
"InputStream",
"getFileStream",
"(",
"String",
"file",
")",
"throws",
"FileBasedHelperException",
"{",
"SftpGetMonitor",
"monitor",
"=",
"new",
"SftpGetMonitor",
"(",
")",
";",
"try",
"{",
"ChannelSftp",
"channel",
"=",
"getSftpChannel",
... | Executes a get SftpCommand and returns an input stream to the file
@param cmd is the command to execute
@param sftp is the channel to execute the command on
@throws SftpException | [
"Executes",
"a",
"get",
"SftpCommand",
"and",
"returns",
"an",
"input",
"stream",
"to",
"the",
"file"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/source/extractor/extract/sftp/SftpFsHelper.java#L209-L218 |
25,771 | apache/incubator-gobblin | gobblin-api/src/main/java/org/apache/gobblin/dataset/DatasetDescriptor.java | DatasetDescriptor.toDataMap | @Deprecated
public Map<String, String> toDataMap() {
Map<String, String> map = Maps.newHashMap();
map.put(PLATFORM_KEY, platform);
map.put(NAME_KEY, getName());
map.putAll(metadata);
return map;
} | java | @Deprecated
public Map<String, String> toDataMap() {
Map<String, String> map = Maps.newHashMap();
map.put(PLATFORM_KEY, platform);
map.put(NAME_KEY, getName());
map.putAll(metadata);
return map;
} | [
"@",
"Deprecated",
"public",
"Map",
"<",
"String",
",",
"String",
">",
"toDataMap",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"map",
"=",
"Maps",
".",
"newHashMap",
"(",
")",
";",
"map",
".",
"put",
"(",
"PLATFORM_KEY",
",",
"platform"... | Serialize to a string map
@deprecated use {@link Descriptor#serialize(Descriptor)} | [
"Serialize",
"to",
"a",
"string",
"map"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-api/src/main/java/org/apache/gobblin/dataset/DatasetDescriptor.java#L81-L88 |
25,772 | apache/incubator-gobblin | gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnAppSecurityManager.java | YarnAppSecurityManager.renewDelegationToken | private synchronized void renewDelegationToken() throws IOException, InterruptedException {
this.token.renew(this.fs.getConf());
writeDelegationTokenToFile();
if (!this.firstLogin) {
// Send a message to the controller and all the participants if this is not the first login
sendTokenFileUpdated... | java | private synchronized void renewDelegationToken() throws IOException, InterruptedException {
this.token.renew(this.fs.getConf());
writeDelegationTokenToFile();
if (!this.firstLogin) {
// Send a message to the controller and all the participants if this is not the first login
sendTokenFileUpdated... | [
"private",
"synchronized",
"void",
"renewDelegationToken",
"(",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"this",
".",
"token",
".",
"renew",
"(",
"this",
".",
"fs",
".",
"getConf",
"(",
")",
")",
";",
"writeDelegationTokenToFile",
"(",
"... | Renew the existing delegation token. | [
"Renew",
"the",
"existing",
"delegation",
"token",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnAppSecurityManager.java#L188-L197 |
25,773 | apache/incubator-gobblin | gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnAppSecurityManager.java | YarnAppSecurityManager.loginFromKeytab | private void loginFromKeytab() throws IOException {
String keyTabFilePath = this.config.getString(GobblinYarnConfigurationKeys.KEYTAB_FILE_PATH);
if (Strings.isNullOrEmpty(keyTabFilePath)) {
throw new IOException("Keytab file path is not defined for Kerberos login");
}
if (!new File(keyTabFilePat... | java | private void loginFromKeytab() throws IOException {
String keyTabFilePath = this.config.getString(GobblinYarnConfigurationKeys.KEYTAB_FILE_PATH);
if (Strings.isNullOrEmpty(keyTabFilePath)) {
throw new IOException("Keytab file path is not defined for Kerberos login");
}
if (!new File(keyTabFilePat... | [
"private",
"void",
"loginFromKeytab",
"(",
")",
"throws",
"IOException",
"{",
"String",
"keyTabFilePath",
"=",
"this",
".",
"config",
".",
"getString",
"(",
"GobblinYarnConfigurationKeys",
".",
"KEYTAB_FILE_PATH",
")",
";",
"if",
"(",
"Strings",
".",
"isNullOrEmpt... | Login the user from a given keytab file. | [
"Login",
"the",
"user",
"from",
"a",
"given",
"keytab",
"file",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnAppSecurityManager.java#L210-L242 |
25,774 | apache/incubator-gobblin | gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnAppSecurityManager.java | YarnAppSecurityManager.writeDelegationTokenToFile | @VisibleForTesting
synchronized void writeDelegationTokenToFile() throws IOException {
if (this.fs.exists(this.tokenFilePath)) {
LOGGER.info("Deleting existing token file " + this.tokenFilePath);
this.fs.delete(this.tokenFilePath, false);
}
LOGGER.info("Writing new or renewed token to token f... | java | @VisibleForTesting
synchronized void writeDelegationTokenToFile() throws IOException {
if (this.fs.exists(this.tokenFilePath)) {
LOGGER.info("Deleting existing token file " + this.tokenFilePath);
this.fs.delete(this.tokenFilePath, false);
}
LOGGER.info("Writing new or renewed token to token f... | [
"@",
"VisibleForTesting",
"synchronized",
"void",
"writeDelegationTokenToFile",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"this",
".",
"fs",
".",
"exists",
"(",
"this",
".",
"tokenFilePath",
")",
")",
"{",
"LOGGER",
".",
"info",
"(",
"\"Deleting exist... | Write the current delegation token to the token file. | [
"Write",
"the",
"current",
"delegation",
"token",
"to",
"the",
"token",
"file",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnAppSecurityManager.java#L247-L258 |
25,775 | apache/incubator-gobblin | gobblin-modules/gobblin-crypto/src/main/java/org/apache/gobblin/crypto/GPGFileEncryptor.java | GPGFileEncryptor.symmetricKeyAlgorithmNameToTag | private static int symmetricKeyAlgorithmNameToTag(String cipherName) {
// Use CAST5 if no cipher specified
if (StringUtils.isEmpty(cipherName)) {
return PGPEncryptedData.CAST5;
}
Set<Field> fields = ReflectionUtils.getAllFields(PGPEncryptedData.class, ReflectionUtils.withName(cipherName));
i... | java | private static int symmetricKeyAlgorithmNameToTag(String cipherName) {
// Use CAST5 if no cipher specified
if (StringUtils.isEmpty(cipherName)) {
return PGPEncryptedData.CAST5;
}
Set<Field> fields = ReflectionUtils.getAllFields(PGPEncryptedData.class, ReflectionUtils.withName(cipherName));
i... | [
"private",
"static",
"int",
"symmetricKeyAlgorithmNameToTag",
"(",
"String",
"cipherName",
")",
"{",
"// Use CAST5 if no cipher specified",
"if",
"(",
"StringUtils",
".",
"isEmpty",
"(",
"cipherName",
")",
")",
"{",
"return",
"PGPEncryptedData",
".",
"CAST5",
";",
"... | Convert a string cipher name to the integer tag used by GPG
@param cipherName the cipher name
@return integer tag for the cipher | [
"Convert",
"a",
"string",
"cipher",
"name",
"to",
"the",
"integer",
"tag",
"used",
"by",
"GPG"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-crypto/src/main/java/org/apache/gobblin/crypto/GPGFileEncryptor.java#L143-L160 |
25,776 | apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/data/management/retention/source/DatasetCleanerSource.java | DatasetCleanerSource.getWorkunits | @Override
public List<WorkUnit> getWorkunits(SourceState state) {
List<WorkUnit> workUnits = Lists.newArrayList();
Config config = ConfigUtils.propertiesToConfig(state.getProperties());
Config sourceConfig = ConfigUtils.getConfigOrEmpty(config, DATASET_CLEANER_SOURCE_PREFIX);
List<String> configuratio... | java | @Override
public List<WorkUnit> getWorkunits(SourceState state) {
List<WorkUnit> workUnits = Lists.newArrayList();
Config config = ConfigUtils.propertiesToConfig(state.getProperties());
Config sourceConfig = ConfigUtils.getConfigOrEmpty(config, DATASET_CLEANER_SOURCE_PREFIX);
List<String> configuratio... | [
"@",
"Override",
"public",
"List",
"<",
"WorkUnit",
">",
"getWorkunits",
"(",
"SourceState",
"state",
")",
"{",
"List",
"<",
"WorkUnit",
">",
"workUnits",
"=",
"Lists",
".",
"newArrayList",
"(",
")",
";",
"Config",
"config",
"=",
"ConfigUtils",
".",
"prope... | Create a work unit for each configuration defined or a single work unit if no configurations are defined
@param state see {@link org.apache.gobblin.configuration.SourceState}
@return list of workunits | [
"Create",
"a",
"work",
"unit",
"for",
"each",
"configuration",
"defined",
"or",
"a",
"single",
"work",
"unit",
"if",
"no",
"configurations",
"are",
"defined"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/retention/source/DatasetCleanerSource.java#L69-L95 |
25,777 | apache/incubator-gobblin | gobblin-modules/gobblin-eventhub/src/main/java/org/apache/gobblin/eventhub/writer/EventhubDataWriter.java | EventhubDataWriter.write | public Future<WriteResponse> write (Batch<String> batch, WriteCallback callback) {
Timer.Context context = writeTimer.time();
int returnCode = 0;
LOG.info ("Dispatching batch " + batch.getId());
recordsAttempted.mark(batch.getRecords().size());
try {
String encoded = encodeBatch(batch);
... | java | public Future<WriteResponse> write (Batch<String> batch, WriteCallback callback) {
Timer.Context context = writeTimer.time();
int returnCode = 0;
LOG.info ("Dispatching batch " + batch.getId());
recordsAttempted.mark(batch.getRecords().size());
try {
String encoded = encodeBatch(batch);
... | [
"public",
"Future",
"<",
"WriteResponse",
">",
"write",
"(",
"Batch",
"<",
"String",
">",
"batch",
",",
"WriteCallback",
"callback",
")",
"{",
"Timer",
".",
"Context",
"context",
"=",
"writeTimer",
".",
"time",
"(",
")",
";",
"int",
"returnCode",
"=",
"0... | Write a whole batch to eventhub | [
"Write",
"a",
"whole",
"batch",
"to",
"eventhub"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-eventhub/src/main/java/org/apache/gobblin/eventhub/writer/EventhubDataWriter.java#L153-L174 |
25,778 | apache/incubator-gobblin | gobblin-modules/gobblin-eventhub/src/main/java/org/apache/gobblin/eventhub/writer/EventhubDataWriter.java | EventhubDataWriter.write | public WriteResponse write (String record) throws IOException {
recordsAttempted.mark();
String encoded = encodeRecord(record);
int returnCode = request (encoded);
recordsSuccess.mark();
bytesWritten.mark(encoded.length());
return WRITE_RESPONSE_WRAPPER.wrap(returnCode);
} | java | public WriteResponse write (String record) throws IOException {
recordsAttempted.mark();
String encoded = encodeRecord(record);
int returnCode = request (encoded);
recordsSuccess.mark();
bytesWritten.mark(encoded.length());
return WRITE_RESPONSE_WRAPPER.wrap(returnCode);
} | [
"public",
"WriteResponse",
"write",
"(",
"String",
"record",
")",
"throws",
"IOException",
"{",
"recordsAttempted",
".",
"mark",
"(",
")",
";",
"String",
"encoded",
"=",
"encodeRecord",
"(",
"record",
")",
";",
"int",
"returnCode",
"=",
"request",
"(",
"enco... | Write a single record to eventhub | [
"Write",
"a",
"single",
"record",
"to",
"eventhub"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-eventhub/src/main/java/org/apache/gobblin/eventhub/writer/EventhubDataWriter.java#L179-L186 |
25,779 | apache/incubator-gobblin | gobblin-modules/gobblin-eventhub/src/main/java/org/apache/gobblin/eventhub/writer/EventhubDataWriter.java | EventhubDataWriter.refreshSignature | public void refreshSignature () {
if (postStartTimestamp == 0 || (System.nanoTime() - postStartTimestamp) > Duration.ofMinutes(sigExpireInMinute).toNanos()) {
// generate signature
try {
signature = SharedAccessSignatureTokenProvider
.generateSharedAccessSignature(sasKeyName, sasKey,... | java | public void refreshSignature () {
if (postStartTimestamp == 0 || (System.nanoTime() - postStartTimestamp) > Duration.ofMinutes(sigExpireInMinute).toNanos()) {
// generate signature
try {
signature = SharedAccessSignatureTokenProvider
.generateSharedAccessSignature(sasKeyName, sasKey,... | [
"public",
"void",
"refreshSignature",
"(",
")",
"{",
"if",
"(",
"postStartTimestamp",
"==",
"0",
"||",
"(",
"System",
".",
"nanoTime",
"(",
")",
"-",
"postStartTimestamp",
")",
">",
"Duration",
".",
"ofMinutes",
"(",
"sigExpireInMinute",
")",
".",
"toNanos",... | A signature which contains the duration.
After the duration is expired, the signature becomes invalid | [
"A",
"signature",
"which",
"contains",
"the",
"duration",
".",
"After",
"the",
"duration",
"is",
"expired",
"the",
"signature",
"becomes",
"invalid"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-eventhub/src/main/java/org/apache/gobblin/eventhub/writer/EventhubDataWriter.java#L192-L204 |
25,780 | apache/incubator-gobblin | gobblin-modules/gobblin-eventhub/src/main/java/org/apache/gobblin/eventhub/writer/EventhubDataWriter.java | EventhubDataWriter.request | private int request (String encoded) throws IOException {
refreshSignature();
HttpPost httpPost = new HttpPost(targetURI);
httpPost.setHeader("Content-type", "application/vnd.microsoft.servicebus.json");
httpPost.setHeader("Authorization", signature);
httpPost.setHeader("Host", namespaceName + ".ser... | java | private int request (String encoded) throws IOException {
refreshSignature();
HttpPost httpPost = new HttpPost(targetURI);
httpPost.setHeader("Content-type", "application/vnd.microsoft.servicebus.json");
httpPost.setHeader("Authorization", signature);
httpPost.setHeader("Host", namespaceName + ".ser... | [
"private",
"int",
"request",
"(",
"String",
"encoded",
")",
"throws",
"IOException",
"{",
"refreshSignature",
"(",
")",
";",
"HttpPost",
"httpPost",
"=",
"new",
"HttpPost",
"(",
"targetURI",
")",
";",
"httpPost",
".",
"setHeader",
"(",
"\"Content-type\"",
",",... | Send an encoded string to the Eventhub using post method | [
"Send",
"an",
"encoded",
"string",
"to",
"the",
"Eventhub",
"using",
"post",
"method"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-eventhub/src/main/java/org/apache/gobblin/eventhub/writer/EventhubDataWriter.java#L209-L233 |
25,781 | apache/incubator-gobblin | gobblin-modules/gobblin-eventhub/src/main/java/org/apache/gobblin/eventhub/writer/EventhubDataWriter.java | EventhubDataWriter.encodeBatch | private String encodeBatch (Batch<String> batch) throws IOException {
// Convert original json object to a new json object with format {"Body": "originalJson"}
// Add new json object to an array and send the whole array to eventhub using REST api
// Refer to https://docs.microsoft.com/en-us/rest/api/eventhu... | java | private String encodeBatch (Batch<String> batch) throws IOException {
// Convert original json object to a new json object with format {"Body": "originalJson"}
// Add new json object to an array and send the whole array to eventhub using REST api
// Refer to https://docs.microsoft.com/en-us/rest/api/eventhu... | [
"private",
"String",
"encodeBatch",
"(",
"Batch",
"<",
"String",
">",
"batch",
")",
"throws",
"IOException",
"{",
"// Convert original json object to a new json object with format {\"Body\": \"originalJson\"}",
"// Add new json object to an array and send the whole array to eventhub usin... | Each record of batch is wrapped by a 'Body' json object
put this new object into an array, encode the whole array | [
"Each",
"record",
"of",
"batch",
"is",
"wrapped",
"by",
"a",
"Body",
"json",
"object",
"put",
"this",
"new",
"object",
"into",
"an",
"array",
"encode",
"the",
"whole",
"array"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-eventhub/src/main/java/org/apache/gobblin/eventhub/writer/EventhubDataWriter.java#L239-L251 |
25,782 | apache/incubator-gobblin | gobblin-modules/gobblin-eventhub/src/main/java/org/apache/gobblin/eventhub/writer/EventhubDataWriter.java | EventhubDataWriter.encodeRecord | private String encodeRecord (String record)throws IOException {
// Convert original json object to a new json object with format {"Body": "originalJson"}
// Add new json object to an array and send the whole array to eventhub using REST api
// Refer to https://docs.microsoft.com/en-us/rest/api/eventhub/sen... | java | private String encodeRecord (String record)throws IOException {
// Convert original json object to a new json object with format {"Body": "originalJson"}
// Add new json object to an array and send the whole array to eventhub using REST api
// Refer to https://docs.microsoft.com/en-us/rest/api/eventhub/sen... | [
"private",
"String",
"encodeRecord",
"(",
"String",
"record",
")",
"throws",
"IOException",
"{",
"// Convert original json object to a new json object with format {\"Body\": \"originalJson\"}",
"// Add new json object to an array and send the whole array to eventhub using REST api",
"// Refe... | A single record is wrapped by a 'Body' json object
encode this json object | [
"A",
"single",
"record",
"is",
"wrapped",
"by",
"a",
"Body",
"json",
"object",
"encode",
"this",
"json",
"object"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-eventhub/src/main/java/org/apache/gobblin/eventhub/writer/EventhubDataWriter.java#L257-L265 |
25,783 | apache/incubator-gobblin | gobblin-core-base/src/main/java/org/apache/gobblin/writer/FineGrainedWatermarkTracker.java | FineGrainedWatermarkTracker.checkStability | private void checkStability() {
if ((_watermarksInserted.getCount() - _watermarksSwept.getCount()) > _watermarkLagThreshold) {
log.error("Setting abort flag for Watermark tracking because the lag between the "
+ "watermarksInserted: {} and watermarksSwept: {} is greater than the threshold: {}",
... | java | private void checkStability() {
if ((_watermarksInserted.getCount() - _watermarksSwept.getCount()) > _watermarkLagThreshold) {
log.error("Setting abort flag for Watermark tracking because the lag between the "
+ "watermarksInserted: {} and watermarksSwept: {} is greater than the threshold: {}",
... | [
"private",
"void",
"checkStability",
"(",
")",
"{",
"if",
"(",
"(",
"_watermarksInserted",
".",
"getCount",
"(",
")",
"-",
"_watermarksSwept",
".",
"getCount",
"(",
")",
")",
">",
"_watermarkLagThreshold",
")",
"{",
"log",
".",
"error",
"(",
"\"Setting abort... | Check if the memory footprint of the data structure is within bounds | [
"Check",
"if",
"the",
"memory",
"footprint",
"of",
"the",
"data",
"structure",
"is",
"within",
"bounds"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core-base/src/main/java/org/apache/gobblin/writer/FineGrainedWatermarkTracker.java#L173-L180 |
25,784 | apache/incubator-gobblin | gobblin-core-base/src/main/java/org/apache/gobblin/writer/FineGrainedWatermarkTracker.java | FineGrainedWatermarkTracker.start | public synchronized void start() {
if (!_started.get()) {
_executorService = new ScheduledThreadPoolExecutor(1,
ExecutorsUtils.newThreadFactory(Optional.of(LoggerFactory.getLogger(FineGrainedWatermarkTracker.class))));
_executorService.scheduleAtFixedRate(_sweeper, 0, _sweepIntervalMillis, Tim... | java | public synchronized void start() {
if (!_started.get()) {
_executorService = new ScheduledThreadPoolExecutor(1,
ExecutorsUtils.newThreadFactory(Optional.of(LoggerFactory.getLogger(FineGrainedWatermarkTracker.class))));
_executorService.scheduleAtFixedRate(_sweeper, 0, _sweepIntervalMillis, Tim... | [
"public",
"synchronized",
"void",
"start",
"(",
")",
"{",
"if",
"(",
"!",
"_started",
".",
"get",
"(",
")",
")",
"{",
"_executorService",
"=",
"new",
"ScheduledThreadPoolExecutor",
"(",
"1",
",",
"ExecutorsUtils",
".",
"newThreadFactory",
"(",
"Optional",
".... | Schedule the sweeper and stability checkers | [
"Schedule",
"the",
"sweeper",
"and",
"stability",
"checkers"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core-base/src/main/java/org/apache/gobblin/writer/FineGrainedWatermarkTracker.java#L225-L233 |
25,785 | apache/incubator-gobblin | gobblin-core-base/src/main/java/org/apache/gobblin/writer/FineGrainedWatermarkTracker.java | FineGrainedWatermarkTracker.sweep | @VisibleForTesting
synchronized int sweep() {
long startTime = System.nanoTime();
int swept = 0;
for (Map.Entry<String, Deque<AcknowledgableWatermark>> entry : _watermarksMap.entrySet()) {
Deque<AcknowledgableWatermark> watermarks = entry.getValue();
/**
* Keep popping acked elements fr... | java | @VisibleForTesting
synchronized int sweep() {
long startTime = System.nanoTime();
int swept = 0;
for (Map.Entry<String, Deque<AcknowledgableWatermark>> entry : _watermarksMap.entrySet()) {
Deque<AcknowledgableWatermark> watermarks = entry.getValue();
/**
* Keep popping acked elements fr... | [
"@",
"VisibleForTesting",
"synchronized",
"int",
"sweep",
"(",
")",
"{",
"long",
"startTime",
"=",
"System",
".",
"nanoTime",
"(",
")",
";",
"int",
"swept",
"=",
"0",
";",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"Deque",
"<",
"Acknowledgab... | A helper method to garbage collect acknowledged watermarks
@return number of elements collected | [
"A",
"helper",
"method",
"to",
"garbage",
"collect",
"acknowledged",
"watermarks"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core-base/src/main/java/org/apache/gobblin/writer/FineGrainedWatermarkTracker.java#L251-L294 |
25,786 | apache/incubator-gobblin | gobblin-api/src/main/java/org/apache/gobblin/dataset/PartitionDescriptor.java | PartitionDescriptor.toPartitionJsonList | public static String toPartitionJsonList(List<PartitionDescriptor> descriptors) {
return Descriptor.GSON.toJson(descriptors, DESCRIPTOR_LIST_TYPE);
} | java | public static String toPartitionJsonList(List<PartitionDescriptor> descriptors) {
return Descriptor.GSON.toJson(descriptors, DESCRIPTOR_LIST_TYPE);
} | [
"public",
"static",
"String",
"toPartitionJsonList",
"(",
"List",
"<",
"PartitionDescriptor",
">",
"descriptors",
")",
"{",
"return",
"Descriptor",
".",
"GSON",
".",
"toJson",
"(",
"descriptors",
",",
"DESCRIPTOR_LIST_TYPE",
")",
";",
"}"
] | Serialize a list of partition descriptors as json string | [
"Serialize",
"a",
"list",
"of",
"partition",
"descriptors",
"as",
"json",
"string"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-api/src/main/java/org/apache/gobblin/dataset/PartitionDescriptor.java#L77-L79 |
25,787 | apache/incubator-gobblin | gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/CompactionJobConfigurator.java | CompactionJobConfigurator.createJob | public Job createJob(FileSystemDataset dataset) throws IOException {
Configuration conf = HadoopUtils.getConfFromState(state);
// Turn on mapreduce output compression by default
if (conf.get("mapreduce.output.fileoutputformat.compress") == null && conf.get("mapred.output.compress") == null) {
conf.se... | java | public Job createJob(FileSystemDataset dataset) throws IOException {
Configuration conf = HadoopUtils.getConfFromState(state);
// Turn on mapreduce output compression by default
if (conf.get("mapreduce.output.fileoutputformat.compress") == null && conf.get("mapred.output.compress") == null) {
conf.se... | [
"public",
"Job",
"createJob",
"(",
"FileSystemDataset",
"dataset",
")",
"throws",
"IOException",
"{",
"Configuration",
"conf",
"=",
"HadoopUtils",
".",
"getConfFromState",
"(",
"state",
")",
";",
"// Turn on mapreduce output compression by default",
"if",
"(",
"conf",
... | Customized MR job creation for Avro.
@param dataset A path or directory which needs compaction
@return A configured map-reduce job for avro compaction | [
"Customized",
"MR",
"job",
"creation",
"for",
"Avro",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/CompactionJobConfigurator.java#L125-L155 |
25,788 | apache/incubator-gobblin | gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/CompactionJobConfigurator.java | CompactionJobConfigurator.concatPaths | private Path concatPaths(String... names) {
if (names == null || names.length == 0) {
return null;
}
Path cur = new Path(names[0]);
for (int i = 1; i < names.length; ++i) {
cur = new Path(cur, new Path(names[i]));
}
return cur;
} | java | private Path concatPaths(String... names) {
if (names == null || names.length == 0) {
return null;
}
Path cur = new Path(names[0]);
for (int i = 1; i < names.length; ++i) {
cur = new Path(cur, new Path(names[i]));
}
return cur;
} | [
"private",
"Path",
"concatPaths",
"(",
"String",
"...",
"names",
")",
"{",
"if",
"(",
"names",
"==",
"null",
"||",
"names",
".",
"length",
"==",
"0",
")",
"{",
"return",
"null",
";",
"}",
"Path",
"cur",
"=",
"new",
"Path",
"(",
"names",
"[",
"0",
... | Concatenate multiple directory or file names into one path
@return Concatenated path or null if the parameter is empty | [
"Concatenate",
"multiple",
"directory",
"or",
"file",
"names",
"into",
"one",
"path"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/CompactionJobConfigurator.java#L263-L272 |
25,789 | apache/incubator-gobblin | gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/CompactionJobConfigurator.java | CompactionJobConfigurator.getGranularInputPaths | protected Collection<Path> getGranularInputPaths(Path path) throws IOException {
boolean appendDelta = this.state.getPropAsBoolean(MRCompactor.COMPACTION_RENAME_SOURCE_DIR_ENABLED,
MRCompactor.DEFAULT_COMPACTION_RENAME_SOURCE_DIR_ENABLED);
Set<Path> uncompacted = Sets.newHashSet();
Set<Path> total... | java | protected Collection<Path> getGranularInputPaths(Path path) throws IOException {
boolean appendDelta = this.state.getPropAsBoolean(MRCompactor.COMPACTION_RENAME_SOURCE_DIR_ENABLED,
MRCompactor.DEFAULT_COMPACTION_RENAME_SOURCE_DIR_ENABLED);
Set<Path> uncompacted = Sets.newHashSet();
Set<Path> total... | [
"protected",
"Collection",
"<",
"Path",
">",
"getGranularInputPaths",
"(",
"Path",
"path",
")",
"throws",
"IOException",
"{",
"boolean",
"appendDelta",
"=",
"this",
".",
"state",
".",
"getPropAsBoolean",
"(",
"MRCompactor",
".",
"COMPACTION_RENAME_SOURCE_DIR_ENABLED",... | Converts a top level input path to a group of sub-paths according to user defined granularity.
This may be required because if upstream application generates many sub-paths but the map-reduce
job only keeps track of the top level path, after the job is done, we won't be able to tell if
those new arriving sub-paths is p... | [
"Converts",
"a",
"top",
"level",
"input",
"path",
"to",
"a",
"group",
"of",
"sub",
"-",
"paths",
"according",
"to",
"user",
"defined",
"granularity",
".",
"This",
"may",
"be",
"required",
"because",
"if",
"upstream",
"application",
"generates",
"many",
"sub"... | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/CompactionJobConfigurator.java#L286-L315 |
25,790 | apache/incubator-gobblin | gobblin-api/src/main/java/org/apache/gobblin/fork/CopyHelper.java | CopyHelper.isImmutableType | private static boolean isImmutableType(Object thing) {
return ((thing == null)
|| (thing instanceof String)
|| (thing instanceof Integer)
|| (thing instanceof Long));
} | java | private static boolean isImmutableType(Object thing) {
return ((thing == null)
|| (thing instanceof String)
|| (thing instanceof Integer)
|| (thing instanceof Long));
} | [
"private",
"static",
"boolean",
"isImmutableType",
"(",
"Object",
"thing",
")",
"{",
"return",
"(",
"(",
"thing",
"==",
"null",
")",
"||",
"(",
"thing",
"instanceof",
"String",
")",
"||",
"(",
"thing",
"instanceof",
"Integer",
")",
"||",
"(",
"thing",
"i... | Contains a collection of supported immutable types for copying.
Only keep the types that are worth supporting as record types.
@param thing: an Object being checked
@return true if supported immutable type, false otherwise | [
"Contains",
"a",
"collection",
"of",
"supported",
"immutable",
"types",
"for",
"copying",
".",
"Only",
"keep",
"the",
"types",
"that",
"are",
"worth",
"supporting",
"as",
"record",
"types",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-api/src/main/java/org/apache/gobblin/fork/CopyHelper.java#L47-L52 |
25,791 | apache/incubator-gobblin | gobblin-api/src/main/java/org/apache/gobblin/fork/CopyHelper.java | CopyHelper.copy | public static Object copy(Object thing) throws CopyNotSupportedException {
if (!isCopyable(thing)) {
throw new CopyNotSupportedException(thing.getClass().getName() + " cannot be copied. See Copyable");
}
if (thing instanceof Copyable) {
return ((Copyable) thing).copy();
}
// Support for ... | java | public static Object copy(Object thing) throws CopyNotSupportedException {
if (!isCopyable(thing)) {
throw new CopyNotSupportedException(thing.getClass().getName() + " cannot be copied. See Copyable");
}
if (thing instanceof Copyable) {
return ((Copyable) thing).copy();
}
// Support for ... | [
"public",
"static",
"Object",
"copy",
"(",
"Object",
"thing",
")",
"throws",
"CopyNotSupportedException",
"{",
"if",
"(",
"!",
"isCopyable",
"(",
"thing",
")",
")",
"{",
"throw",
"new",
"CopyNotSupportedException",
"(",
"thing",
".",
"getClass",
"(",
")",
".... | Copy this object if needed.
@param thing : this object that needs to be copied
@return: a possibly copied instance
@throws CopyNotSupportedException if thing needs to be copied but cannot be | [
"Copy",
"this",
"object",
"if",
"needed",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-api/src/main/java/org/apache/gobblin/fork/CopyHelper.java#L60-L76 |
25,792 | apache/incubator-gobblin | gobblin-admin/src/main/java/org/apache/gobblin/cli/JobInfoPrintUtils.java | JobInfoPrintUtils.printJobRuns | public static void printJobRuns(List<JobExecutionInfo> jobExecutionInfos) {
if (jobExecutionInfos == null) {
System.err.println("No job executions found.");
System.exit(1);
}
List<String> labels = Arrays.asList("Job Id", "State", "Schedule", "Completed Tasks", "Launched ... | java | public static void printJobRuns(List<JobExecutionInfo> jobExecutionInfos) {
if (jobExecutionInfos == null) {
System.err.println("No job executions found.");
System.exit(1);
}
List<String> labels = Arrays.asList("Job Id", "State", "Schedule", "Completed Tasks", "Launched ... | [
"public",
"static",
"void",
"printJobRuns",
"(",
"List",
"<",
"JobExecutionInfo",
">",
"jobExecutionInfos",
")",
"{",
"if",
"(",
"jobExecutionInfos",
"==",
"null",
")",
"{",
"System",
".",
"err",
".",
"println",
"(",
"\"No job executions found.\"",
")",
";",
"... | Print a table describing a bunch of individual job executions.
@param jobExecutionInfos Job execution status to print | [
"Print",
"a",
"table",
"describing",
"a",
"bunch",
"of",
"individual",
"job",
"executions",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-admin/src/main/java/org/apache/gobblin/cli/JobInfoPrintUtils.java#L71-L101 |
25,793 | apache/incubator-gobblin | gobblin-admin/src/main/java/org/apache/gobblin/cli/JobInfoPrintUtils.java | JobInfoPrintUtils.printAllJobs | public static void printAllJobs(List<JobExecutionInfo> jobExecutionInfos, int resultsLimit) {
if (jobExecutionInfos == null) {
System.err.println("No jobs found.");
System.exit(1);
}
List<String> labels = Arrays.asList("Job Name", "State", "Last Run Started", "Last Run C... | java | public static void printAllJobs(List<JobExecutionInfo> jobExecutionInfos, int resultsLimit) {
if (jobExecutionInfos == null) {
System.err.println("No jobs found.");
System.exit(1);
}
List<String> labels = Arrays.asList("Job Name", "State", "Last Run Started", "Last Run C... | [
"public",
"static",
"void",
"printAllJobs",
"(",
"List",
"<",
"JobExecutionInfo",
">",
"jobExecutionInfos",
",",
"int",
"resultsLimit",
")",
"{",
"if",
"(",
"jobExecutionInfos",
"==",
"null",
")",
"{",
"System",
".",
"err",
".",
"println",
"(",
"\"No jobs foun... | Print summary information about a bunch of jobs in the system
@param jobExecutionInfos List of jobs
@param resultsLimit original result limit | [
"Print",
"summary",
"information",
"about",
"a",
"bunch",
"of",
"jobs",
"in",
"the",
"system"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-admin/src/main/java/org/apache/gobblin/cli/JobInfoPrintUtils.java#L108-L165 |
25,794 | apache/incubator-gobblin | gobblin-admin/src/main/java/org/apache/gobblin/cli/JobInfoPrintUtils.java | JobInfoPrintUtils.printJob | public static void printJob(Optional<JobExecutionInfo> jobExecutionInfoOptional) {
if (!jobExecutionInfoOptional.isPresent()) {
System.err.println("Job id not found.");
return;
}
JobExecutionInfo jobExecutionInfo = jobExecutionInfoOptional.get();
List<List<String... | java | public static void printJob(Optional<JobExecutionInfo> jobExecutionInfoOptional) {
if (!jobExecutionInfoOptional.isPresent()) {
System.err.println("Job id not found.");
return;
}
JobExecutionInfo jobExecutionInfo = jobExecutionInfoOptional.get();
List<List<String... | [
"public",
"static",
"void",
"printJob",
"(",
"Optional",
"<",
"JobExecutionInfo",
">",
"jobExecutionInfoOptional",
")",
"{",
"if",
"(",
"!",
"jobExecutionInfoOptional",
".",
"isPresent",
"(",
")",
")",
"{",
"System",
".",
"err",
".",
"println",
"(",
"\"Job id ... | Print information about one specific job.
@param jobExecutionInfoOptional Job info to print | [
"Print",
"information",
"about",
"one",
"specific",
"job",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-admin/src/main/java/org/apache/gobblin/cli/JobInfoPrintUtils.java#L171-L201 |
25,795 | apache/incubator-gobblin | gobblin-admin/src/main/java/org/apache/gobblin/cli/JobInfoPrintUtils.java | JobInfoPrintUtils.printJobProperties | public static void printJobProperties(Optional<JobExecutionInfo> jobExecutionInfoOptional) {
if (!jobExecutionInfoOptional.isPresent()) {
System.err.println("Job not found.");
return;
}
List<List<String>> data = new ArrayList<>();
List<String> flags = Arrays.asLis... | java | public static void printJobProperties(Optional<JobExecutionInfo> jobExecutionInfoOptional) {
if (!jobExecutionInfoOptional.isPresent()) {
System.err.println("Job not found.");
return;
}
List<List<String>> data = new ArrayList<>();
List<String> flags = Arrays.asLis... | [
"public",
"static",
"void",
"printJobProperties",
"(",
"Optional",
"<",
"JobExecutionInfo",
">",
"jobExecutionInfoOptional",
")",
"{",
"if",
"(",
"!",
"jobExecutionInfoOptional",
".",
"isPresent",
"(",
")",
")",
"{",
"System",
".",
"err",
".",
"println",
"(",
... | Print properties of a specific job
@param jobExecutionInfoOptional | [
"Print",
"properties",
"of",
"a",
"specific",
"job"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-admin/src/main/java/org/apache/gobblin/cli/JobInfoPrintUtils.java#L207-L227 |
25,796 | apache/incubator-gobblin | gobblin-admin/src/main/java/org/apache/gobblin/cli/JobInfoPrintUtils.java | JobInfoPrintUtils.printMetrics | private static void printMetrics(MetricArray metrics) {
System.out.println();
if (metrics.size() == 0) {
System.out.println("No metrics found.");
return;
}
List<List<String>> data = new ArrayList<>();
List<String> flags = Arrays.asList("", "-");
... | java | private static void printMetrics(MetricArray metrics) {
System.out.println();
if (metrics.size() == 0) {
System.out.println("No metrics found.");
return;
}
List<List<String>> data = new ArrayList<>();
List<String> flags = Arrays.asList("", "-");
... | [
"private",
"static",
"void",
"printMetrics",
"(",
"MetricArray",
"metrics",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
")",
";",
"if",
"(",
"metrics",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
... | Print out various metrics
@param metrics Metrics to print | [
"Print",
"out",
"various",
"metrics"
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-admin/src/main/java/org/apache/gobblin/cli/JobInfoPrintUtils.java#L233-L254 |
25,797 | apache/incubator-gobblin | gobblin-example/src/main/java/org/apache/gobblin/example/wikipedia/EmbeddedWikipediaExample.java | EmbeddedWikipediaExample.lookback | @CliObjectOption(description = "Sets the period for which articles should be pulled in ISO time format (e.g. P2D, PT1H)")
public EmbeddedWikipediaExample lookback(String isoLookback) {
this.setConfiguration(WikipediaExtractor.BOOTSTRAP_PERIOD, isoLookback);
return this;
} | java | @CliObjectOption(description = "Sets the period for which articles should be pulled in ISO time format (e.g. P2D, PT1H)")
public EmbeddedWikipediaExample lookback(String isoLookback) {
this.setConfiguration(WikipediaExtractor.BOOTSTRAP_PERIOD, isoLookback);
return this;
} | [
"@",
"CliObjectOption",
"(",
"description",
"=",
"\"Sets the period for which articles should be pulled in ISO time format (e.g. P2D, PT1H)\"",
")",
"public",
"EmbeddedWikipediaExample",
"lookback",
"(",
"String",
"isoLookback",
")",
"{",
"this",
".",
"setConfiguration",
"(",
"... | Set bootstrap lookback, i.e. oldest revision to pull. | [
"Set",
"bootstrap",
"lookback",
"i",
".",
"e",
".",
"oldest",
"revision",
"to",
"pull",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-example/src/main/java/org/apache/gobblin/example/wikipedia/EmbeddedWikipediaExample.java#L83-L87 |
25,798 | apache/incubator-gobblin | gobblin-example/src/main/java/org/apache/gobblin/example/wikipedia/EmbeddedWikipediaExample.java | EmbeddedWikipediaExample.avroOutput | @CliObjectOption(description = "Write output to Avro files. Specify the output directory as argument.")
public EmbeddedWikipediaExample avroOutput(String outputPath) {
this.setConfiguration(ConfigurationKeys.WRITER_BUILDER_CLASS, AvroDataWriterBuilder.class.getName());
this.setConfiguration(ConfigurationKeys.... | java | @CliObjectOption(description = "Write output to Avro files. Specify the output directory as argument.")
public EmbeddedWikipediaExample avroOutput(String outputPath) {
this.setConfiguration(ConfigurationKeys.WRITER_BUILDER_CLASS, AvroDataWriterBuilder.class.getName());
this.setConfiguration(ConfigurationKeys.... | [
"@",
"CliObjectOption",
"(",
"description",
"=",
"\"Write output to Avro files. Specify the output directory as argument.\"",
")",
"public",
"EmbeddedWikipediaExample",
"avroOutput",
"(",
"String",
"outputPath",
")",
"{",
"this",
".",
"setConfiguration",
"(",
"ConfigurationKeys... | Write output to avro files at the given input location. | [
"Write",
"output",
"to",
"avro",
"files",
"at",
"the",
"given",
"input",
"location",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-example/src/main/java/org/apache/gobblin/example/wikipedia/EmbeddedWikipediaExample.java#L92-L102 |
25,799 | apache/incubator-gobblin | gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/orc/OrcValueMapper.java | OrcValueMapper.convertOrcStructToOrcKey | protected OrcKey convertOrcStructToOrcKey(OrcStruct struct) {
OrcKey orcKey = new OrcKey();
orcKey.key = struct;
return orcKey;
} | java | protected OrcKey convertOrcStructToOrcKey(OrcStruct struct) {
OrcKey orcKey = new OrcKey();
orcKey.key = struct;
return orcKey;
} | [
"protected",
"OrcKey",
"convertOrcStructToOrcKey",
"(",
"OrcStruct",
"struct",
")",
"{",
"OrcKey",
"orcKey",
"=",
"new",
"OrcKey",
"(",
")",
";",
"orcKey",
".",
"key",
"=",
"struct",
";",
"return",
"orcKey",
";",
"}"
] | The output key of mapper needs to be comparable. In the scenarios that we need the orc record itself
to be the output key, this conversion will be necessary. | [
"The",
"output",
"key",
"of",
"mapper",
"needs",
"to",
"be",
"comparable",
".",
"In",
"the",
"scenarios",
"that",
"we",
"need",
"the",
"orc",
"record",
"itself",
"to",
"be",
"the",
"output",
"key",
"this",
"conversion",
"will",
"be",
"necessary",
"."
] | f029b4c0fea0fe4aa62f36dda2512344ff708bae | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/orc/OrcValueMapper.java#L72-L76 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.