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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
120,000 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroUtils.java | AvroUtils.cloneField | public static Field cloneField(Field field) {
return new Field(field.name(), field.schema(), field.doc(),
field.defaultValue());
} | java | public static Field cloneField(Field field) {
return new Field(field.name(), field.schema(), field.doc(),
field.defaultValue());
} | [
"public",
"static",
"Field",
"cloneField",
"(",
"Field",
"field",
")",
"{",
"return",
"new",
"Field",
"(",
"field",
".",
"name",
"(",
")",
",",
"field",
".",
"schema",
"(",
")",
",",
"field",
".",
"doc",
"(",
")",
",",
"field",
".",
"defaultValue",
... | Given an avro Schema.Field instance, make a clone of it.
@param field
The field to clone.
@return The cloned field. | [
"Given",
"an",
"avro",
"Schema",
".",
"Field",
"instance",
"make",
"a",
"clone",
"of",
"it",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroUtils.java#L132-L135 |
120,001 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroUtils.java | AvroUtils.inputStreamToString | public static String inputStreamToString(InputStream in) {
final int BUFFER_SIZE = 1024;
BufferedReader bufferedReader;
try {
bufferedReader = new BufferedReader(new InputStreamReader(in, "UTF-8"));
} catch (UnsupportedEncodingException e) {
throw new DatasetException(
"Platform do... | java | public static String inputStreamToString(InputStream in) {
final int BUFFER_SIZE = 1024;
BufferedReader bufferedReader;
try {
bufferedReader = new BufferedReader(new InputStreamReader(in, "UTF-8"));
} catch (UnsupportedEncodingException e) {
throw new DatasetException(
"Platform do... | [
"public",
"static",
"String",
"inputStreamToString",
"(",
"InputStream",
"in",
")",
"{",
"final",
"int",
"BUFFER_SIZE",
"=",
"1024",
";",
"BufferedReader",
"bufferedReader",
";",
"try",
"{",
"bufferedReader",
"=",
"new",
"BufferedReader",
"(",
"new",
"InputStreamR... | Convert an InputStream to a string encoded as UTF-8.
@param in
The InputStream to read the schema from.
@return The string. | [
"Convert",
"an",
"InputStream",
"to",
"a",
"string",
"encoded",
"as",
"UTF",
"-",
"8",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroUtils.java#L144-L164 |
120,002 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroUtils.java | AvroUtils.getDefaultValueMap | public static Map<String, Object> getDefaultValueMap(Schema avroRecordSchema) {
List<Field> defaultFields = new ArrayList<Field>();
for (Field f : avroRecordSchema.getFields()) {
if (f.defaultValue() != null) {
// Need to create a new Field here or we will get
// org.apache.avro.AvroRuntim... | java | public static Map<String, Object> getDefaultValueMap(Schema avroRecordSchema) {
List<Field> defaultFields = new ArrayList<Field>();
for (Field f : avroRecordSchema.getFields()) {
if (f.defaultValue() != null) {
// Need to create a new Field here or we will get
// org.apache.avro.AvroRuntim... | [
"public",
"static",
"Map",
"<",
"String",
",",
"Object",
">",
"getDefaultValueMap",
"(",
"Schema",
"avroRecordSchema",
")",
"{",
"List",
"<",
"Field",
">",
"defaultFields",
"=",
"new",
"ArrayList",
"<",
"Field",
">",
"(",
")",
";",
"for",
"(",
"Field",
"... | Get a map of field names to default values for an Avro schema.
@param avroRecordSchema
The schema to get the map of field names to values.
@return The map. | [
"Get",
"a",
"map",
"of",
"field",
"names",
"to",
"default",
"values",
"for",
"an",
"Avro",
"schema",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroUtils.java#L173-L201 |
120,003 | kite-sdk/kite | kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/scriptengine/java/JavaCompiler.java | JavaCompiler.compile | public Map<String, byte[]> compile(String fileName, String source,
Writer err, String sourcePath, String classPath) {
// to collect errors, warnings etc.
DiagnosticCollector<JavaFileObject> diagnostics =
new DiagnosticCollector<JavaFileObject>();
// create a new memory JavaFileManager
MemoryJavaFileM... | java | public Map<String, byte[]> compile(String fileName, String source,
Writer err, String sourcePath, String classPath) {
// to collect errors, warnings etc.
DiagnosticCollector<JavaFileObject> diagnostics =
new DiagnosticCollector<JavaFileObject>();
// create a new memory JavaFileManager
MemoryJavaFileM... | [
"public",
"Map",
"<",
"String",
",",
"byte",
"[",
"]",
">",
"compile",
"(",
"String",
"fileName",
",",
"String",
"source",
",",
"Writer",
"err",
",",
"String",
"sourcePath",
",",
"String",
"classPath",
")",
"{",
"// to collect errors, warnings etc.",
"Diagnost... | compile given String source and return bytecodes as a Map.
@param fileName source fileName to be used for error messages etc.
@param source Java source as String
@param err error writer where diagnostic messages are written
@param sourcePath location of additional .java source files
@param classPath location of additi... | [
"compile",
"given",
"String",
"source",
"and",
"return",
"bytecodes",
"as",
"a",
"Map",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/scriptengine/java/JavaCompiler.java#L84-L133 |
120,004 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/DataModelUtil.java | DataModelUtil.getDataModelForType | public static <E> GenericData getDataModelForType(Class<E> type) {
// Need to check if SpecificRecord first because specific records also
// implement GenericRecord
if (SpecificRecord.class.isAssignableFrom(type)) {
return new SpecificData(type.getClassLoader());
} else if (IndexedRecord.class.isA... | java | public static <E> GenericData getDataModelForType(Class<E> type) {
// Need to check if SpecificRecord first because specific records also
// implement GenericRecord
if (SpecificRecord.class.isAssignableFrom(type)) {
return new SpecificData(type.getClassLoader());
} else if (IndexedRecord.class.isA... | [
"public",
"static",
"<",
"E",
">",
"GenericData",
"getDataModelForType",
"(",
"Class",
"<",
"E",
">",
"type",
")",
"{",
"// Need to check if SpecificRecord first because specific records also",
"// implement GenericRecord",
"if",
"(",
"SpecificRecord",
".",
"class",
".",
... | Get the data model for the given type.
@param <E> The entity type
@param type The Java class of the entity type
@return The appropriate data model for the given type | [
"Get",
"the",
"data",
"model",
"for",
"the",
"given",
"type",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/DataModelUtil.java#L90-L100 |
120,005 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/DataModelUtil.java | DataModelUtil.getDatumReaderForType | @SuppressWarnings("unchecked")
public static <E> DatumReader<E> getDatumReaderForType(Class<E> type, Schema writerSchema) {
Schema readerSchema = getReaderSchema(type, writerSchema);
GenericData dataModel = getDataModelForType(type);
if (dataModel instanceof ReflectData) {
return new ReflectDatumRea... | java | @SuppressWarnings("unchecked")
public static <E> DatumReader<E> getDatumReaderForType(Class<E> type, Schema writerSchema) {
Schema readerSchema = getReaderSchema(type, writerSchema);
GenericData dataModel = getDataModelForType(type);
if (dataModel instanceof ReflectData) {
return new ReflectDatumRea... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"E",
">",
"DatumReader",
"<",
"E",
">",
"getDatumReaderForType",
"(",
"Class",
"<",
"E",
">",
"type",
",",
"Schema",
"writerSchema",
")",
"{",
"Schema",
"readerSchema",
"=",
"getRea... | Get the DatumReader for the given type.
@param <E> The entity type
@param type The Java class of the entity type
@param writerSchema The {@link Schema} for entities
@return The DatumReader for the given type | [
"Get",
"the",
"DatumReader",
"for",
"the",
"given",
"type",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/DataModelUtil.java#L127-L138 |
120,006 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/DataModelUtil.java | DataModelUtil.getReaderSchema | public static <E> Schema getReaderSchema(Class<E> type, Schema schema) {
Schema readerSchema = schema;
GenericData dataModel = getDataModelForType(type);
if (dataModel instanceof SpecificData) {
readerSchema = ((SpecificData)dataModel).getSchema(type);
}
return readerSchema;
} | java | public static <E> Schema getReaderSchema(Class<E> type, Schema schema) {
Schema readerSchema = schema;
GenericData dataModel = getDataModelForType(type);
if (dataModel instanceof SpecificData) {
readerSchema = ((SpecificData)dataModel).getSchema(type);
}
return readerSchema;
} | [
"public",
"static",
"<",
"E",
">",
"Schema",
"getReaderSchema",
"(",
"Class",
"<",
"E",
">",
"type",
",",
"Schema",
"schema",
")",
"{",
"Schema",
"readerSchema",
"=",
"schema",
";",
"GenericData",
"dataModel",
"=",
"getDataModelForType",
"(",
"type",
")",
... | Get the reader schema based on the given type and writer schema.
@param <E> The entity type
@param type The Java class of the entity type
@param schema The {@link Schema} for the entity
@return The reader schema based on the given type and writer schema | [
"Get",
"the",
"reader",
"schema",
"based",
"on",
"the",
"given",
"type",
"and",
"writer",
"schema",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/DataModelUtil.java#L173-L182 |
120,007 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/DataModelUtil.java | DataModelUtil.getWriterSchema | public static <E> Schema getWriterSchema(Class<E> type, Schema schema) {
Schema writerSchema = schema;
GenericData dataModel = getDataModelForType(type);
if (dataModel instanceof AllowNulls) {
// assume fields are non-null by default to avoid schema conflicts
dataModel = ReflectData.get();
}... | java | public static <E> Schema getWriterSchema(Class<E> type, Schema schema) {
Schema writerSchema = schema;
GenericData dataModel = getDataModelForType(type);
if (dataModel instanceof AllowNulls) {
// assume fields are non-null by default to avoid schema conflicts
dataModel = ReflectData.get();
}... | [
"public",
"static",
"<",
"E",
">",
"Schema",
"getWriterSchema",
"(",
"Class",
"<",
"E",
">",
"type",
",",
"Schema",
"schema",
")",
"{",
"Schema",
"writerSchema",
"=",
"schema",
";",
"GenericData",
"dataModel",
"=",
"getDataModelForType",
"(",
"type",
")",
... | Get the writer schema based on the given type and dataset schema.
@param <E> The entity type
@param type The Java class of the entity type
@param schema The {@link Schema} for the entity
@return The reader schema based on the given type and writer schema | [
"Get",
"the",
"writer",
"schema",
"based",
"on",
"the",
"given",
"type",
"and",
"dataset",
"schema",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/DataModelUtil.java#L192-L205 |
120,008 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/DataModelUtil.java | DataModelUtil.createRecord | @SuppressWarnings("unchecked")
public static <E> E createRecord(Class<E> type, Schema schema) {
// Don't instantiate SpecificRecords or interfaces.
if (isGeneric(type) && !type.isInterface()) {
if (GenericData.Record.class.equals(type)) {
return (E) GenericData.get().newRecord(null, schema);
... | java | @SuppressWarnings("unchecked")
public static <E> E createRecord(Class<E> type, Schema schema) {
// Don't instantiate SpecificRecords or interfaces.
if (isGeneric(type) && !type.isInterface()) {
if (GenericData.Record.class.equals(type)) {
return (E) GenericData.get().newRecord(null, schema);
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"E",
">",
"E",
"createRecord",
"(",
"Class",
"<",
"E",
">",
"type",
",",
"Schema",
"schema",
")",
"{",
"// Don't instantiate SpecificRecords or interfaces.",
"if",
"(",
"isGeneric",
"("... | If E implements GenericRecord, but does not implement SpecificRecord, then
create a new instance of E using reflection so that GenericDataumReader
will use the expected type.
Implementations of GenericRecord that require a {@link Schema} parameter
in the constructor should implement SpecificData.SchemaConstructable.
O... | [
"If",
"E",
"implements",
"GenericRecord",
"but",
"does",
"not",
"implement",
"SpecificRecord",
"then",
"create",
"a",
"new",
"instance",
"of",
"E",
"using",
"reflection",
"so",
"that",
"GenericDataumReader",
"will",
"use",
"the",
"expected",
"type",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/DataModelUtil.java#L221-L232 |
120,009 | kite-sdk/kite | kite-data/kite-data-hive/src/main/java/org/kitesdk/data/spi/hive/HiveAbstractDatasetRepository.java | HiveAbstractDatasetRepository.getHiveMetastoreUri | String getHiveMetastoreUri(Configuration conf) {
String metastoreUris = conf.get(Loader.HIVE_METASTORE_URI_PROP);
if (metastoreUris == null) {
return null;
}
String[] uriArray = metastoreUris.split(HIVE_METASTORE_URIS_SEPARATOR);
return uriArray[0];
} | java | String getHiveMetastoreUri(Configuration conf) {
String metastoreUris = conf.get(Loader.HIVE_METASTORE_URI_PROP);
if (metastoreUris == null) {
return null;
}
String[] uriArray = metastoreUris.split(HIVE_METASTORE_URIS_SEPARATOR);
return uriArray[0];
} | [
"String",
"getHiveMetastoreUri",
"(",
"Configuration",
"conf",
")",
"{",
"String",
"metastoreUris",
"=",
"conf",
".",
"get",
"(",
"Loader",
".",
"HIVE_METASTORE_URI_PROP",
")",
";",
"if",
"(",
"metastoreUris",
"==",
"null",
")",
"{",
"return",
"null",
";",
"... | This method extracts one URI for the Hive metastore. The hive.metastore.uris property in the parameter
Configuration object can contain a list of uris but since Kite does not support highly available Hive metastore
currently we need to make sure that only the first one is retrieved.
@param conf The Configuration objec... | [
"This",
"method",
"extracts",
"one",
"URI",
"for",
"the",
"Hive",
"metastore",
".",
"The",
"hive",
".",
"metastore",
".",
"uris",
"property",
"in",
"the",
"parameter",
"Configuration",
"object",
"can",
"contain",
"a",
"list",
"of",
"uris",
"but",
"since",
... | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hive/src/main/java/org/kitesdk/data/spi/hive/HiveAbstractDatasetRepository.java#L147-L156 |
120,010 | kite-sdk/kite | kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/shaded/org/apache/commons/codec/binary/binary/BaseNCodec.java | BaseNCodec.isInAlphabet | public boolean isInAlphabet(final byte[] arrayOctet, final boolean allowWSPad) {
for (int i = 0; i < arrayOctet.length; i++) {
if (!isInAlphabet(arrayOctet[i]) &&
(!allowWSPad || (arrayOctet[i] != PAD) && !isWhiteSpace(arrayOctet[i]))) {
return false;
... | java | public boolean isInAlphabet(final byte[] arrayOctet, final boolean allowWSPad) {
for (int i = 0; i < arrayOctet.length; i++) {
if (!isInAlphabet(arrayOctet[i]) &&
(!allowWSPad || (arrayOctet[i] != PAD) && !isWhiteSpace(arrayOctet[i]))) {
return false;
... | [
"public",
"boolean",
"isInAlphabet",
"(",
"final",
"byte",
"[",
"]",
"arrayOctet",
",",
"final",
"boolean",
"allowWSPad",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"arrayOctet",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"... | Tests a given byte array to see if it contains only valid characters within the alphabet.
The method optionally treats whitespace and pad as valid.
@param arrayOctet byte array to test
@param allowWSPad if {@code true}, then whitespace and PAD are also allowed
@return {@code true} if all bytes are valid characters in... | [
"Tests",
"a",
"given",
"byte",
"array",
"to",
"see",
"if",
"it",
"contains",
"only",
"valid",
"characters",
"within",
"the",
"alphabet",
".",
"The",
"method",
"optionally",
"treats",
"whitespace",
"and",
"pad",
"as",
"valid",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/shaded/org/apache/commons/codec/binary/binary/BaseNCodec.java#L437-L445 |
120,011 | kite-sdk/kite | kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/shaded/org/apache/commons/codec/binary/binary/BaseNCodec.java | BaseNCodec.containsAlphabetOrPad | protected boolean containsAlphabetOrPad(final byte[] arrayOctet) {
if (arrayOctet == null) {
return false;
}
for (final byte element : arrayOctet) {
if (PAD == element || isInAlphabet(element)) {
return true;
}
}
return false;
... | java | protected boolean containsAlphabetOrPad(final byte[] arrayOctet) {
if (arrayOctet == null) {
return false;
}
for (final byte element : arrayOctet) {
if (PAD == element || isInAlphabet(element)) {
return true;
}
}
return false;
... | [
"protected",
"boolean",
"containsAlphabetOrPad",
"(",
"final",
"byte",
"[",
"]",
"arrayOctet",
")",
"{",
"if",
"(",
"arrayOctet",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"final",
"byte",
"element",
":",
"arrayOctet",
")",
"{",
"i... | Tests a given byte array to see if it contains any characters within the alphabet or PAD.
Intended for use in checking line-ending arrays
@param arrayOctet
byte array to test
@return {@code true} if any byte is a valid character in the alphabet or PAD; {@code false} otherwise | [
"Tests",
"a",
"given",
"byte",
"array",
"to",
"see",
"if",
"it",
"contains",
"any",
"characters",
"within",
"the",
"alphabet",
"or",
"PAD",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/shaded/org/apache/commons/codec/binary/binary/BaseNCodec.java#L469-L479 |
120,012 | kite-sdk/kite | kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/shaded/org/apache/commons/codec/binary/binary/BaseNCodec.java | BaseNCodec.getEncodedLength | public long getEncodedLength(final byte[] pArray) {
// Calculate non-chunked size - rounded up to allow for padding
// cast to long is needed to avoid possibility of overflow
long len = ((pArray.length + unencodedBlockSize-1) / unencodedBlockSize) * (long) encodedBlockSize;
if (lineLeng... | java | public long getEncodedLength(final byte[] pArray) {
// Calculate non-chunked size - rounded up to allow for padding
// cast to long is needed to avoid possibility of overflow
long len = ((pArray.length + unencodedBlockSize-1) / unencodedBlockSize) * (long) encodedBlockSize;
if (lineLeng... | [
"public",
"long",
"getEncodedLength",
"(",
"final",
"byte",
"[",
"]",
"pArray",
")",
"{",
"// Calculate non-chunked size - rounded up to allow for padding",
"// cast to long is needed to avoid possibility of overflow",
"long",
"len",
"=",
"(",
"(",
"pArray",
".",
"length",
... | Calculates the amount of space needed to encode the supplied array.
@param pArray byte[] array which will later be encoded
@return amount of space needed to encoded the supplied array.
Returns a long since a max-len array will require > Integer.MAX_VALUE | [
"Calculates",
"the",
"amount",
"of",
"space",
"needed",
"to",
"encode",
"the",
"supplied",
"array",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/shaded/org/apache/commons/codec/binary/binary/BaseNCodec.java#L489-L498 |
120,013 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntitySerDe.java | EntitySerDe.serialize | public PutAction serialize(byte[] keyBytes, FieldMapping fieldMapping,
Object fieldValue) {
Put put = new Put(keyBytes);
PutAction putAction = new PutAction(put);
String fieldName = fieldMapping.getFieldName();
if (fieldMapping.getMappingType() == MappingType.COLUMN
|| fieldMapping.getMapp... | java | public PutAction serialize(byte[] keyBytes, FieldMapping fieldMapping,
Object fieldValue) {
Put put = new Put(keyBytes);
PutAction putAction = new PutAction(put);
String fieldName = fieldMapping.getFieldName();
if (fieldMapping.getMappingType() == MappingType.COLUMN
|| fieldMapping.getMapp... | [
"public",
"PutAction",
"serialize",
"(",
"byte",
"[",
"]",
"keyBytes",
",",
"FieldMapping",
"fieldMapping",
",",
"Object",
"fieldValue",
")",
"{",
"Put",
"put",
"=",
"new",
"Put",
"(",
"keyBytes",
")",
";",
"PutAction",
"putAction",
"=",
"new",
"PutAction",
... | Serialize an entity's field value to a PutAction.
@param keyBytes
The bytes of the serialized key (needed to construct a PutAction).
@param fieldMapping
The FieldMapping that specifies this field's mapping type and
field name.
@param fieldValue
The value of the field to serialize.
@return The PutAction with column's p... | [
"Serialize",
"an",
"entity",
"s",
"field",
"value",
"to",
"a",
"PutAction",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntitySerDe.java#L58-L78 |
120,014 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntitySerDe.java | EntitySerDe.deserialize | public Object deserialize(FieldMapping fieldMapping, Result result) {
String fieldName = fieldMapping.getFieldName();
MappingType mappingType = fieldMapping.getMappingType();
if (mappingType == MappingType.COLUMN || mappingType == MappingType.COUNTER) {
return deserializeColumn(fieldMapping.getFieldNa... | java | public Object deserialize(FieldMapping fieldMapping, Result result) {
String fieldName = fieldMapping.getFieldName();
MappingType mappingType = fieldMapping.getMappingType();
if (mappingType == MappingType.COLUMN || mappingType == MappingType.COUNTER) {
return deserializeColumn(fieldMapping.getFieldNa... | [
"public",
"Object",
"deserialize",
"(",
"FieldMapping",
"fieldMapping",
",",
"Result",
"result",
")",
"{",
"String",
"fieldName",
"=",
"fieldMapping",
".",
"getFieldName",
"(",
")",
";",
"MappingType",
"mappingType",
"=",
"fieldMapping",
".",
"getMappingType",
"("... | Deserialize an entity field from the HBase Result.
@param fieldMapping
The FieldMapping that specifies this field's mapping type and
field name.
@param result
The HBase Result that represents a row in HBase.
@return The field Object we deserialized from the Result. | [
"Deserialize",
"an",
"entity",
"field",
"from",
"the",
"HBase",
"Result",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntitySerDe.java#L90-L105 |
120,015 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntitySerDe.java | EntitySerDe.serializeColumn | private void serializeColumn(String fieldName, byte[] family,
byte[] qualifier, Object fieldValue, Put put) {
// column mapping, so simply serialize the value and add the bytes
// to the put.
byte[] bytes = serializeColumnValueToBytes(fieldName, fieldValue);
put.add(family, qualifier, bytes);
} | java | private void serializeColumn(String fieldName, byte[] family,
byte[] qualifier, Object fieldValue, Put put) {
// column mapping, so simply serialize the value and add the bytes
// to the put.
byte[] bytes = serializeColumnValueToBytes(fieldName, fieldValue);
put.add(family, qualifier, bytes);
} | [
"private",
"void",
"serializeColumn",
"(",
"String",
"fieldName",
",",
"byte",
"[",
"]",
"family",
",",
"byte",
"[",
"]",
"qualifier",
",",
"Object",
"fieldValue",
",",
"Put",
"put",
")",
"{",
"// column mapping, so simply serialize the value and add the bytes",
"//... | Serialize the column value, and update the Put with the serialized bytes.
@param fieldName
The name of the entity field we are serializing
@param family
The column family this field maps to
@param qualifier
The qualifier this field maps to
@param fieldValue
The value we are serializing
@param put
The Put we are updati... | [
"Serialize",
"the",
"column",
"value",
"and",
"update",
"the",
"Put",
"with",
"the",
"serialized",
"bytes",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntitySerDe.java#L218-L224 |
120,016 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntitySerDe.java | EntitySerDe.serializeKeyAsColumn | private void serializeKeyAsColumn(String fieldName, byte[] family,
String prefix, Object fieldValue, Put put) {
// keyAsColumn mapping, so extract each value from the keyAsColumn field
// using the entityComposer, serialize them, and them to the put.
Map<CharSequence, Object> keyAsColumnValues = entit... | java | private void serializeKeyAsColumn(String fieldName, byte[] family,
String prefix, Object fieldValue, Put put) {
// keyAsColumn mapping, so extract each value from the keyAsColumn field
// using the entityComposer, serialize them, and them to the put.
Map<CharSequence, Object> keyAsColumnValues = entit... | [
"private",
"void",
"serializeKeyAsColumn",
"(",
"String",
"fieldName",
",",
"byte",
"[",
"]",
"family",
",",
"String",
"prefix",
",",
"Object",
"fieldValue",
",",
"Put",
"put",
")",
"{",
"// keyAsColumn mapping, so extract each value from the keyAsColumn field",
"// usi... | Serialize a keyAsColumn field, and update the put with the serialized bytes
from each subfield of the keyAsColumn value.
@param fieldName
The name of the entity field we are serializing
@param family
The column family this field maps to
@param prefix
An optional prefix each column qualifier should be prefixed with
@pa... | [
"Serialize",
"a",
"keyAsColumn",
"field",
"and",
"update",
"the",
"put",
"with",
"the",
"serialized",
"bytes",
"from",
"each",
"subfield",
"of",
"the",
"keyAsColumn",
"value",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntitySerDe.java#L241-L267 |
120,017 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntitySerDe.java | EntitySerDe.serializeOCCColumn | private void serializeOCCColumn(Object fieldValue, PutAction putAction) {
// OCC Version mapping, so serialize as a long to the version check
// column qualifier in the system column family.
Long currVersion = (Long) fieldValue;
VersionCheckAction versionCheckAction = new VersionCheckAction(currVersion)... | java | private void serializeOCCColumn(Object fieldValue, PutAction putAction) {
// OCC Version mapping, so serialize as a long to the version check
// column qualifier in the system column family.
Long currVersion = (Long) fieldValue;
VersionCheckAction versionCheckAction = new VersionCheckAction(currVersion)... | [
"private",
"void",
"serializeOCCColumn",
"(",
"Object",
"fieldValue",
",",
"PutAction",
"putAction",
")",
"{",
"// OCC Version mapping, so serialize as a long to the version check",
"// column qualifier in the system column family.",
"Long",
"currVersion",
"=",
"(",
"Long",
")",
... | Serialize the OCC column value, and update the putAction with the
serialized bytes.
@param fieldValue
The value to serialize
@param putAction
The PutAction to update. | [
"Serialize",
"the",
"OCC",
"column",
"value",
"and",
"update",
"the",
"putAction",
"with",
"the",
"serialized",
"bytes",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntitySerDe.java#L278-L286 |
120,018 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntitySerDe.java | EntitySerDe.deserializeColumn | private Object deserializeColumn(String fieldName, byte[] family,
byte[] qualifier, Result result) {
byte[] bytes = result.getValue(family, qualifier);
if (bytes == null) {
return getDefaultValue(fieldName);
} else {
return deserializeColumnValueFromBytes(fieldName, bytes);
}
} | java | private Object deserializeColumn(String fieldName, byte[] family,
byte[] qualifier, Result result) {
byte[] bytes = result.getValue(family, qualifier);
if (bytes == null) {
return getDefaultValue(fieldName);
} else {
return deserializeColumnValueFromBytes(fieldName, bytes);
}
} | [
"private",
"Object",
"deserializeColumn",
"(",
"String",
"fieldName",
",",
"byte",
"[",
"]",
"family",
",",
"byte",
"[",
"]",
"qualifier",
",",
"Result",
"result",
")",
"{",
"byte",
"[",
"]",
"bytes",
"=",
"result",
".",
"getValue",
"(",
"family",
",",
... | Deserialize the entity field that has a column mapping.
@param fieldName
The name of the entity's field we are deserializing.
@param family
The column family this field is mapped to
@param qualifier
The column qualifier this field is mapped to
@param result
The HBase Result that represents a row in HBase.
@return The ... | [
"Deserialize",
"the",
"entity",
"field",
"that",
"has",
"a",
"column",
"mapping",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntitySerDe.java#L301-L309 |
120,019 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntitySerDe.java | EntitySerDe.deserializeKeyAsColumn | private Object deserializeKeyAsColumn(String fieldName, byte[] family,
String prefix, Result result) {
// Construct a map of keyAsColumn field values. From this we'll be able
// to use the entityComposer to construct the entity field value.
byte[] prefixBytes = prefix != null ? prefix.getBytes() : nul... | java | private Object deserializeKeyAsColumn(String fieldName, byte[] family,
String prefix, Result result) {
// Construct a map of keyAsColumn field values. From this we'll be able
// to use the entityComposer to construct the entity field value.
byte[] prefixBytes = prefix != null ? prefix.getBytes() : nul... | [
"private",
"Object",
"deserializeKeyAsColumn",
"(",
"String",
"fieldName",
",",
"byte",
"[",
"]",
"family",
",",
"String",
"prefix",
",",
"Result",
"result",
")",
"{",
"// Construct a map of keyAsColumn field values. From this we'll be able",
"// to use the entityComposer to ... | Deserialize the entity field that has a keyAsColumn mapping.
@param fieldName
The name of the entity's field we are deserializing.
@param family
The column family this field is mapped to
@param prefix
The column qualifier prefix each
@param result
The HBase Result that represents a row in HBase.
@return The deserializ... | [
"Deserialize",
"the",
"entity",
"field",
"that",
"has",
"a",
"keyAsColumn",
"mapping",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntitySerDe.java#L324-L351 |
120,020 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntitySerDe.java | EntitySerDe.deserializeOCCColumn | private Object deserializeOCCColumn(Result result) {
byte[] versionBytes = result.getValue(Constants.SYS_COL_FAMILY,
Constants.VERSION_CHECK_COL_QUALIFIER);
if (versionBytes == null) {
return null;
} else {
return Bytes.toLong(versionBytes);
}
} | java | private Object deserializeOCCColumn(Result result) {
byte[] versionBytes = result.getValue(Constants.SYS_COL_FAMILY,
Constants.VERSION_CHECK_COL_QUALIFIER);
if (versionBytes == null) {
return null;
} else {
return Bytes.toLong(versionBytes);
}
} | [
"private",
"Object",
"deserializeOCCColumn",
"(",
"Result",
"result",
")",
"{",
"byte",
"[",
"]",
"versionBytes",
"=",
"result",
".",
"getValue",
"(",
"Constants",
".",
"SYS_COL_FAMILY",
",",
"Constants",
".",
"VERSION_CHECK_COL_QUALIFIER",
")",
";",
"if",
"(",
... | Deserialize the OCC column value from the Result.
@param result
The HBase Result that represents a row in HBase.
@return The deserialized OCC field value | [
"Deserialize",
"the",
"OCC",
"column",
"value",
"from",
"the",
"Result",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntitySerDe.java#L360-L368 |
120,021 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroEntitySchema.java | AvroEntitySchema.mappingCompatible | private static boolean mappingCompatible(EntitySchema oldSchema,
EntitySchema newSchema) {
for (FieldMapping oldFieldMapping : oldSchema.getColumnMappingDescriptor()
.getFieldMappings()) {
FieldMapping newFieldMapping = newSchema.getColumnMappingDescriptor()
.getFieldMapping(oldFieldMa... | java | private static boolean mappingCompatible(EntitySchema oldSchema,
EntitySchema newSchema) {
for (FieldMapping oldFieldMapping : oldSchema.getColumnMappingDescriptor()
.getFieldMappings()) {
FieldMapping newFieldMapping = newSchema.getColumnMappingDescriptor()
.getFieldMapping(oldFieldMa... | [
"private",
"static",
"boolean",
"mappingCompatible",
"(",
"EntitySchema",
"oldSchema",
",",
"EntitySchema",
"newSchema",
")",
"{",
"for",
"(",
"FieldMapping",
"oldFieldMapping",
":",
"oldSchema",
".",
"getColumnMappingDescriptor",
"(",
")",
".",
"getFieldMappings",
"(... | Ensure that the column mappings for the shared fields between the old and
new schema haven't changed.
@param oldSchema
@param newSchema
@return true if the mappings are compatible, false if not. | [
"Ensure",
"that",
"the",
"column",
"mappings",
"for",
"the",
"shared",
"fields",
"between",
"the",
"old",
"and",
"new",
"schema",
"haven",
"t",
"changed",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroEntitySchema.java#L128-L141 |
120,022 | kite-sdk/kite | kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/base/Compiler.java | Compiler.compile | public Command compile(File morphlineFile, String morphlineId, MorphlineContext morphlineContext, Command finalChild, Config... overrides) {
Config config;
try {
config = parse(morphlineFile, overrides);
} catch (IOException e) {
throw new MorphlineCompilationException("Cannot parse morphline fi... | java | public Command compile(File morphlineFile, String morphlineId, MorphlineContext morphlineContext, Command finalChild, Config... overrides) {
Config config;
try {
config = parse(morphlineFile, overrides);
} catch (IOException e) {
throw new MorphlineCompilationException("Cannot parse morphline fi... | [
"public",
"Command",
"compile",
"(",
"File",
"morphlineFile",
",",
"String",
"morphlineId",
",",
"MorphlineContext",
"morphlineContext",
",",
"Command",
"finalChild",
",",
"Config",
"...",
"overrides",
")",
"{",
"Config",
"config",
";",
"try",
"{",
"config",
"="... | Parses the given morphlineFile, then finds the morphline with the given morphlineId within,
then compiles the morphline and returns the corresponding morphline command. The returned
command will feed records into finalChild. | [
"Parses",
"the",
"given",
"morphlineFile",
"then",
"finds",
"the",
"morphline",
"with",
"the",
"given",
"morphlineId",
"within",
"then",
"compiles",
"the",
"morphline",
"and",
"returns",
"the",
"corresponding",
"morphline",
"command",
".",
"The",
"returned",
"comm... | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/base/Compiler.java#L47-L57 |
120,023 | kite-sdk/kite | kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/base/Compiler.java | Compiler.parse | public Config parse(File file, Config... overrides) throws IOException {
if (file == null || file.getPath().trim().length() == 0) {
throw new MorphlineCompilationException("Missing morphlineFile parameter", null);
}
if (!file.exists()) {
throw new FileNotFoundException("File not found: " + file)... | java | public Config parse(File file, Config... overrides) throws IOException {
if (file == null || file.getPath().trim().length() == 0) {
throw new MorphlineCompilationException("Missing morphlineFile parameter", null);
}
if (!file.exists()) {
throw new FileNotFoundException("File not found: " + file)... | [
"public",
"Config",
"parse",
"(",
"File",
"file",
",",
"Config",
"...",
"overrides",
")",
"throws",
"IOException",
"{",
"if",
"(",
"file",
"==",
"null",
"||",
"file",
".",
"getPath",
"(",
")",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
"==",
"... | Loads the given config file from the local file system | [
"Loads",
"the",
"given",
"config",
"file",
"from",
"the",
"local",
"file",
"system"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/base/Compiler.java#L60-L81 |
120,024 | kite-sdk/kite | kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/base/Compiler.java | Compiler.find | public Config find(String morphlineId, Config config, String nameForErrorMsg) {
List<? extends Config> morphlineConfigs = config.getConfigList("morphlines");
if (morphlineConfigs.size() == 0) {
throw new MorphlineCompilationException(
"Morphline file must contain at least one morphline: " + name... | java | public Config find(String morphlineId, Config config, String nameForErrorMsg) {
List<? extends Config> morphlineConfigs = config.getConfigList("morphlines");
if (morphlineConfigs.size() == 0) {
throw new MorphlineCompilationException(
"Morphline file must contain at least one morphline: " + name... | [
"public",
"Config",
"find",
"(",
"String",
"morphlineId",
",",
"Config",
"config",
",",
"String",
"nameForErrorMsg",
")",
"{",
"List",
"<",
"?",
"extends",
"Config",
">",
"morphlineConfigs",
"=",
"config",
".",
"getConfigList",
"(",
"\"morphlines\"",
")",
";",... | Finds the given morphline id within the given morphline config, using the given nameForErrorMsg
for error reporting. | [
"Finds",
"the",
"given",
"morphline",
"id",
"within",
"the",
"given",
"morphline",
"config",
"using",
"the",
"given",
"nameForErrorMsg",
"for",
"error",
"reporting",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/base/Compiler.java#L87-L116 |
120,025 | kite-sdk/kite | kite-minicluster/src/main/java/org/kitesdk/minicluster/MiniCluster.java | MiniCluster.start | public void start() throws IOException, InterruptedException {
for (Service service : services) {
service.configure(serviceConfig);
logger.info("Running Minicluster Service: "
+ service.getClass().getName());
service.start();
serviceConfig.setHadoopConf(service.getHadoopConf());
... | java | public void start() throws IOException, InterruptedException {
for (Service service : services) {
service.configure(serviceConfig);
logger.info("Running Minicluster Service: "
+ service.getClass().getName());
service.start();
serviceConfig.setHadoopConf(service.getHadoopConf());
... | [
"public",
"void",
"start",
"(",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"for",
"(",
"Service",
"service",
":",
"services",
")",
"{",
"service",
".",
"configure",
"(",
"serviceConfig",
")",
";",
"logger",
".",
"info",
"(",
"\"Running M... | Starts the services in order, passing the previous service's modified
Configuration object to the next.
@throws IOException | [
"Starts",
"the",
"services",
"in",
"order",
"passing",
"the",
"previous",
"service",
"s",
"modified",
"Configuration",
"object",
"to",
"the",
"next",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-minicluster/src/main/java/org/kitesdk/minicluster/MiniCluster.java#L293-L304 |
120,026 | kite-sdk/kite | kite-minicluster/src/main/java/org/kitesdk/minicluster/MiniCluster.java | MiniCluster.stop | public void stop() throws IOException, InterruptedException {
for (int i = services.size() - 1; i >= 0; i--) {
Service service = services.get(i);
logger.info("Stopping Minicluster Service: "
+ service.getClass().getName());
service.stop();
}
logger.info("All Minicluster Services ... | java | public void stop() throws IOException, InterruptedException {
for (int i = services.size() - 1; i >= 0; i--) {
Service service = services.get(i);
logger.info("Stopping Minicluster Service: "
+ service.getClass().getName());
service.stop();
}
logger.info("All Minicluster Services ... | [
"public",
"void",
"stop",
"(",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"for",
"(",
"int",
"i",
"=",
"services",
".",
"size",
"(",
")",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"Service",
"service",
"=",
"serv... | Stops the services in reverse of their run order.
@throws IOException | [
"Stops",
"the",
"services",
"in",
"reverse",
"of",
"their",
"run",
"order",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-minicluster/src/main/java/org/kitesdk/minicluster/MiniCluster.java#L311-L319 |
120,027 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java | DefaultSchemaManager.refreshManagedSchemaCache | @Override
public void refreshManagedSchemaCache(String tableName, String entityName) {
ManagedSchema managedSchema = managedSchemaDao.getManagedSchema(tableName,
entityName);
if (managedSchema != null) {
getManagedSchemaMap().put(
getManagedSchemaMapKey(managedSchema.getTable(),
... | java | @Override
public void refreshManagedSchemaCache(String tableName, String entityName) {
ManagedSchema managedSchema = managedSchemaDao.getManagedSchema(tableName,
entityName);
if (managedSchema != null) {
getManagedSchemaMap().put(
getManagedSchemaMapKey(managedSchema.getTable(),
... | [
"@",
"Override",
"public",
"void",
"refreshManagedSchemaCache",
"(",
"String",
"tableName",
",",
"String",
"entityName",
")",
"{",
"ManagedSchema",
"managedSchema",
"=",
"managedSchemaDao",
".",
"getManagedSchema",
"(",
"tableName",
",",
"entityName",
")",
";",
"if"... | Update the managedSchemaMap for the entry defined by tableName and
entityName.
@param tableName
The table name of the managed schema
@param entityName
The entity name of the managed schema | [
"Update",
"the",
"managedSchemaMap",
"for",
"the",
"entry",
"defined",
"by",
"tableName",
"and",
"entityName",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java#L344-L353 |
120,028 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java | DefaultSchemaManager.getManagedSchemaMap | private ConcurrentHashMap<String, ManagedSchema> getManagedSchemaMap() {
if (managedSchemaMap == null) {
synchronized (this) {
if (managedSchemaMap == null) {
managedSchemaMap = new ConcurrentHashMap<String, ManagedSchema>();
populateManagedSchemaMap();
}
}
}
... | java | private ConcurrentHashMap<String, ManagedSchema> getManagedSchemaMap() {
if (managedSchemaMap == null) {
synchronized (this) {
if (managedSchemaMap == null) {
managedSchemaMap = new ConcurrentHashMap<String, ManagedSchema>();
populateManagedSchemaMap();
}
}
}
... | [
"private",
"ConcurrentHashMap",
"<",
"String",
",",
"ManagedSchema",
">",
"getManagedSchemaMap",
"(",
")",
"{",
"if",
"(",
"managedSchemaMap",
"==",
"null",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"managedSchemaMap",
"==",
"null",
")",
"{... | Get the managedSchemaMap, lazily loading it if it hasn't been initialized
yet. Members of this class should never access the managedSchemaMap
directly, but should always access it through this method.
@return The managedSchemaMap | [
"Get",
"the",
"managedSchemaMap",
"lazily",
"loading",
"it",
"if",
"it",
"hasn",
"t",
"been",
"initialized",
"yet",
".",
"Members",
"of",
"this",
"class",
"should",
"never",
"access",
"the",
"managedSchemaMap",
"directly",
"but",
"should",
"always",
"access",
... | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java#L382-L392 |
120,029 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java | DefaultSchemaManager.populateManagedSchemaMap | private void populateManagedSchemaMap() {
Collection<ManagedSchema> schemas = managedSchemaDao.getManagedSchemas();
for (ManagedSchema managedSchema : schemas) {
getManagedSchemaMap().put(
getManagedSchemaMapKey(managedSchema.getTable(),
managedSchema.getName()), managedSchema);
... | java | private void populateManagedSchemaMap() {
Collection<ManagedSchema> schemas = managedSchemaDao.getManagedSchemas();
for (ManagedSchema managedSchema : schemas) {
getManagedSchemaMap().put(
getManagedSchemaMapKey(managedSchema.getTable(),
managedSchema.getName()), managedSchema);
... | [
"private",
"void",
"populateManagedSchemaMap",
"(",
")",
"{",
"Collection",
"<",
"ManagedSchema",
">",
"schemas",
"=",
"managedSchemaDao",
".",
"getManagedSchemas",
"(",
")",
";",
"for",
"(",
"ManagedSchema",
"managedSchema",
":",
"schemas",
")",
"{",
"getManagedS... | Populate the managedSchemaMap with all of the managed schemas returned by
the managedSchemaDao. | [
"Populate",
"the",
"managedSchemaMap",
"with",
"all",
"of",
"the",
"managed",
"schemas",
"returned",
"by",
"the",
"managedSchemaDao",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java#L398-L405 |
120,030 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java | DefaultSchemaManager.getSchemaParser | @SuppressWarnings("unchecked")
private KeyEntitySchemaParser<?, ?> getSchemaParser(
String schemaParserClassName) {
if (schemaParsers.contains(schemaParserClassName)) {
return schemaParsers.get(schemaParserClassName);
} else {
try {
Class<KeyEntitySchemaParser<?, ?>> schemaParserClas... | java | @SuppressWarnings("unchecked")
private KeyEntitySchemaParser<?, ?> getSchemaParser(
String schemaParserClassName) {
if (schemaParsers.contains(schemaParserClassName)) {
return schemaParsers.get(schemaParserClassName);
} else {
try {
Class<KeyEntitySchemaParser<?, ?>> schemaParserClas... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"KeyEntitySchemaParser",
"<",
"?",
",",
"?",
">",
"getSchemaParser",
"(",
"String",
"schemaParserClassName",
")",
"{",
"if",
"(",
"schemaParsers",
".",
"contains",
"(",
"schemaParserClassName",
")",
")... | Get the schema parser by its classname. This method will cache the
constructed schema parsers.
@param schemaParserClassName
The class name of the schema parser
@return The constructed schema parser. | [
"Get",
"the",
"schema",
"parser",
"by",
"its",
"classname",
".",
"This",
"method",
"will",
"cache",
"the",
"constructed",
"schema",
"parsers",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java#L431-L450 |
120,031 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java | DefaultSchemaManager.getManagedSchemaVersions | private Map<Integer, String> getManagedSchemaVersions(String tableName,
String entityName) {
ManagedSchema managedSchema = getManagedSchema(tableName, entityName);
Map<Integer, String> returnMap = new HashMap<Integer, String>();
for (Map.Entry<String, String> versionsEntry : managedSchema
.ge... | java | private Map<Integer, String> getManagedSchemaVersions(String tableName,
String entityName) {
ManagedSchema managedSchema = getManagedSchema(tableName, entityName);
Map<Integer, String> returnMap = new HashMap<Integer, String>();
for (Map.Entry<String, String> versionsEntry : managedSchema
.ge... | [
"private",
"Map",
"<",
"Integer",
",",
"String",
">",
"getManagedSchemaVersions",
"(",
"String",
"tableName",
",",
"String",
"entityName",
")",
"{",
"ManagedSchema",
"managedSchema",
"=",
"getManagedSchema",
"(",
"tableName",
",",
"entityName",
")",
";",
"Map",
... | Get a map of schema versions for a managed schemas.
@param tableName
The table name of the managed schema.
@param entityName
The entity name of the managed schema.
@return The managed schema version map.
@throws SchemaNotFoundException
Thrown if a managed schema can't be found for the table name
entity name. | [
"Get",
"a",
"map",
"of",
"schema",
"versions",
"for",
"a",
"managed",
"schemas",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java#L464-L475 |
120,032 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java | DefaultSchemaManager.getManagedSchema | private ManagedSchema getManagedSchema(String tableName, String entityName) {
ManagedSchema managedSchema = getManagedSchemaFromSchemaMap(tableName,
entityName);
if (managedSchema == null) {
refreshManagedSchemaCache(tableName, entityName);
managedSchema = getManagedSchemaFromSchemaMap(table... | java | private ManagedSchema getManagedSchema(String tableName, String entityName) {
ManagedSchema managedSchema = getManagedSchemaFromSchemaMap(tableName,
entityName);
if (managedSchema == null) {
refreshManagedSchemaCache(tableName, entityName);
managedSchema = getManagedSchemaFromSchemaMap(table... | [
"private",
"ManagedSchema",
"getManagedSchema",
"(",
"String",
"tableName",
",",
"String",
"entityName",
")",
"{",
"ManagedSchema",
"managedSchema",
"=",
"getManagedSchemaFromSchemaMap",
"(",
"tableName",
",",
"entityName",
")",
";",
"if",
"(",
"managedSchema",
"==",
... | Get the ManagedSchema entity for the tableName, entityName managed schema.
@param tableName
The table name of the managed schema.
@param entityName
The entity name of the managed schema.
@return The ManagedSchema entity
@throws SchemaNotFoundException | [
"Get",
"the",
"ManagedSchema",
"entity",
"for",
"the",
"tableName",
"entityName",
"managed",
"schema",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java#L487-L500 |
120,033 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java | DefaultSchemaManager.validateCompatibleWithTableSchemas | private void validateCompatibleWithTableSchemas(String tableName,
KeySchema keySchema, EntitySchema entitySchema) {
List<ManagedSchema> entitiesForTable = new ArrayList<ManagedSchema>();
for (Entry<String, ManagedSchema> entry : getManagedSchemaMap().entrySet()) {
if (entry.getKey().startsWith(table... | java | private void validateCompatibleWithTableSchemas(String tableName,
KeySchema keySchema, EntitySchema entitySchema) {
List<ManagedSchema> entitiesForTable = new ArrayList<ManagedSchema>();
for (Entry<String, ManagedSchema> entry : getManagedSchemaMap().entrySet()) {
if (entry.getKey().startsWith(table... | [
"private",
"void",
"validateCompatibleWithTableSchemas",
"(",
"String",
"tableName",
",",
"KeySchema",
"keySchema",
",",
"EntitySchema",
"entitySchema",
")",
"{",
"List",
"<",
"ManagedSchema",
">",
"entitiesForTable",
"=",
"new",
"ArrayList",
"<",
"ManagedSchema",
">"... | Validate that a KeySchema and EntitySchema will be compatible with the
other schemas registered with a table. This includes making sure that the
schema doesn't overlap with columns other schemas for the table map to, and
validates that the key schemas are the same.
If validation fails, an IncompatibleSchemaException i... | [
"Validate",
"that",
"a",
"KeySchema",
"and",
"EntitySchema",
"will",
"be",
"compatible",
"with",
"the",
"other",
"schemas",
"registered",
"with",
"a",
"table",
".",
"This",
"includes",
"making",
"sure",
"that",
"the",
"schema",
"doesn",
"t",
"overlap",
"with",... | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java#L520-L571 |
120,034 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java | DefaultSchemaManager.validateCompatibleWithTableColumns | private boolean validateCompatibleWithTableColumns(
EntitySchema entitySchema1, EntitySchema entitySchema2) {
// Populate two collections of field mappings. One that contains all
// of the column mappings, and one that contains the keyAsColumn
// mappings from the first schema. These will be used to ... | java | private boolean validateCompatibleWithTableColumns(
EntitySchema entitySchema1, EntitySchema entitySchema2) {
// Populate two collections of field mappings. One that contains all
// of the column mappings, and one that contains the keyAsColumn
// mappings from the first schema. These will be used to ... | [
"private",
"boolean",
"validateCompatibleWithTableColumns",
"(",
"EntitySchema",
"entitySchema1",
",",
"EntitySchema",
"entitySchema2",
")",
"{",
"// Populate two collections of field mappings. One that contains all",
"// of the column mappings, and one that contains the keyAsColumn",
"// ... | Validate that two schemas for a table don't overlap in columns.
@param entitySchema1
The first schema to compare
@param entitySchema2
The second schema to compare
@return True if compatible, otherwise False. | [
"Validate",
"that",
"two",
"schemas",
"for",
"a",
"table",
"don",
"t",
"overlap",
"in",
"columns",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java#L582-L661 |
120,035 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java | DefaultSchemaManager.validateCompatibleWithTableOccVersion | private boolean validateCompatibleWithTableOccVersion(
EntitySchema entitySchema1, EntitySchema entitySchema2) {
boolean foundOccMapping = false;
for (FieldMapping fieldMapping : entitySchema1.getColumnMappingDescriptor()
.getFieldMappings()) {
if (fieldMapping.getMappingType() == MappingTyp... | java | private boolean validateCompatibleWithTableOccVersion(
EntitySchema entitySchema1, EntitySchema entitySchema2) {
boolean foundOccMapping = false;
for (FieldMapping fieldMapping : entitySchema1.getColumnMappingDescriptor()
.getFieldMappings()) {
if (fieldMapping.getMappingType() == MappingTyp... | [
"private",
"boolean",
"validateCompatibleWithTableOccVersion",
"(",
"EntitySchema",
"entitySchema1",
",",
"EntitySchema",
"entitySchema2",
")",
"{",
"boolean",
"foundOccMapping",
"=",
"false",
";",
"for",
"(",
"FieldMapping",
"fieldMapping",
":",
"entitySchema1",
".",
"... | Only one schema for a table should contain an OCCVersion field mapping.
This method will compare two schemas and return true if only one has an
OCC_VERSION field.
@param entitySchema1
The first schema to compare
@param entitySchema2
The second schema to compare
@return True if compatible, otherwise False. | [
"Only",
"one",
"schema",
"for",
"a",
"table",
"should",
"contain",
"an",
"OCCVersion",
"field",
"mapping",
".",
"This",
"method",
"will",
"compare",
"two",
"schemas",
"and",
"return",
"true",
"if",
"only",
"one",
"has",
"an",
"OCC_VERSION",
"field",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java#L687-L710 |
120,036 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/io/MemcmpDecoder.java | MemcmpDecoder.readInt | @Override
public int readInt() throws IOException {
byte[] intBytes = new byte[4];
int i = in.read(intBytes);
if (i < 4) {
throw new EOFException();
}
intBytes[0] = (byte) (intBytes[0] ^ 0x80);
int value = 0;
for (int j = 0; j < intBytes.length; ++j) {
value = (value << 8) + (... | java | @Override
public int readInt() throws IOException {
byte[] intBytes = new byte[4];
int i = in.read(intBytes);
if (i < 4) {
throw new EOFException();
}
intBytes[0] = (byte) (intBytes[0] ^ 0x80);
int value = 0;
for (int j = 0; j < intBytes.length; ++j) {
value = (value << 8) + (... | [
"@",
"Override",
"public",
"int",
"readInt",
"(",
")",
"throws",
"IOException",
"{",
"byte",
"[",
"]",
"intBytes",
"=",
"new",
"byte",
"[",
"4",
"]",
";",
"int",
"i",
"=",
"in",
".",
"read",
"(",
"intBytes",
")",
";",
"if",
"(",
"i",
"<",
"4",
... | A int was written by flipping the sign bit, and writing it as a big endian
int.
To decode, we do the reverse, flipping the sign bit, and reading the int
from the bytes.
@return The decoded int. | [
"A",
"int",
"was",
"written",
"by",
"flipping",
"the",
"sign",
"bit",
"and",
"writing",
"it",
"as",
"a",
"big",
"endian",
"int",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/io/MemcmpDecoder.java#L65-L79 |
120,037 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/io/MemcmpDecoder.java | MemcmpDecoder.readLong | @Override
public long readLong() throws IOException {
byte[] longBytes = new byte[8];
int i = in.read(longBytes);
if (i < 8) {
throw new EOFException();
}
longBytes[0] = (byte) (longBytes[0] ^ 0x80);
long value = 0;
for (int j = 0; j < longBytes.length; ++j) {
value = (value <... | java | @Override
public long readLong() throws IOException {
byte[] longBytes = new byte[8];
int i = in.read(longBytes);
if (i < 8) {
throw new EOFException();
}
longBytes[0] = (byte) (longBytes[0] ^ 0x80);
long value = 0;
for (int j = 0; j < longBytes.length; ++j) {
value = (value <... | [
"@",
"Override",
"public",
"long",
"readLong",
"(",
")",
"throws",
"IOException",
"{",
"byte",
"[",
"]",
"longBytes",
"=",
"new",
"byte",
"[",
"8",
"]",
";",
"int",
"i",
"=",
"in",
".",
"read",
"(",
"longBytes",
")",
";",
"if",
"(",
"i",
"<",
"8"... | A long was written by flipping the sign bit, and writing it as a big endian
long.
To decode, we do the reverse, flipping the sign bit, and reading the long
from the bytes.
@return The decoded long. | [
"A",
"long",
"was",
"written",
"by",
"flipping",
"the",
"sign",
"bit",
"and",
"writing",
"it",
"as",
"a",
"big",
"endian",
"long",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/io/MemcmpDecoder.java#L90-L104 |
120,038 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/io/MemcmpDecoder.java | MemcmpDecoder.readString | @Override
public Utf8 readString(Utf8 old) throws IOException {
ByteBuffer stringBytes = readBytes(null);
return new Utf8(stringBytes.array());
} | java | @Override
public Utf8 readString(Utf8 old) throws IOException {
ByteBuffer stringBytes = readBytes(null);
return new Utf8(stringBytes.array());
} | [
"@",
"Override",
"public",
"Utf8",
"readString",
"(",
"Utf8",
"old",
")",
"throws",
"IOException",
"{",
"ByteBuffer",
"stringBytes",
"=",
"readBytes",
"(",
"null",
")",
";",
"return",
"new",
"Utf8",
"(",
"stringBytes",
".",
"array",
"(",
")",
")",
";",
"... | A string is decoded by reading the string as bytes using the readBytes
function.
@return The decoded String. | [
"A",
"string",
"is",
"decoded",
"by",
"reading",
"the",
"string",
"as",
"bytes",
"using",
"the",
"readBytes",
"function",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/io/MemcmpDecoder.java#L152-L156 |
120,039 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/io/MemcmpDecoder.java | MemcmpDecoder.readBytes | @Override
public ByteBuffer readBytes(ByteBuffer old) throws IOException {
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
while (true) {
int byteRead = in.read();
if (byteRead < 0) {
throw new EOFException();
}
if (byteRead == 0) {
int secondByteRead = in... | java | @Override
public ByteBuffer readBytes(ByteBuffer old) throws IOException {
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
while (true) {
int byteRead = in.read();
if (byteRead < 0) {
throw new EOFException();
}
if (byteRead == 0) {
int secondByteRead = in... | [
"@",
"Override",
"public",
"ByteBuffer",
"readBytes",
"(",
"ByteBuffer",
"old",
")",
"throws",
"IOException",
"{",
"ByteArrayOutputStream",
"bytesOut",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"while",
"(",
"true",
")",
"{",
"int",
"byteRead",
"=",
... | Bytes are decoded by reading each byte until we find two consecutive 0
bytes. A 0 byte followed by a 1 byte is translated into a 0 byte.
@return the decoded byte buffer. | [
"Bytes",
"are",
"decoded",
"by",
"reading",
"each",
"byte",
"until",
"we",
"find",
"two",
"consecutive",
"0",
"bytes",
".",
"A",
"0",
"byte",
"followed",
"by",
"a",
"1",
"byte",
"is",
"translated",
"into",
"a",
"0",
"byte",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/io/MemcmpDecoder.java#L178-L206 |
120,040 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/io/MemcmpDecoder.java | MemcmpDecoder.readFixed | @Override
public void readFixed(byte[] bytes, int start, int length) throws IOException {
int i = in.read(bytes, start, length);
if (i < length) {
throw new EOFException();
}
} | java | @Override
public void readFixed(byte[] bytes, int start, int length) throws IOException {
int i = in.read(bytes, start, length);
if (i < length) {
throw new EOFException();
}
} | [
"@",
"Override",
"public",
"void",
"readFixed",
"(",
"byte",
"[",
"]",
"bytes",
",",
"int",
"start",
",",
"int",
"length",
")",
"throws",
"IOException",
"{",
"int",
"i",
"=",
"in",
".",
"read",
"(",
"bytes",
",",
"start",
",",
"length",
")",
";",
"... | A fixed is decoded by just reading length bytes, and placing the bytes read
into the bytes array, starting at index start.
@param bytes
The bytes array to populate.
@param start
The index in bytes to place the read bytes.
@param length
The number of bytes to read. | [
"A",
"fixed",
"is",
"decoded",
"by",
"just",
"reading",
"length",
"bytes",
"and",
"placing",
"the",
"bytes",
"read",
"into",
"the",
"bytes",
"array",
"starting",
"at",
"index",
"start",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/io/MemcmpDecoder.java#L227-L233 |
120,041 | kite-sdk/kite | kite-minicluster/src/main/java/org/apache/flume/sink/kite/KerberosUtil.java | KerberosUtil.runPrivileged | public static <T> T runPrivileged(UserGroupInformation login,
PrivilegedExceptionAction<T> action) {
try {
if (login == null) {
return action.run();
} else {
return login.doAs(action);
}
} catch (IOException ex) {
throw new DatasetIOExc... | java | public static <T> T runPrivileged(UserGroupInformation login,
PrivilegedExceptionAction<T> action) {
try {
if (login == null) {
return action.run();
} else {
return login.doAs(action);
}
} catch (IOException ex) {
throw new DatasetIOExc... | [
"public",
"static",
"<",
"T",
">",
"T",
"runPrivileged",
"(",
"UserGroupInformation",
"login",
",",
"PrivilegedExceptionAction",
"<",
"T",
">",
"action",
")",
"{",
"try",
"{",
"if",
"(",
"login",
"==",
"null",
")",
"{",
"return",
"action",
".",
"run",
"(... | Allow methods to act with the privileges of a login.
If the login is null, the current privileges will be used.
@param <T> The return type of the action
@param login UserGroupInformation credentials to use for action
@param action A PrivilegedExceptionAction to perform as another user
@return the T value returned by ... | [
"Allow",
"methods",
"to",
"act",
"with",
"the",
"privileges",
"of",
"a",
"login",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-minicluster/src/main/java/org/apache/flume/sink/kite/KerberosUtil.java#L159-L175 |
120,042 | kite-sdk/kite | kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/base/AbstractCommand.java | AbstractCommand.buildCommandChain | protected List<Command> buildCommandChain(Config rootConfig, String configKey, Command finalChild, boolean ignoreNotifications) {
Preconditions.checkNotNull(rootConfig);
Preconditions.checkNotNull(configKey);
Preconditions.checkNotNull(finalChild);
List<? extends Config> commandConfigs = new Configs().g... | java | protected List<Command> buildCommandChain(Config rootConfig, String configKey, Command finalChild, boolean ignoreNotifications) {
Preconditions.checkNotNull(rootConfig);
Preconditions.checkNotNull(configKey);
Preconditions.checkNotNull(finalChild);
List<? extends Config> commandConfigs = new Configs().g... | [
"protected",
"List",
"<",
"Command",
">",
"buildCommandChain",
"(",
"Config",
"rootConfig",
",",
"String",
"configKey",
",",
"Command",
"finalChild",
",",
"boolean",
"ignoreNotifications",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"rootConfig",
")",
";"... | Factory method to create the chain of commands rooted at the given rootConfig. The last command
in the chain will feed records into finalChild.
@param ignoreNotifications
if true indicates don't forward notifications at the end of the chain of commands.
This is a feature that multi-branch commands like tryRules and if... | [
"Factory",
"method",
"to",
"create",
"the",
"chain",
"of",
"commands",
"rooted",
"at",
"the",
"given",
"rootConfig",
".",
"The",
"last",
"command",
"in",
"the",
"chain",
"will",
"feed",
"records",
"into",
"finalChild",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/base/AbstractCommand.java#L239-L264 |
120,043 | kite-sdk/kite | kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/base/AbstractCommand.java | AbstractCommand.buildCommand | protected Command buildCommand(Config cmdConfig, Command currentParent, Command finalChild) {
Preconditions.checkNotNull(cmdConfig);
Preconditions.checkNotNull(currentParent);
Preconditions.checkNotNull(finalChild);
Set<Map.Entry<String, Object>> entries = cmdConfig.root().unwrapped().entrySet();... | java | protected Command buildCommand(Config cmdConfig, Command currentParent, Command finalChild) {
Preconditions.checkNotNull(cmdConfig);
Preconditions.checkNotNull(currentParent);
Preconditions.checkNotNull(finalChild);
Set<Map.Entry<String, Object>> entries = cmdConfig.root().unwrapped().entrySet();... | [
"protected",
"Command",
"buildCommand",
"(",
"Config",
"cmdConfig",
",",
"Command",
"currentParent",
",",
"Command",
"finalChild",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"cmdConfig",
")",
";",
"Preconditions",
".",
"checkNotNull",
"(",
"currentParent",... | Factory method to create a command rooted at the given cmdConfig. The command will feed records
into finalChild. The command will have currentParent as it's parent. | [
"Factory",
"method",
"to",
"create",
"a",
"command",
"rooted",
"at",
"the",
"given",
"cmdConfig",
".",
"The",
"command",
"will",
"feed",
"records",
"into",
"finalChild",
".",
"The",
"command",
"will",
"have",
"currentParent",
"as",
"it",
"s",
"parent",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/base/AbstractCommand.java#L270-L309 |
120,044 | kite-sdk/kite | kite-morphlines/kite-morphlines-solr-core/src/main/java/org/apache/solr/client/solrj/retry/RetryingSolrServer.java | RetryingSolrServer.limitStringLength | private String limitStringLength(String str) {
if (str.length() > MAX_STRING_LENGTH) {
str = str.substring(0, MAX_STRING_LENGTH) + " ...";
}
return str;
} | java | private String limitStringLength(String str) {
if (str.length() > MAX_STRING_LENGTH) {
str = str.substring(0, MAX_STRING_LENGTH) + " ...";
}
return str;
} | [
"private",
"String",
"limitStringLength",
"(",
"String",
"str",
")",
"{",
"if",
"(",
"str",
".",
"length",
"(",
")",
">",
"MAX_STRING_LENGTH",
")",
"{",
"str",
"=",
"str",
".",
"substring",
"(",
"0",
",",
"MAX_STRING_LENGTH",
")",
"+",
"\" ...\"",
";",
... | prevents gigantic messages | [
"prevents",
"gigantic",
"messages"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-solr-core/src/main/java/org/apache/solr/client/solrj/retry/RetryingSolrServer.java#L325-L330 |
120,045 | HubSpot/Singularity | SingularityService/src/main/java/com/hubspot/singularity/smtp/SmtpMailer.java | SmtpMailer.getRateLimitTemplateProperties | private Map<String, Object> getRateLimitTemplateProperties(SingularityRequest request, final SingularityEmailType emailType) {
final Builder<String, Object> templateProperties = ImmutableMap.<String, Object>builder();
templateProperties.put("singularityRequestLink", mailTemplateHelpers.getSingularityRequestLin... | java | private Map<String, Object> getRateLimitTemplateProperties(SingularityRequest request, final SingularityEmailType emailType) {
final Builder<String, Object> templateProperties = ImmutableMap.<String, Object>builder();
templateProperties.put("singularityRequestLink", mailTemplateHelpers.getSingularityRequestLin... | [
"private",
"Map",
"<",
"String",
",",
"Object",
">",
"getRateLimitTemplateProperties",
"(",
"SingularityRequest",
"request",
",",
"final",
"SingularityEmailType",
"emailType",
")",
"{",
"final",
"Builder",
"<",
"String",
",",
"Object",
">",
"templateProperties",
"="... | Add needed information to the rate limit email Jade context.
@param request SingularityRequest that the rate limit email is about.
@param emailType what the email is about.
@return template properties to add to the Jade context. | [
"Add",
"needed",
"information",
"to",
"the",
"rate",
"limit",
"email",
"Jade",
"context",
"."
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityService/src/main/java/com/hubspot/singularity/smtp/SmtpMailer.java#L687-L699 |
120,046 | HubSpot/Singularity | SingularityService/src/main/java/com/hubspot/singularity/smtp/SmtpMailer.java | SmtpMailer.queueMail | private void queueMail(final Collection<SingularityEmailDestination> destination, final SingularityRequest request, final SingularityEmailType emailType, final Optional<String> actionTaker, String subject, String body) {
RateLimitResult result = checkRateLimitForMail(request, emailType);
if (result == RateLimi... | java | private void queueMail(final Collection<SingularityEmailDestination> destination, final SingularityRequest request, final SingularityEmailType emailType, final Optional<String> actionTaker, String subject, String body) {
RateLimitResult result = checkRateLimitForMail(request, emailType);
if (result == RateLimi... | [
"private",
"void",
"queueMail",
"(",
"final",
"Collection",
"<",
"SingularityEmailDestination",
">",
"destination",
",",
"final",
"SingularityRequest",
"request",
",",
"final",
"SingularityEmailType",
"emailType",
",",
"final",
"Optional",
"<",
"String",
">",
"actionT... | Check to see if email should be rate limited, and if so, send a rate limit
email notification. Next attempt to email will immediately return.
@param destination collection of enum values used to specify who will receive this email.
@param request SingularityRequest this email is about.
@param emailType what the email ... | [
"Check",
"to",
"see",
"if",
"email",
"should",
"be",
"rate",
"limited",
"and",
"if",
"so",
"send",
"a",
"rate",
"limit",
"email",
"notification",
".",
"Next",
"attempt",
"to",
"email",
"will",
"immediately",
"return",
"."
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityService/src/main/java/com/hubspot/singularity/smtp/SmtpMailer.java#L712-L758 |
120,047 | HubSpot/Singularity | SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java | SingularityClient.getSingularityRequests | public Collection<SingularityRequestParent> getSingularityRequests() {
final Function<String, String> requestUri = (host) -> String.format(REQUESTS_FORMAT, getApiBase(host));
return getCollection(requestUri, "[ACTIVE, PAUSED, COOLDOWN] requests", REQUESTS_COLLECTION);
} | java | public Collection<SingularityRequestParent> getSingularityRequests() {
final Function<String, String> requestUri = (host) -> String.format(REQUESTS_FORMAT, getApiBase(host));
return getCollection(requestUri, "[ACTIVE, PAUSED, COOLDOWN] requests", REQUESTS_COLLECTION);
} | [
"public",
"Collection",
"<",
"SingularityRequestParent",
">",
"getSingularityRequests",
"(",
")",
"{",
"final",
"Function",
"<",
"String",
",",
"String",
">",
"requestUri",
"=",
"(",
"host",
")",
"-",
">",
"String",
".",
"format",
"(",
"REQUESTS_FORMAT",
",",
... | Get all singularity requests that their state is either ACTIVE, PAUSED or COOLDOWN
For the requests that are pending to become ACTIVE use:
{@link SingularityClient#getPendingSingularityRequests()}
For the requests that are cleaning up use:
{@link SingularityClient#getCleanupSingularityRequests()}
Use {@link Singula... | [
"Get",
"all",
"singularity",
"requests",
"that",
"their",
"state",
"is",
"either",
"ACTIVE",
"PAUSED",
"or",
"COOLDOWN"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L753-L757 |
120,048 | HubSpot/Singularity | SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java | SingularityClient.getActiveSingularityRequests | public Collection<SingularityRequestParent> getActiveSingularityRequests() {
final Function<String, String> requestUri = (host) -> String.format(REQUESTS_GET_ACTIVE_FORMAT, getApiBase(host));
return getCollection(requestUri, "ACTIVE requests", REQUESTS_COLLECTION);
} | java | public Collection<SingularityRequestParent> getActiveSingularityRequests() {
final Function<String, String> requestUri = (host) -> String.format(REQUESTS_GET_ACTIVE_FORMAT, getApiBase(host));
return getCollection(requestUri, "ACTIVE requests", REQUESTS_COLLECTION);
} | [
"public",
"Collection",
"<",
"SingularityRequestParent",
">",
"getActiveSingularityRequests",
"(",
")",
"{",
"final",
"Function",
"<",
"String",
",",
"String",
">",
"requestUri",
"=",
"(",
"host",
")",
"-",
">",
"String",
".",
"format",
"(",
"REQUESTS_GET_ACTIVE... | Get all requests that their state is ACTIVE
@return
All ACTIVE {@link SingularityRequestParent} instances | [
"Get",
"all",
"requests",
"that",
"their",
"state",
"is",
"ACTIVE"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L765-L769 |
120,049 | HubSpot/Singularity | SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java | SingularityClient.getPausedSingularityRequests | public Collection<SingularityRequestParent> getPausedSingularityRequests() {
final Function<String, String> requestUri = (host) -> String.format(REQUESTS_GET_PAUSED_FORMAT, getApiBase(host));
return getCollection(requestUri, "PAUSED requests", REQUESTS_COLLECTION);
} | java | public Collection<SingularityRequestParent> getPausedSingularityRequests() {
final Function<String, String> requestUri = (host) -> String.format(REQUESTS_GET_PAUSED_FORMAT, getApiBase(host));
return getCollection(requestUri, "PAUSED requests", REQUESTS_COLLECTION);
} | [
"public",
"Collection",
"<",
"SingularityRequestParent",
">",
"getPausedSingularityRequests",
"(",
")",
"{",
"final",
"Function",
"<",
"String",
",",
"String",
">",
"requestUri",
"=",
"(",
"host",
")",
"-",
">",
"String",
".",
"format",
"(",
"REQUESTS_GET_PAUSED... | Get all requests that their state is PAUSED
ACTIVE requests are paused by users, which is equivalent to stop their tasks from running without undeploying them
@return
All PAUSED {@link SingularityRequestParent} instances | [
"Get",
"all",
"requests",
"that",
"their",
"state",
"is",
"PAUSED",
"ACTIVE",
"requests",
"are",
"paused",
"by",
"users",
"which",
"is",
"equivalent",
"to",
"stop",
"their",
"tasks",
"from",
"running",
"without",
"undeploying",
"them"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L778-L782 |
120,050 | HubSpot/Singularity | SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java | SingularityClient.getCoolDownSingularityRequests | public Collection<SingularityRequestParent> getCoolDownSingularityRequests() {
final Function<String, String> requestUri = (host) -> String.format(REQUESTS_GET_COOLDOWN_FORMAT, getApiBase(host));
return getCollection(requestUri, "COOLDOWN requests", REQUESTS_COLLECTION);
} | java | public Collection<SingularityRequestParent> getCoolDownSingularityRequests() {
final Function<String, String> requestUri = (host) -> String.format(REQUESTS_GET_COOLDOWN_FORMAT, getApiBase(host));
return getCollection(requestUri, "COOLDOWN requests", REQUESTS_COLLECTION);
} | [
"public",
"Collection",
"<",
"SingularityRequestParent",
">",
"getCoolDownSingularityRequests",
"(",
")",
"{",
"final",
"Function",
"<",
"String",
",",
"String",
">",
"requestUri",
"=",
"(",
"host",
")",
"-",
">",
"String",
".",
"format",
"(",
"REQUESTS_GET_COOL... | Get all requests that has been set to a COOLDOWN state by singularity
@return
All {@link SingularityRequestParent} instances that their state is COOLDOWN | [
"Get",
"all",
"requests",
"that",
"has",
"been",
"set",
"to",
"a",
"COOLDOWN",
"state",
"by",
"singularity"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L790-L794 |
120,051 | HubSpot/Singularity | SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java | SingularityClient.getPendingSingularityRequests | public Collection<SingularityPendingRequest> getPendingSingularityRequests() {
final Function<String, String> requestUri = (host) -> String.format(REQUESTS_GET_PENDING_FORMAT, getApiBase(host));
return getCollection(requestUri, "pending requests", PENDING_REQUESTS_COLLECTION);
} | java | public Collection<SingularityPendingRequest> getPendingSingularityRequests() {
final Function<String, String> requestUri = (host) -> String.format(REQUESTS_GET_PENDING_FORMAT, getApiBase(host));
return getCollection(requestUri, "pending requests", PENDING_REQUESTS_COLLECTION);
} | [
"public",
"Collection",
"<",
"SingularityPendingRequest",
">",
"getPendingSingularityRequests",
"(",
")",
"{",
"final",
"Function",
"<",
"String",
",",
"String",
">",
"requestUri",
"=",
"(",
"host",
")",
"-",
">",
"String",
".",
"format",
"(",
"REQUESTS_GET_PEND... | Get all requests that are pending to become ACTIVE
@return
A collection of {@link SingularityPendingRequest} instances that hold information about the singularity requests that are pending to become ACTIVE | [
"Get",
"all",
"requests",
"that",
"are",
"pending",
"to",
"become",
"ACTIVE"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L802-L806 |
120,052 | HubSpot/Singularity | SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java | SingularityClient.getSlaves | public Collection<SingularitySlave> getSlaves(Optional<MachineState> slaveState) {
final Function<String, String> requestUri = (host) -> String.format(SLAVES_FORMAT, getApiBase(host));
Optional<Map<String, Object>> maybeQueryParams = Optional.absent();
String type = "slaves";
if (slaveState.isPresent... | java | public Collection<SingularitySlave> getSlaves(Optional<MachineState> slaveState) {
final Function<String, String> requestUri = (host) -> String.format(SLAVES_FORMAT, getApiBase(host));
Optional<Map<String, Object>> maybeQueryParams = Optional.absent();
String type = "slaves";
if (slaveState.isPresent... | [
"public",
"Collection",
"<",
"SingularitySlave",
">",
"getSlaves",
"(",
"Optional",
"<",
"MachineState",
">",
"slaveState",
")",
"{",
"final",
"Function",
"<",
"String",
",",
"String",
">",
"requestUri",
"=",
"(",
"host",
")",
"-",
">",
"String",
".",
"for... | Retrieve the list of all known slaves, optionally filtering by a particular slave state
@param slaveState
Optionally specify a particular state to filter slaves by
@return
A collection of {@link SingularitySlave} | [
"Retrieve",
"the",
"list",
"of",
"all",
"known",
"slaves",
"optionally",
"filtering",
"by",
"a",
"particular",
"slave",
"state"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L948-L962 |
120,053 | HubSpot/Singularity | SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java | SingularityClient.getSlave | public Optional<SingularitySlave> getSlave(String slaveId) {
final Function<String, String> requestUri = (host) -> String.format(SLAVE_DETAIL_FORMAT, getApiBase(host), slaveId);
return getSingle(requestUri, "slave", slaveId, SingularitySlave.class);
} | java | public Optional<SingularitySlave> getSlave(String slaveId) {
final Function<String, String> requestUri = (host) -> String.format(SLAVE_DETAIL_FORMAT, getApiBase(host), slaveId);
return getSingle(requestUri, "slave", slaveId, SingularitySlave.class);
} | [
"public",
"Optional",
"<",
"SingularitySlave",
">",
"getSlave",
"(",
"String",
"slaveId",
")",
"{",
"final",
"Function",
"<",
"String",
",",
"String",
">",
"requestUri",
"=",
"(",
"host",
")",
"-",
">",
"String",
".",
"format",
"(",
"SLAVE_DETAIL_FORMAT",
... | Retrieve a single slave by ID
@param slaveId
The slave ID to search for
@return
A {@link SingularitySlave} | [
"Retrieve",
"a",
"single",
"slave",
"by",
"ID"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L972-L976 |
120,054 | HubSpot/Singularity | SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java | SingularityClient.getHistoryForTask | public Optional<SingularityTaskHistory> getHistoryForTask(String taskId) {
final Function<String, String> requestUri = (host) -> String.format(TASK_HISTORY_FORMAT, getApiBase(host), taskId);
return getSingle(requestUri, "task history", taskId, SingularityTaskHistory.class);
} | java | public Optional<SingularityTaskHistory> getHistoryForTask(String taskId) {
final Function<String, String> requestUri = (host) -> String.format(TASK_HISTORY_FORMAT, getApiBase(host), taskId);
return getSingle(requestUri, "task history", taskId, SingularityTaskHistory.class);
} | [
"public",
"Optional",
"<",
"SingularityTaskHistory",
">",
"getHistoryForTask",
"(",
"String",
"taskId",
")",
"{",
"final",
"Function",
"<",
"String",
",",
"String",
">",
"requestUri",
"=",
"(",
"host",
")",
"-",
">",
"String",
".",
"format",
"(",
"TASK_HISTO... | Retrieve information about an inactive task by its id
@param taskId
The task ID to search for
@return
A {@link SingularityTaskIdHistory} object if the task exists | [
"Retrieve",
"information",
"about",
"an",
"inactive",
"task",
"by",
"its",
"id"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L1079-L1083 |
120,055 | HubSpot/Singularity | SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java | SingularityClient.getHistoryForTask | @Deprecated
public Optional<SingularityTaskIdHistory> getHistoryForTask(String requestId, String runId) {
return getTaskIdHistoryByRunId(requestId, runId);
} | java | @Deprecated
public Optional<SingularityTaskIdHistory> getHistoryForTask(String requestId, String runId) {
return getTaskIdHistoryByRunId(requestId, runId);
} | [
"@",
"Deprecated",
"public",
"Optional",
"<",
"SingularityTaskIdHistory",
">",
"getHistoryForTask",
"(",
"String",
"requestId",
",",
"String",
"runId",
")",
"{",
"return",
"getTaskIdHistoryByRunId",
"(",
"requestId",
",",
"runId",
")",
";",
"}"
] | Retrieve the task id and state for an inactive task by its runId
@param requestId
The request ID to search for
@param runId
The run ID to search for
@return
A {@link SingularityTaskIdHistory} object if the task exists
@deprecated use {@link #getTaskIdHistoryByRunId} | [
"Retrieve",
"the",
"task",
"id",
"and",
"state",
"for",
"an",
"inactive",
"task",
"by",
"its",
"runId"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L1151-L1154 |
120,056 | HubSpot/Singularity | SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java | SingularityClient.browseTaskSandBox | public Optional<SingularitySandbox> browseTaskSandBox(String taskId, String path) {
final Function<String, String> requestUrl = (host) -> String.format(SANDBOX_BROWSE_FORMAT, getApiBase(host), taskId);
return getSingleWithParams(requestUrl, "browse sandbox for task", taskId, Optional.of(ImmutableMap.of("path",... | java | public Optional<SingularitySandbox> browseTaskSandBox(String taskId, String path) {
final Function<String, String> requestUrl = (host) -> String.format(SANDBOX_BROWSE_FORMAT, getApiBase(host), taskId);
return getSingleWithParams(requestUrl, "browse sandbox for task", taskId, Optional.of(ImmutableMap.of("path",... | [
"public",
"Optional",
"<",
"SingularitySandbox",
">",
"browseTaskSandBox",
"(",
"String",
"taskId",
",",
"String",
"path",
")",
"{",
"final",
"Function",
"<",
"String",
",",
"String",
">",
"requestUrl",
"=",
"(",
"host",
")",
"-",
">",
"String",
".",
"form... | Retrieve information about a specific task's sandbox
@param taskId
The task ID to browse
@param path
The path to browse from.
if not specified it will browse from the sandbox root.
@return
A {@link SingularitySandbox} object that captures the information for the path to a specific task's Mesos sandbox | [
"Retrieve",
"information",
"about",
"a",
"specific",
"task",
"s",
"sandbox"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L1284-L1289 |
120,057 | HubSpot/Singularity | SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java | SingularityClient.readSandBoxFile | public Optional<MesosFileChunkObject> readSandBoxFile(String taskId, String path, Optional<String> grep, Optional<Long> offset, Optional<Long> length) {
final Function<String, String> requestUrl = (host) -> String.format(SANDBOX_READ_FILE_FORMAT, getApiBase(host), taskId);
Builder<String, Object> queryParamBui... | java | public Optional<MesosFileChunkObject> readSandBoxFile(String taskId, String path, Optional<String> grep, Optional<Long> offset, Optional<Long> length) {
final Function<String, String> requestUrl = (host) -> String.format(SANDBOX_READ_FILE_FORMAT, getApiBase(host), taskId);
Builder<String, Object> queryParamBui... | [
"public",
"Optional",
"<",
"MesosFileChunkObject",
">",
"readSandBoxFile",
"(",
"String",
"taskId",
",",
"String",
"path",
",",
"Optional",
"<",
"String",
">",
"grep",
",",
"Optional",
"<",
"Long",
">",
"offset",
",",
"Optional",
"<",
"Long",
">",
"length",
... | Retrieve part of the contents of a file in a specific task's sandbox.
@param taskId
The task ID of the sandbox to read from
@param path
The path to the file to be read. Relative to the sandbox root (without a leading slash)
@param grep
Optional string to grep for
@param offset
Byte offset to start reading from
@param ... | [
"Retrieve",
"part",
"of",
"the",
"contents",
"of",
"a",
"file",
"in",
"a",
"specific",
"task",
"s",
"sandbox",
"."
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L1307-L1323 |
120,058 | HubSpot/Singularity | SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java | SingularityClient.getTaskLogs | public Collection<SingularityS3Log> getTaskLogs(String taskId) {
final Function<String, String> requestUri = (host) -> String.format(S3_LOG_GET_TASK_LOGS, getApiBase(host), taskId);
final String type = String.format("S3 logs for task %s", taskId);
return getCollection(requestUri, type, S3_LOG_COLLECTION);... | java | public Collection<SingularityS3Log> getTaskLogs(String taskId) {
final Function<String, String> requestUri = (host) -> String.format(S3_LOG_GET_TASK_LOGS, getApiBase(host), taskId);
final String type = String.format("S3 logs for task %s", taskId);
return getCollection(requestUri, type, S3_LOG_COLLECTION);... | [
"public",
"Collection",
"<",
"SingularityS3Log",
">",
"getTaskLogs",
"(",
"String",
"taskId",
")",
"{",
"final",
"Function",
"<",
"String",
",",
"String",
">",
"requestUri",
"=",
"(",
"host",
")",
"-",
">",
"String",
".",
"format",
"(",
"S3_LOG_GET_TASK_LOGS... | Retrieve the list of logs stored in S3 for a specific task
@param taskId
The task ID to search for
@return
A collection of {@link SingularityS3Log} | [
"Retrieve",
"the",
"list",
"of",
"logs",
"stored",
"in",
"S3",
"for",
"a",
"specific",
"task"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L1338-L1344 |
120,059 | HubSpot/Singularity | SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java | SingularityClient.getRequestLogs | public Collection<SingularityS3Log> getRequestLogs(String requestId) {
final Function<String, String> requestUri = (host) -> String.format(S3_LOG_GET_REQUEST_LOGS, getApiBase(host), requestId);
final String type = String.format("S3 logs for request %s", requestId);
return getCollection(requestUri, type, S... | java | public Collection<SingularityS3Log> getRequestLogs(String requestId) {
final Function<String, String> requestUri = (host) -> String.format(S3_LOG_GET_REQUEST_LOGS, getApiBase(host), requestId);
final String type = String.format("S3 logs for request %s", requestId);
return getCollection(requestUri, type, S... | [
"public",
"Collection",
"<",
"SingularityS3Log",
">",
"getRequestLogs",
"(",
"String",
"requestId",
")",
"{",
"final",
"Function",
"<",
"String",
",",
"String",
">",
"requestUri",
"=",
"(",
"host",
")",
"-",
">",
"String",
".",
"format",
"(",
"S3_LOG_GET_REQ... | Retrieve the list of logs stored in S3 for a specific request
@param requestId
The request ID to search for
@return
A collection of {@link SingularityS3Log} | [
"Retrieve",
"the",
"list",
"of",
"logs",
"stored",
"in",
"S3",
"for",
"a",
"specific",
"request"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L1355-L1361 |
120,060 | HubSpot/Singularity | SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java | SingularityClient.getDeployLogs | public Collection<SingularityS3Log> getDeployLogs(String requestId, String deployId) {
final Function<String, String> requestUri = (host) -> String.format(S3_LOG_GET_DEPLOY_LOGS, getApiBase(host), requestId, deployId);
final String type = String.format("S3 logs for deploy %s of request %s", deployId, requestId... | java | public Collection<SingularityS3Log> getDeployLogs(String requestId, String deployId) {
final Function<String, String> requestUri = (host) -> String.format(S3_LOG_GET_DEPLOY_LOGS, getApiBase(host), requestId, deployId);
final String type = String.format("S3 logs for deploy %s of request %s", deployId, requestId... | [
"public",
"Collection",
"<",
"SingularityS3Log",
">",
"getDeployLogs",
"(",
"String",
"requestId",
",",
"String",
"deployId",
")",
"{",
"final",
"Function",
"<",
"String",
",",
"String",
">",
"requestUri",
"=",
"(",
"host",
")",
"-",
">",
"String",
".",
"f... | Retrieve the list of logs stored in S3 for a specific deploy if a singularity request
@param requestId
The request ID to search for
@param deployId
The deploy ID (within the specified request) to search for
@return
A collection of {@link SingularityS3Log} | [
"Retrieve",
"the",
"list",
"of",
"logs",
"stored",
"in",
"S3",
"for",
"a",
"specific",
"deploy",
"if",
"a",
"singularity",
"request"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L1374-L1380 |
120,061 | HubSpot/Singularity | SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java | SingularityClient.getRequestGroups | public Collection<SingularityRequestGroup> getRequestGroups() {
final Function<String, String> requestUri = (host) -> String.format(REQUEST_GROUPS_FORMAT, getApiBase(host));
return getCollection(requestUri, "request groups", REQUEST_GROUP_COLLECTION);
} | java | public Collection<SingularityRequestGroup> getRequestGroups() {
final Function<String, String> requestUri = (host) -> String.format(REQUEST_GROUPS_FORMAT, getApiBase(host));
return getCollection(requestUri, "request groups", REQUEST_GROUP_COLLECTION);
} | [
"public",
"Collection",
"<",
"SingularityRequestGroup",
">",
"getRequestGroups",
"(",
")",
"{",
"final",
"Function",
"<",
"String",
",",
"String",
">",
"requestUri",
"=",
"(",
"host",
")",
"-",
">",
"String",
".",
"format",
"(",
"REQUEST_GROUPS_FORMAT",
",",
... | Retrieve the list of request groups
@return
A collection of {@link SingularityRequestGroup} | [
"Retrieve",
"the",
"list",
"of",
"request",
"groups"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L1388-L1392 |
120,062 | HubSpot/Singularity | SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java | SingularityClient.getRequestGroup | public Optional<SingularityRequestGroup> getRequestGroup(String requestGroupId) {
final Function<String, String> requestUri = (host) -> String.format(REQUEST_GROUP_FORMAT, getApiBase(host), requestGroupId);
return getSingle(requestUri, "request group", requestGroupId, SingularityRequestGroup.class);
} | java | public Optional<SingularityRequestGroup> getRequestGroup(String requestGroupId) {
final Function<String, String> requestUri = (host) -> String.format(REQUEST_GROUP_FORMAT, getApiBase(host), requestGroupId);
return getSingle(requestUri, "request group", requestGroupId, SingularityRequestGroup.class);
} | [
"public",
"Optional",
"<",
"SingularityRequestGroup",
">",
"getRequestGroup",
"(",
"String",
"requestGroupId",
")",
"{",
"final",
"Function",
"<",
"String",
",",
"String",
">",
"requestUri",
"=",
"(",
"host",
")",
"-",
">",
"String",
".",
"format",
"(",
"REQ... | Retrieve a specific request group by id
@param requestGroupId
The request group ID to search for
@return
A {@link SingularityRequestGroup} | [
"Retrieve",
"a",
"specific",
"request",
"group",
"by",
"id"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L1403-L1407 |
120,063 | HubSpot/Singularity | SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java | SingularityClient.isUserAuthorized | public boolean isUserAuthorized(String requestId, String userId, SingularityAuthorizationScope scope) {
final Function<String, String> requestUri = (host) -> String.format(AUTH_CHECK_USER_FORMAT, getApiBase(host), requestId, userId);
Map<String, Object> params = Collections.singletonMap("scope", scope.name());
... | java | public boolean isUserAuthorized(String requestId, String userId, SingularityAuthorizationScope scope) {
final Function<String, String> requestUri = (host) -> String.format(AUTH_CHECK_USER_FORMAT, getApiBase(host), requestId, userId);
Map<String, Object> params = Collections.singletonMap("scope", scope.name());
... | [
"public",
"boolean",
"isUserAuthorized",
"(",
"String",
"requestId",
",",
"String",
"userId",
",",
"SingularityAuthorizationScope",
"scope",
")",
"{",
"final",
"Function",
"<",
"String",
",",
"String",
">",
"requestUri",
"=",
"(",
"host",
")",
"-",
">",
"Strin... | Check if a user is authorized for the specified scope on the specified request
@param requestId
The request to check authorization on
@param userId
The user whose authorization will be checked
@param scope
The scope to check that `user` has
@return
true if the user is authorized for scope, false otherwise | [
"Check",
"if",
"a",
"user",
"is",
"authorized",
"for",
"the",
"specified",
"scope",
"on",
"the",
"specified",
"request"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L1521-L1526 |
120,064 | HubSpot/Singularity | SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java | SingularityClient.getTaskState | public Optional<SingularityTaskState> getTaskState(String requestId, String runId) {
final Function<String, String> requestUri = (host) -> String.format(TRACK_BY_RUN_ID_FORMAT, getApiBase(host), requestId, runId);
return getSingle(requestUri, "track by task id", String.format("%s-%s", requestId, runId), Singula... | java | public Optional<SingularityTaskState> getTaskState(String requestId, String runId) {
final Function<String, String> requestUri = (host) -> String.format(TRACK_BY_RUN_ID_FORMAT, getApiBase(host), requestId, runId);
return getSingle(requestUri, "track by task id", String.format("%s-%s", requestId, runId), Singula... | [
"public",
"Optional",
"<",
"SingularityTaskState",
">",
"getTaskState",
"(",
"String",
"requestId",
",",
"String",
"runId",
")",
"{",
"final",
"Function",
"<",
"String",
",",
"String",
">",
"requestUri",
"=",
"(",
"host",
")",
"-",
">",
"String",
".",
"for... | Get the current state of a task by its run IDg
@param requestId
The request ID to search for the specified runId
@param runId
The run ID to search for
@return
A {@link SingularityTaskState} if the task was found among pending, active or inactive tasks | [
"Get",
"the",
"current",
"state",
"of",
"a",
"task",
"by",
"its",
"run",
"IDg"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L1577-L1580 |
120,065 | HubSpot/Singularity | SingularityService/src/main/java/com/hubspot/singularity/mesos/SingularityMesosTaskBuilder.java | SingularityMesosTaskBuilder.prepareCommand | private void prepareCommand(final TaskInfo.Builder bldr, final SingularityTaskId taskId, final SingularityTaskRequest task, final SingularityOfferHolder offerHolder, final Optional<long[]> ports) {
CommandInfo.Builder commandBldr = CommandInfo.newBuilder();
Optional<String> specifiedUser = task.getPendingTask(... | java | private void prepareCommand(final TaskInfo.Builder bldr, final SingularityTaskId taskId, final SingularityTaskRequest task, final SingularityOfferHolder offerHolder, final Optional<long[]> ports) {
CommandInfo.Builder commandBldr = CommandInfo.newBuilder();
Optional<String> specifiedUser = task.getPendingTask(... | [
"private",
"void",
"prepareCommand",
"(",
"final",
"TaskInfo",
".",
"Builder",
"bldr",
",",
"final",
"SingularityTaskId",
"taskId",
",",
"final",
"SingularityTaskRequest",
"task",
",",
"final",
"SingularityOfferHolder",
"offerHolder",
",",
"final",
"Optional",
"<",
... | Prepares the Mesos TaskInfo object when using the Mesos Default Executor. | [
"Prepares",
"the",
"Mesos",
"TaskInfo",
"object",
"when",
"using",
"the",
"Mesos",
"Default",
"Executor",
"."
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityService/src/main/java/com/hubspot/singularity/mesos/SingularityMesosTaskBuilder.java#L580-L619 |
120,066 | HubSpot/Singularity | SingularityService/src/main/java/com/hubspot/singularity/async/AsyncSemaphore.java | AsyncSemaphore.newBuilder | public static AsyncSemaphoreBuilder newBuilder(Supplier<Integer> concurrentRequestLimit, ScheduledExecutorService flushingExecutor) {
return new AsyncSemaphoreBuilder(new PermitSource(concurrentRequestLimit), flushingExecutor);
} | java | public static AsyncSemaphoreBuilder newBuilder(Supplier<Integer> concurrentRequestLimit, ScheduledExecutorService flushingExecutor) {
return new AsyncSemaphoreBuilder(new PermitSource(concurrentRequestLimit), flushingExecutor);
} | [
"public",
"static",
"AsyncSemaphoreBuilder",
"newBuilder",
"(",
"Supplier",
"<",
"Integer",
">",
"concurrentRequestLimit",
",",
"ScheduledExecutorService",
"flushingExecutor",
")",
"{",
"return",
"new",
"AsyncSemaphoreBuilder",
"(",
"new",
"PermitSource",
"(",
"concurrent... | Create an AsyncSemaphore with the given limit.
@param concurrentRequestLimit - A supplier saying how many concurrent requests are allowed | [
"Create",
"an",
"AsyncSemaphore",
"with",
"the",
"given",
"limit",
"."
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityService/src/main/java/com/hubspot/singularity/async/AsyncSemaphore.java#L47-L49 |
120,067 | HubSpot/Singularity | SingularityService/src/main/java/com/hubspot/singularity/async/AsyncSemaphore.java | AsyncSemaphore.tryEnqueueAttempt | private boolean tryEnqueueAttempt(DelayedExecution<T> delayedExecution) {
int rejectionThreshold = queueRejectionThreshold.get();
if (rejectionThreshold < 0) {
return requestQueue.offer(delayedExecution);
}
long stamp = stampedLock.readLock();
try {
while (requestQueue.size() < rejection... | java | private boolean tryEnqueueAttempt(DelayedExecution<T> delayedExecution) {
int rejectionThreshold = queueRejectionThreshold.get();
if (rejectionThreshold < 0) {
return requestQueue.offer(delayedExecution);
}
long stamp = stampedLock.readLock();
try {
while (requestQueue.size() < rejection... | [
"private",
"boolean",
"tryEnqueueAttempt",
"(",
"DelayedExecution",
"<",
"T",
">",
"delayedExecution",
")",
"{",
"int",
"rejectionThreshold",
"=",
"queueRejectionThreshold",
".",
"get",
"(",
")",
";",
"if",
"(",
"rejectionThreshold",
"<",
"0",
")",
"{",
"return"... | enqueue the attempt into our underlying queue. since it's expensive to dynamically
resize the queue, we have a separate rejection threshold which, if less than 0 is
ignored, but otherwise is the practical cap on the size of the queue. | [
"enqueue",
"the",
"attempt",
"into",
"our",
"underlying",
"queue",
".",
"since",
"it",
"s",
"expensive",
"to",
"dynamically",
"resize",
"the",
"queue",
"we",
"have",
"a",
"separate",
"rejection",
"threshold",
"which",
"if",
"less",
"than",
"0",
"is",
"ignore... | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityService/src/main/java/com/hubspot/singularity/async/AsyncSemaphore.java#L173-L194 |
120,068 | HubSpot/Singularity | SingularityService/src/main/java/com/hubspot/singularity/data/AuthTokenManager.java | AuthTokenManager.validateToken | private static boolean validateToken(String originalToken, String storedToken) throws NoSuchAlgorithmException, InvalidKeySpecException {
String[] parts = storedToken.split(":");
int iterations = Integer.parseInt(parts[0]);
byte[] salt = fromHex(parts[1]);
byte[] hash = fromHex(parts[2]);
PBEKeySpe... | java | private static boolean validateToken(String originalToken, String storedToken) throws NoSuchAlgorithmException, InvalidKeySpecException {
String[] parts = storedToken.split(":");
int iterations = Integer.parseInt(parts[0]);
byte[] salt = fromHex(parts[1]);
byte[] hash = fromHex(parts[2]);
PBEKeySpe... | [
"private",
"static",
"boolean",
"validateToken",
"(",
"String",
"originalToken",
",",
"String",
"storedToken",
")",
"throws",
"NoSuchAlgorithmException",
",",
"InvalidKeySpecException",
"{",
"String",
"[",
"]",
"parts",
"=",
"storedToken",
".",
"split",
"(",
"\":\""... | Implementation of PBKDF2WithHmacSHA1 | [
"Implementation",
"of",
"PBKDF2WithHmacSHA1"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityService/src/main/java/com/hubspot/singularity/data/AuthTokenManager.java#L91-L106 |
120,069 | HubSpot/Singularity | SingularityExecutor/src/main/java/com/hubspot/singularity/executor/SingularityExecutor.java | SingularityExecutor.registered | @Override
public void registered(ExecutorDriver executorDriver, Protos.ExecutorInfo executorInfo, Protos.FrameworkInfo frameworkInfo, Protos.SlaveInfo slaveInfo) {
LOG.debug("Registered {} with Mesos slave {} for framework {}", executorInfo.getExecutorId().getValue(), slaveInfo.getId().getValue(), frameworkInfo.g... | java | @Override
public void registered(ExecutorDriver executorDriver, Protos.ExecutorInfo executorInfo, Protos.FrameworkInfo frameworkInfo, Protos.SlaveInfo slaveInfo) {
LOG.debug("Registered {} with Mesos slave {} for framework {}", executorInfo.getExecutorId().getValue(), slaveInfo.getId().getValue(), frameworkInfo.g... | [
"@",
"Override",
"public",
"void",
"registered",
"(",
"ExecutorDriver",
"executorDriver",
",",
"Protos",
".",
"ExecutorInfo",
"executorInfo",
",",
"Protos",
".",
"FrameworkInfo",
"frameworkInfo",
",",
"Protos",
".",
"SlaveInfo",
"slaveInfo",
")",
"{",
"LOG",
".",
... | Invoked once the executor driver has been able to successfully
connect with Mesos. In particular, a scheduler can pass some
data to it's executors through the FrameworkInfo.ExecutorInfo's
data field. | [
"Invoked",
"once",
"the",
"executor",
"driver",
"has",
"been",
"able",
"to",
"successfully",
"connect",
"with",
"Mesos",
".",
"In",
"particular",
"a",
"scheduler",
"can",
"pass",
"some",
"data",
"to",
"it",
"s",
"executors",
"through",
"the",
"FrameworkInfo",
... | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityExecutor/src/main/java/com/hubspot/singularity/executor/SingularityExecutor.java#L42-L46 |
120,070 | HubSpot/Singularity | SingularityExecutor/src/main/java/com/hubspot/singularity/executor/SingularityExecutor.java | SingularityExecutor.reregistered | @Override
public void reregistered(ExecutorDriver executorDriver, Protos.SlaveInfo slaveInfo) {
LOG.debug("Re-registered with Mesos slave {}", slaveInfo.getId().getValue());
LOG.info("Re-registered with Mesos slave {}", MesosUtils.formatForLogging(slaveInfo));
} | java | @Override
public void reregistered(ExecutorDriver executorDriver, Protos.SlaveInfo slaveInfo) {
LOG.debug("Re-registered with Mesos slave {}", slaveInfo.getId().getValue());
LOG.info("Re-registered with Mesos slave {}", MesosUtils.formatForLogging(slaveInfo));
} | [
"@",
"Override",
"public",
"void",
"reregistered",
"(",
"ExecutorDriver",
"executorDriver",
",",
"Protos",
".",
"SlaveInfo",
"slaveInfo",
")",
"{",
"LOG",
".",
"debug",
"(",
"\"Re-registered with Mesos slave {}\"",
",",
"slaveInfo",
".",
"getId",
"(",
")",
".",
... | Invoked when the executor re-registers with a restarted slave. | [
"Invoked",
"when",
"the",
"executor",
"re",
"-",
"registers",
"with",
"a",
"restarted",
"slave",
"."
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityExecutor/src/main/java/com/hubspot/singularity/executor/SingularityExecutor.java#L51-L55 |
120,071 | HubSpot/Singularity | SingularityService/src/main/java/com/hubspot/singularity/mesos/SingularityMesosSchedulerClient.java | SingularityMesosSchedulerClient.subscribe | public void subscribe(URI mesosMasterURI, SingularityMesosScheduler scheduler) throws URISyntaxException {
FrameworkInfo frameworkInfo = buildFrameworkInfo();
if (mesosMasterURI == null || mesosMasterURI.getScheme().contains("zk")) {
throw new IllegalArgumentException(String.format("Must use master addr... | java | public void subscribe(URI mesosMasterURI, SingularityMesosScheduler scheduler) throws URISyntaxException {
FrameworkInfo frameworkInfo = buildFrameworkInfo();
if (mesosMasterURI == null || mesosMasterURI.getScheme().contains("zk")) {
throw new IllegalArgumentException(String.format("Must use master addr... | [
"public",
"void",
"subscribe",
"(",
"URI",
"mesosMasterURI",
",",
"SingularityMesosScheduler",
"scheduler",
")",
"throws",
"URISyntaxException",
"{",
"FrameworkInfo",
"frameworkInfo",
"=",
"buildFrameworkInfo",
"(",
")",
";",
"if",
"(",
"mesosMasterURI",
"==",
"null",... | The first call to mesos, needed to setup connection properly and identify
a framework.
@throws URISyntaxException if the URL provided was not a syntactically correct URL. | [
"The",
"first",
"call",
"to",
"mesos",
"needed",
"to",
"setup",
"connection",
"properly",
"and",
"identify",
"a",
"framework",
"."
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityService/src/main/java/com/hubspot/singularity/mesos/SingularityMesosSchedulerClient.java#L84-L112 |
120,072 | HubSpot/Singularity | SingularityService/src/main/java/com/hubspot/singularity/mesos/SingularityMesosSchedulerClient.java | SingularityMesosSchedulerClient.acknowledge | public void acknowledge(AgentID agentId, TaskID taskId, ByteString uuid) {
Builder acknowledge = build()
.setAcknowledge(Acknowledge.newBuilder().setAgentId(agentId).setTaskId(taskId).setUuid(uuid));
sendCall(acknowledge, Type.ACKNOWLEDGE);
} | java | public void acknowledge(AgentID agentId, TaskID taskId, ByteString uuid) {
Builder acknowledge = build()
.setAcknowledge(Acknowledge.newBuilder().setAgentId(agentId).setTaskId(taskId).setUuid(uuid));
sendCall(acknowledge, Type.ACKNOWLEDGE);
} | [
"public",
"void",
"acknowledge",
"(",
"AgentID",
"agentId",
",",
"TaskID",
"taskId",
",",
"ByteString",
"uuid",
")",
"{",
"Builder",
"acknowledge",
"=",
"build",
"(",
")",
".",
"setAcknowledge",
"(",
"Acknowledge",
".",
"newBuilder",
"(",
")",
".",
"setAgent... | Sent by the scheduler to acknowledge a status update. Note that with the new API, schedulers are responsible
for explicitly acknowledging the receipt of status updates that have status.uuid set. These status updates
are retried until they are acknowledged by the scheduler. The scheduler must not acknowledge status upda... | [
"Sent",
"by",
"the",
"scheduler",
"to",
"acknowledge",
"a",
"status",
"update",
".",
"Note",
"that",
"with",
"the",
"new",
"API",
"schedulers",
"are",
"responsible",
"for",
"explicitly",
"acknowledging",
"the",
"receipt",
"of",
"status",
"updates",
"that",
"ha... | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityService/src/main/java/com/hubspot/singularity/mesos/SingularityMesosSchedulerClient.java#L384-L388 |
120,073 | HubSpot/Singularity | SingularityService/src/main/java/com/hubspot/singularity/mesos/SingularityMesosSchedulerClient.java | SingularityMesosSchedulerClient.reconcile | public void reconcile(List<Reconcile.Task> tasks) {
Builder reconsile = build().setReconcile(Reconcile.newBuilder().addAllTasks(tasks));
sendCall(reconsile, Type.RECONCILE);
} | java | public void reconcile(List<Reconcile.Task> tasks) {
Builder reconsile = build().setReconcile(Reconcile.newBuilder().addAllTasks(tasks));
sendCall(reconsile, Type.RECONCILE);
} | [
"public",
"void",
"reconcile",
"(",
"List",
"<",
"Reconcile",
".",
"Task",
">",
"tasks",
")",
"{",
"Builder",
"reconsile",
"=",
"build",
"(",
")",
".",
"setReconcile",
"(",
"Reconcile",
".",
"newBuilder",
"(",
")",
".",
"addAllTasks",
"(",
"tasks",
")",
... | Sent by the scheduler to query the status of non-terminal tasks. This causes the master to send back UPDATE
events for each task in the list. Tasks that are no longer known to Mesos will result in TASK_LOST updates.
If the list of tasks is empty, master will send UPDATE events for all currently known tasks of the frame... | [
"Sent",
"by",
"the",
"scheduler",
"to",
"query",
"the",
"status",
"of",
"non",
"-",
"terminal",
"tasks",
".",
"This",
"causes",
"the",
"master",
"to",
"send",
"back",
"UPDATE",
"events",
"for",
"each",
"task",
"in",
"the",
"list",
".",
"Tasks",
"that",
... | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityService/src/main/java/com/hubspot/singularity/mesos/SingularityMesosSchedulerClient.java#L397-L400 |
120,074 | HubSpot/Singularity | SingularityService/src/main/java/com/hubspot/singularity/mesos/SingularityMesosSchedulerClient.java | SingularityMesosSchedulerClient.frameworkMessage | public void frameworkMessage(ExecutorID executorId, AgentID agentId, byte[] data) {
Builder message = build()
.setMessage(Message.newBuilder().setAgentId(agentId).setExecutorId(executorId).setData(ByteString.copyFrom(data)));
sendCall(message, Type.MESSAGE);
} | java | public void frameworkMessage(ExecutorID executorId, AgentID agentId, byte[] data) {
Builder message = build()
.setMessage(Message.newBuilder().setAgentId(agentId).setExecutorId(executorId).setData(ByteString.copyFrom(data)));
sendCall(message, Type.MESSAGE);
} | [
"public",
"void",
"frameworkMessage",
"(",
"ExecutorID",
"executorId",
",",
"AgentID",
"agentId",
",",
"byte",
"[",
"]",
"data",
")",
"{",
"Builder",
"message",
"=",
"build",
"(",
")",
".",
"setMessage",
"(",
"Message",
".",
"newBuilder",
"(",
")",
".",
... | Sent by the scheduler to send arbitrary binary data to the executor. Mesos neither interprets this data nor
makes any guarantees about the delivery of this message to the executor. data is raw bytes encoded in Base64.
@param executorId
@param agentId
@param data | [
"Sent",
"by",
"the",
"scheduler",
"to",
"send",
"arbitrary",
"binary",
"data",
"to",
"the",
"executor",
".",
"Mesos",
"neither",
"interprets",
"this",
"data",
"nor",
"makes",
"any",
"guarantees",
"about",
"the",
"delivery",
"of",
"this",
"message",
"to",
"th... | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityService/src/main/java/com/hubspot/singularity/mesos/SingularityMesosSchedulerClient.java#L410-L414 |
120,075 | HubSpot/Singularity | SingularityService/src/main/java/com/hubspot/singularity/async/CompletableFutures.java | CompletableFutures.timeoutFuture | public static CompletableFuture<Timeout> timeoutFuture(HashedWheelTimer hwt, long delay, TimeUnit timeUnit) {
try {
CompletableFuture<Timeout> future = new CompletableFuture<>();
hwt.newTimeout(future::complete, delay, timeUnit);
return future;
} catch (Throwable t) {
return exceptionalF... | java | public static CompletableFuture<Timeout> timeoutFuture(HashedWheelTimer hwt, long delay, TimeUnit timeUnit) {
try {
CompletableFuture<Timeout> future = new CompletableFuture<>();
hwt.newTimeout(future::complete, delay, timeUnit);
return future;
} catch (Throwable t) {
return exceptionalF... | [
"public",
"static",
"CompletableFuture",
"<",
"Timeout",
">",
"timeoutFuture",
"(",
"HashedWheelTimer",
"hwt",
",",
"long",
"delay",
",",
"TimeUnit",
"timeUnit",
")",
"{",
"try",
"{",
"CompletableFuture",
"<",
"Timeout",
">",
"future",
"=",
"new",
"CompletableFu... | Return a future that completes with a timeout after a delay. | [
"Return",
"a",
"future",
"that",
"completes",
"with",
"a",
"timeout",
"after",
"a",
"delay",
"."
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityService/src/main/java/com/hubspot/singularity/async/CompletableFutures.java#L43-L51 |
120,076 | HubSpot/Singularity | SingularityService/src/main/java/com/hubspot/singularity/resources/S3LogResource.java | S3LogResource.getS3PrefixesForTask | private Collection<String> getS3PrefixesForTask(S3Configuration s3Configuration, SingularityTaskId taskId, Optional<Long> startArg, Optional<Long> endArg, String group, SingularityUser user) {
Optional<SingularityTaskHistory> history = getTaskHistory(taskId, user);
long start = taskId.getStartedAt();
if (s... | java | private Collection<String> getS3PrefixesForTask(S3Configuration s3Configuration, SingularityTaskId taskId, Optional<Long> startArg, Optional<Long> endArg, String group, SingularityUser user) {
Optional<SingularityTaskHistory> history = getTaskHistory(taskId, user);
long start = taskId.getStartedAt();
if (s... | [
"private",
"Collection",
"<",
"String",
">",
"getS3PrefixesForTask",
"(",
"S3Configuration",
"s3Configuration",
",",
"SingularityTaskId",
"taskId",
",",
"Optional",
"<",
"Long",
">",
"startArg",
",",
"Optional",
"<",
"Long",
">",
"endArg",
",",
"String",
"group",
... | Generation of prefixes | [
"Generation",
"of",
"prefixes"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityService/src/main/java/com/hubspot/singularity/resources/S3LogResource.java#L137-L176 |
120,077 | HubSpot/Singularity | SingularityService/src/main/java/com/hubspot/singularity/resources/S3LogResource.java | S3LogResource.getRequestGroupForTask | private Optional<String> getRequestGroupForTask(final SingularityTaskId taskId, SingularityUser user) {
Optional<SingularityTaskHistory> maybeTaskHistory = getTaskHistory(taskId, user);
if (maybeTaskHistory.isPresent()) {
SingularityRequest request = maybeTaskHistory.get().getTask().getTaskRequest().getRe... | java | private Optional<String> getRequestGroupForTask(final SingularityTaskId taskId, SingularityUser user) {
Optional<SingularityTaskHistory> maybeTaskHistory = getTaskHistory(taskId, user);
if (maybeTaskHistory.isPresent()) {
SingularityRequest request = maybeTaskHistory.get().getTask().getTaskRequest().getRe... | [
"private",
"Optional",
"<",
"String",
">",
"getRequestGroupForTask",
"(",
"final",
"SingularityTaskId",
"taskId",
",",
"SingularityUser",
"user",
")",
"{",
"Optional",
"<",
"SingularityTaskHistory",
">",
"maybeTaskHistory",
"=",
"getTaskHistory",
"(",
"taskId",
",",
... | Finding request group | [
"Finding",
"request",
"group"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityService/src/main/java/com/hubspot/singularity/resources/S3LogResource.java#L520-L529 |
120,078 | HubSpot/Singularity | SingularityService/src/main/java/com/hubspot/singularity/data/WebhookManager.java | WebhookManager.saveTaskUpdateForRetry | public void saveTaskUpdateForRetry(SingularityTaskHistoryUpdate taskHistoryUpdate) {
String parentPath = ZKPaths.makePath(SNS_TASK_RETRY_ROOT, taskHistoryUpdate.getTaskId().getRequestId());
if (!isChildNodeCountSafe(parentPath)) {
LOG.warn("Too many queued webhooks for path {}, dropping", parentPath);
... | java | public void saveTaskUpdateForRetry(SingularityTaskHistoryUpdate taskHistoryUpdate) {
String parentPath = ZKPaths.makePath(SNS_TASK_RETRY_ROOT, taskHistoryUpdate.getTaskId().getRequestId());
if (!isChildNodeCountSafe(parentPath)) {
LOG.warn("Too many queued webhooks for path {}, dropping", parentPath);
... | [
"public",
"void",
"saveTaskUpdateForRetry",
"(",
"SingularityTaskHistoryUpdate",
"taskHistoryUpdate",
")",
"{",
"String",
"parentPath",
"=",
"ZKPaths",
".",
"makePath",
"(",
"SNS_TASK_RETRY_ROOT",
",",
"taskHistoryUpdate",
".",
"getTaskId",
"(",
")",
".",
"getRequestId"... | Methods for use with sns poller | [
"Methods",
"for",
"use",
"with",
"sns",
"poller"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityService/src/main/java/com/hubspot/singularity/data/WebhookManager.java#L208-L216 |
120,079 | HubSpot/Singularity | SingularityService/src/main/java/com/hubspot/singularity/smtp/MailTemplateHelpers.java | MailTemplateHelpers.getMaybeTaskLogReadOffset | private Optional<Long> getMaybeTaskLogReadOffset(final String slaveHostname, final String fullPath, final Long logLength, Optional<SingularityTask> task) {
long offset = 0;
long maxOffset = smtpConfiguration.get().getMaxTaskLogSearchOffset();
Optional<Pattern> maybePattern = getLogErrorRegex(task);
Patt... | java | private Optional<Long> getMaybeTaskLogReadOffset(final String slaveHostname, final String fullPath, final Long logLength, Optional<SingularityTask> task) {
long offset = 0;
long maxOffset = smtpConfiguration.get().getMaxTaskLogSearchOffset();
Optional<Pattern> maybePattern = getLogErrorRegex(task);
Patt... | [
"private",
"Optional",
"<",
"Long",
">",
"getMaybeTaskLogReadOffset",
"(",
"final",
"String",
"slaveHostname",
",",
"final",
"String",
"fullPath",
",",
"final",
"Long",
"logLength",
",",
"Optional",
"<",
"SingularityTask",
">",
"task",
")",
"{",
"long",
"offset"... | Searches through the file, looking for first error | [
"Searches",
"through",
"the",
"file",
"looking",
"for",
"first",
"error"
] | 384a8c16a10aa076af5ca45c8dfcedab9e5122c8 | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityService/src/main/java/com/hubspot/singularity/smtp/MailTemplateHelpers.java#L236-L280 |
120,080 | rhuss/jolokia | agent/core/src/main/java/org/jolokia/backend/MBeanServerHandler.java | MBeanServerHandler.createMBeanPluginContext | private MBeanPluginContext createMBeanPluginContext() {
return new MBeanPluginContext() {
public ObjectName registerMBean(Object pMBean, String... pOptionalName) throws MalformedObjectNameException, NotCompliantMBeanException, InstanceAlreadyExistsException {
return MBeanServerHandle... | java | private MBeanPluginContext createMBeanPluginContext() {
return new MBeanPluginContext() {
public ObjectName registerMBean(Object pMBean, String... pOptionalName) throws MalformedObjectNameException, NotCompliantMBeanException, InstanceAlreadyExistsException {
return MBeanServerHandle... | [
"private",
"MBeanPluginContext",
"createMBeanPluginContext",
"(",
")",
"{",
"return",
"new",
"MBeanPluginContext",
"(",
")",
"{",
"public",
"ObjectName",
"registerMBean",
"(",
"Object",
"pMBean",
",",
"String",
"...",
"pOptionalName",
")",
"throws",
"MalformedObjectNa... | Delegate to internal objects | [
"Delegate",
"to",
"internal",
"objects"
] | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/backend/MBeanServerHandler.java#L106-L128 |
120,081 | rhuss/jolokia | agent/core/src/main/java/org/jolokia/backend/MBeanServerHandler.java | MBeanServerHandler.initServerHandle | private void initServerHandle(Configuration pConfig, LogHandler pLogHandler, List<ServerDetector> pDetectors) {
serverHandle = detectServers(pDetectors, pLogHandler);
if (serverHandle != null) {
serverHandle.postDetect(mBeanServerManager, pConfig, pLogHandler);
}
} | java | private void initServerHandle(Configuration pConfig, LogHandler pLogHandler, List<ServerDetector> pDetectors) {
serverHandle = detectServers(pDetectors, pLogHandler);
if (serverHandle != null) {
serverHandle.postDetect(mBeanServerManager, pConfig, pLogHandler);
}
} | [
"private",
"void",
"initServerHandle",
"(",
"Configuration",
"pConfig",
",",
"LogHandler",
"pLogHandler",
",",
"List",
"<",
"ServerDetector",
">",
"pDetectors",
")",
"{",
"serverHandle",
"=",
"detectServers",
"(",
"pDetectors",
",",
"pLogHandler",
")",
";",
"if",
... | Initialize the server handle.
@param pConfig configuration passed through to the server detectors
@param pLogHandler used for putting out diagnostic messags
@param pDetectors all detectors known | [
"Initialize",
"the",
"server",
"handle",
"."
] | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/backend/MBeanServerHandler.java#L137-L142 |
120,082 | rhuss/jolokia | agent/core/src/main/java/org/jolokia/backend/MBeanServerHandler.java | MBeanServerHandler.dispatchRequest | public Object dispatchRequest(JsonRequestHandler pRequestHandler, JmxRequest pJmxReq)
throws InstanceNotFoundException, AttributeNotFoundException, ReflectionException, MBeanException, NotChangedException {
serverHandle.preDispatch(mBeanServerManager,pJmxReq);
if (pRequestHandler.handleAllSe... | java | public Object dispatchRequest(JsonRequestHandler pRequestHandler, JmxRequest pJmxReq)
throws InstanceNotFoundException, AttributeNotFoundException, ReflectionException, MBeanException, NotChangedException {
serverHandle.preDispatch(mBeanServerManager,pJmxReq);
if (pRequestHandler.handleAllSe... | [
"public",
"Object",
"dispatchRequest",
"(",
"JsonRequestHandler",
"pRequestHandler",
",",
"JmxRequest",
"pJmxReq",
")",
"throws",
"InstanceNotFoundException",
",",
"AttributeNotFoundException",
",",
"ReflectionException",
",",
"MBeanException",
",",
"NotChangedException",
"{"... | Dispatch a request to the MBeanServer which can handle it
@param pRequestHandler request handler to be called with an MBeanServer
@param pJmxReq the request to dispatch
@return the result of the request | [
"Dispatch",
"a",
"request",
"to",
"the",
"MBeanServer",
"which",
"can",
"handle",
"it"
] | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/backend/MBeanServerHandler.java#L151-L163 |
120,083 | rhuss/jolokia | agent/core/src/main/java/org/jolokia/backend/MBeanServerHandler.java | MBeanServerHandler.registerMBean | public final ObjectName registerMBean(Object pMBean,String ... pOptionalName)
throws MalformedObjectNameException, NotCompliantMBeanException, InstanceAlreadyExistsException {
synchronized (mBeanHandles) {
MBeanServer server = ManagementFactory.getPlatformMBeanServer();
try {... | java | public final ObjectName registerMBean(Object pMBean,String ... pOptionalName)
throws MalformedObjectNameException, NotCompliantMBeanException, InstanceAlreadyExistsException {
synchronized (mBeanHandles) {
MBeanServer server = ManagementFactory.getPlatformMBeanServer();
try {... | [
"public",
"final",
"ObjectName",
"registerMBean",
"(",
"Object",
"pMBean",
",",
"String",
"...",
"pOptionalName",
")",
"throws",
"MalformedObjectNameException",
",",
"NotCompliantMBeanException",
",",
"InstanceAlreadyExistsException",
"{",
"synchronized",
"(",
"mBeanHandles... | Register a MBean under a certain name to the platform MBeanServer
@param pMBean MBean to register
@param pOptionalName optional name under which the bean should be registered. If not provided,
it depends on whether the MBean to register implements {@link javax.management.MBeanRegistration} or
not.
@return the name un... | [
"Register",
"a",
"MBean",
"under",
"a",
"certain",
"name",
"to",
"the",
"platform",
"MBeanServer"
] | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/backend/MBeanServerHandler.java#L175-L190 |
120,084 | rhuss/jolokia | agent/core/src/main/java/org/jolokia/backend/MBeanServerHandler.java | MBeanServerHandler.destroy | public final void destroy() throws JMException {
synchronized (mBeanHandles) {
List<JMException> exceptions = new ArrayList<JMException>();
List<MBeanHandle> unregistered = new ArrayList<MBeanHandle>();
for (MBeanHandle handle : mBeanHandles) {
try {
... | java | public final void destroy() throws JMException {
synchronized (mBeanHandles) {
List<JMException> exceptions = new ArrayList<JMException>();
List<MBeanHandle> unregistered = new ArrayList<MBeanHandle>();
for (MBeanHandle handle : mBeanHandles) {
try {
... | [
"public",
"final",
"void",
"destroy",
"(",
")",
"throws",
"JMException",
"{",
"synchronized",
"(",
"mBeanHandles",
")",
"{",
"List",
"<",
"JMException",
">",
"exceptions",
"=",
"new",
"ArrayList",
"<",
"JMException",
">",
"(",
")",
";",
"List",
"<",
"MBean... | Unregister all previously registered MBean. This is tried for all previously
registered MBeans
@throws JMException if an exception occurs during unregistration | [
"Unregister",
"all",
"previously",
"registered",
"MBean",
".",
"This",
"is",
"tried",
"for",
"all",
"previously",
"registered",
"MBeans"
] | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/backend/MBeanServerHandler.java#L198-L229 |
120,085 | rhuss/jolokia | agent/core/src/main/java/org/jolokia/backend/MBeanServerHandler.java | MBeanServerHandler.initMBean | private void initMBean() {
try {
registerMBean(this,getObjectName());
} catch (InstanceAlreadyExistsException exp) {
// This is no problem, since this MBeanServerHandlerMBean holds only global information
// with no special state (so all instances of this MBean behav... | java | private void initMBean() {
try {
registerMBean(this,getObjectName());
} catch (InstanceAlreadyExistsException exp) {
// This is no problem, since this MBeanServerHandlerMBean holds only global information
// with no special state (so all instances of this MBean behav... | [
"private",
"void",
"initMBean",
"(",
")",
"{",
"try",
"{",
"registerMBean",
"(",
"this",
",",
"getObjectName",
"(",
")",
")",
";",
"}",
"catch",
"(",
"InstanceAlreadyExistsException",
"exp",
")",
"{",
"// This is no problem, since this MBeanServerHandlerMBean holds on... | Initialise this server handler and register as an MBean | [
"Initialise",
"this",
"server",
"handler",
"and",
"register",
"as",
"an",
"MBean"
] | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/backend/MBeanServerHandler.java#L255-L270 |
120,086 | rhuss/jolokia | agent/core/src/main/java/org/jolokia/backend/MBeanServerHandler.java | MBeanServerHandler.lookupDetectors | public static List<ServerDetector> lookupDetectors() {
List<ServerDetector> detectors =
ServiceObjectFactory.createServiceObjects("META-INF/detectors-default", "META-INF/detectors");
// An detector at the end of the chain in order to get a default handle
detectors.add(new Fallbac... | java | public static List<ServerDetector> lookupDetectors() {
List<ServerDetector> detectors =
ServiceObjectFactory.createServiceObjects("META-INF/detectors-default", "META-INF/detectors");
// An detector at the end of the chain in order to get a default handle
detectors.add(new Fallbac... | [
"public",
"static",
"List",
"<",
"ServerDetector",
">",
"lookupDetectors",
"(",
")",
"{",
"List",
"<",
"ServerDetector",
">",
"detectors",
"=",
"ServiceObjectFactory",
".",
"createServiceObjects",
"(",
"\"META-INF/detectors-default\"",
",",
"\"META-INF/detectors\"",
")"... | Lookup all registered detectors + a default detector | [
"Lookup",
"all",
"registered",
"detectors",
"+",
"a",
"default",
"detector"
] | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/backend/MBeanServerHandler.java#L273-L279 |
120,087 | rhuss/jolokia | agent/core/src/main/java/org/jolokia/backend/MBeanServerHandler.java | MBeanServerHandler.detectServers | private ServerHandle detectServers(List<ServerDetector> pDetectors, LogHandler pLogHandler) {
// Now detect the server
for (ServerDetector detector : pDetectors) {
try {
ServerHandle info = detector.detect(mBeanServerManager);
if (info != null) {
... | java | private ServerHandle detectServers(List<ServerDetector> pDetectors, LogHandler pLogHandler) {
// Now detect the server
for (ServerDetector detector : pDetectors) {
try {
ServerHandle info = detector.detect(mBeanServerManager);
if (info != null) {
... | [
"private",
"ServerHandle",
"detectServers",
"(",
"List",
"<",
"ServerDetector",
">",
"pDetectors",
",",
"LogHandler",
"pLogHandler",
")",
"{",
"// Now detect the server",
"for",
"(",
"ServerDetector",
"detector",
":",
"pDetectors",
")",
"{",
"try",
"{",
"ServerHandl... | by a lookup mechanism, queried and thrown away after this method | [
"by",
"a",
"lookup",
"mechanism",
"queried",
"and",
"thrown",
"away",
"after",
"this",
"method"
] | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/backend/MBeanServerHandler.java#L287-L303 |
120,088 | rhuss/jolokia | agent/core/src/main/java/org/jolokia/converter/json/TabularDataExtractor.java | TabularDataExtractor.hasComplexKeys | private boolean hasComplexKeys(TabularType pType) {
List<String> indexes = pType.getIndexNames();
CompositeType rowType = pType.getRowType();
for (String index : indexes) {
if ( ! (rowType.getType(index) instanceof SimpleType)) {
return true;
}
}
... | java | private boolean hasComplexKeys(TabularType pType) {
List<String> indexes = pType.getIndexNames();
CompositeType rowType = pType.getRowType();
for (String index : indexes) {
if ( ! (rowType.getType(index) instanceof SimpleType)) {
return true;
}
}
... | [
"private",
"boolean",
"hasComplexKeys",
"(",
"TabularType",
"pType",
")",
"{",
"List",
"<",
"String",
">",
"indexes",
"=",
"pType",
".",
"getIndexNames",
"(",
")",
";",
"CompositeType",
"rowType",
"=",
"pType",
".",
"getRowType",
"(",
")",
";",
"for",
"(",... | Check, whether all keys are simple types or not | [
"Check",
"whether",
"all",
"keys",
"are",
"simple",
"types",
"or",
"not"
] | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/converter/json/TabularDataExtractor.java#L164-L173 |
120,089 | rhuss/jolokia | agent/core/src/main/java/org/jolokia/converter/json/TabularDataExtractor.java | TabularDataExtractor.convertTabularDataDirectly | private Object convertTabularDataDirectly(TabularData pTd, Stack<String> pExtraArgs, ObjectToJsonConverter pConverter)
throws AttributeNotFoundException {
if (!pExtraArgs.empty()) {
throw new IllegalArgumentException("Cannot use a path for converting tabular data with complex keys (" +
... | java | private Object convertTabularDataDirectly(TabularData pTd, Stack<String> pExtraArgs, ObjectToJsonConverter pConverter)
throws AttributeNotFoundException {
if (!pExtraArgs.empty()) {
throw new IllegalArgumentException("Cannot use a path for converting tabular data with complex keys (" +
... | [
"private",
"Object",
"convertTabularDataDirectly",
"(",
"TabularData",
"pTd",
",",
"Stack",
"<",
"String",
">",
"pExtraArgs",
",",
"ObjectToJsonConverter",
"pConverter",
")",
"throws",
"AttributeNotFoundException",
"{",
"if",
"(",
"!",
"pExtraArgs",
".",
"empty",
"(... | Convert to a direct representation of the tabular data | [
"Convert",
"to",
"a",
"direct",
"representation",
"of",
"the",
"tabular",
"data"
] | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/converter/json/TabularDataExtractor.java#L208-L230 |
120,090 | rhuss/jolokia | agent/core/src/main/java/org/jolokia/restrictor/policy/MBeanPolicyConfig.java | MBeanPolicyConfig.findMatchingMBeanPattern | ObjectName findMatchingMBeanPattern(ObjectName pName) {
// Check all stored patterns for a match and return the pattern if one is found
for (ObjectName pattern : patterns) {
if (pattern.apply(pName)) {
return pattern;
}
}
return null;
} | java | ObjectName findMatchingMBeanPattern(ObjectName pName) {
// Check all stored patterns for a match and return the pattern if one is found
for (ObjectName pattern : patterns) {
if (pattern.apply(pName)) {
return pattern;
}
}
return null;
} | [
"ObjectName",
"findMatchingMBeanPattern",
"(",
"ObjectName",
"pName",
")",
"{",
"// Check all stored patterns for a match and return the pattern if one is found",
"for",
"(",
"ObjectName",
"pattern",
":",
"patterns",
")",
"{",
"if",
"(",
"pattern",
".",
"apply",
"(",
"pNa... | Given a MBean name return a pattern previously added and which matches this MBean name. Note,
that patterns might not overlap since the order in which they are tried is undefined.
@param pName name to match against
@return the pattern found or <code>null</code> if none has been found. | [
"Given",
"a",
"MBean",
"name",
"return",
"a",
"pattern",
"previously",
"added",
"and",
"which",
"matches",
"this",
"MBean",
"name",
".",
"Note",
"that",
"patterns",
"might",
"not",
"overlap",
"since",
"the",
"order",
"in",
"which",
"they",
"are",
"tried",
... | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/restrictor/policy/MBeanPolicyConfig.java#L92-L100 |
120,091 | rhuss/jolokia | agent/jvm/src/main/java/org/jolokia/jvmagent/client/util/ToolsClassFinder.java | ToolsClassFinder.createClassLoader | private static ClassLoader createClassLoader(File toolsJar) throws MalformedURLException {
final URL urls[] = new URL[] {toolsJar.toURI().toURL() };
if (System.getSecurityManager() == null) {
return new URLClassLoader(urls, getParentClassLoader());
} else {
return AccessC... | java | private static ClassLoader createClassLoader(File toolsJar) throws MalformedURLException {
final URL urls[] = new URL[] {toolsJar.toURI().toURL() };
if (System.getSecurityManager() == null) {
return new URLClassLoader(urls, getParentClassLoader());
} else {
return AccessC... | [
"private",
"static",
"ClassLoader",
"createClassLoader",
"(",
"File",
"toolsJar",
")",
"throws",
"MalformedURLException",
"{",
"final",
"URL",
"urls",
"[",
"]",
"=",
"new",
"URL",
"[",
"]",
"{",
"toolsJar",
".",
"toURI",
"(",
")",
".",
"toURL",
"(",
")",
... | Create a classloader and respect a security manager if installed | [
"Create",
"a",
"classloader",
"and",
"respect",
"a",
"security",
"manager",
"if",
"installed"
] | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/jvm/src/main/java/org/jolokia/jvmagent/client/util/ToolsClassFinder.java#L99-L111 |
120,092 | rhuss/jolokia | agent/osgi/src/main/java/org/jolokia/osgi/security/BaseAuthenticator.java | BaseAuthenticator.authenticate | public boolean authenticate(HttpServletRequest pRequest) {
String auth = pRequest.getHeader("Authorization");
if (auth == null) {
return false;
}
AuthorizationHeaderParser.Result authInfo = AuthorizationHeaderParser.parse(auth);
return authInfo.isValid() && doAuthenti... | java | public boolean authenticate(HttpServletRequest pRequest) {
String auth = pRequest.getHeader("Authorization");
if (auth == null) {
return false;
}
AuthorizationHeaderParser.Result authInfo = AuthorizationHeaderParser.parse(auth);
return authInfo.isValid() && doAuthenti... | [
"public",
"boolean",
"authenticate",
"(",
"HttpServletRequest",
"pRequest",
")",
"{",
"String",
"auth",
"=",
"pRequest",
".",
"getHeader",
"(",
"\"Authorization\"",
")",
";",
"if",
"(",
"auth",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"Authorizat... | Authenticate the given request
@param pRequest request to examine
@return true if authentication passes, false otherwise | [
"Authenticate",
"the",
"given",
"request"
] | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/osgi/src/main/java/org/jolokia/osgi/security/BaseAuthenticator.java#L18-L25 |
120,093 | rhuss/jolokia | agent/osgi/src/main/java/org/jolokia/osgi/security/AuthorizationHeaderParser.java | AuthorizationHeaderParser.parse | public static Result parse(String pAuthInfo) {
StringTokenizer stok = new StringTokenizer(pAuthInfo);
String method = stok.nextToken();
if (!HttpServletRequest.BASIC_AUTH.equalsIgnoreCase(method)) {
throw new IllegalArgumentException("Only BasicAuthentication is supported");
... | java | public static Result parse(String pAuthInfo) {
StringTokenizer stok = new StringTokenizer(pAuthInfo);
String method = stok.nextToken();
if (!HttpServletRequest.BASIC_AUTH.equalsIgnoreCase(method)) {
throw new IllegalArgumentException("Only BasicAuthentication is supported");
... | [
"public",
"static",
"Result",
"parse",
"(",
"String",
"pAuthInfo",
")",
"{",
"StringTokenizer",
"stok",
"=",
"new",
"StringTokenizer",
"(",
"pAuthInfo",
")",
";",
"String",
"method",
"=",
"stok",
".",
"nextToken",
"(",
")",
";",
"if",
"(",
"!",
"HttpServle... | Parse the HTTP authorization header
@param pAuthInfo header to parse
@return method, user, password and whehter the header was valid | [
"Parse",
"the",
"HTTP",
"authorization",
"header"
] | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/osgi/src/main/java/org/jolokia/osgi/security/AuthorizationHeaderParser.java#L35-L59 |
120,094 | rhuss/jolokia | agent/core/src/main/java/org/jolokia/handler/ReadHandler.java | ReadHandler.doHandleRequest | @Override
public Object doHandleRequest(MBeanServerConnection pServer, JmxReadRequest pRequest)
throws InstanceNotFoundException, AttributeNotFoundException, ReflectionException, MBeanException, IOException {
checkRestriction(pRequest.getObjectName(), pRequest.getAttributeName());
return... | java | @Override
public Object doHandleRequest(MBeanServerConnection pServer, JmxReadRequest pRequest)
throws InstanceNotFoundException, AttributeNotFoundException, ReflectionException, MBeanException, IOException {
checkRestriction(pRequest.getObjectName(), pRequest.getAttributeName());
return... | [
"@",
"Override",
"public",
"Object",
"doHandleRequest",
"(",
"MBeanServerConnection",
"pServer",
",",
"JmxReadRequest",
"pRequest",
")",
"throws",
"InstanceNotFoundException",
",",
"AttributeNotFoundException",
",",
"ReflectionException",
",",
"MBeanException",
",",
"IOExce... | Used for a request to a single attribute from a single MBean. Merging of MBeanServers is done
one layer above.
@param pServer server on which to request the attribute
@param pRequest the request itself.
@return the attribute's value | [
"Used",
"for",
"a",
"request",
"to",
"a",
"single",
"attribute",
"from",
"a",
"single",
"MBean",
".",
"Merging",
"of",
"MBeanServers",
"is",
"done",
"one",
"layer",
"above",
"."
] | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/handler/ReadHandler.java#L102-L107 |
120,095 | rhuss/jolokia | agent/core/src/main/java/org/jolokia/handler/ReadHandler.java | ReadHandler.filterAttributeNames | private List<String> filterAttributeNames(MBeanServerExecutor pSeverManager,ObjectName pName, List<String> pNames)
throws IOException, ReflectionException, MBeanException, AttributeNotFoundException, InstanceNotFoundException {
Set<String> attrs = new HashSet<String>(getAllAttributesNames(pSeverMana... | java | private List<String> filterAttributeNames(MBeanServerExecutor pSeverManager,ObjectName pName, List<String> pNames)
throws IOException, ReflectionException, MBeanException, AttributeNotFoundException, InstanceNotFoundException {
Set<String> attrs = new HashSet<String>(getAllAttributesNames(pSeverMana... | [
"private",
"List",
"<",
"String",
">",
"filterAttributeNames",
"(",
"MBeanServerExecutor",
"pSeverManager",
",",
"ObjectName",
"pName",
",",
"List",
"<",
"String",
">",
"pNames",
")",
"throws",
"IOException",
",",
"ReflectionException",
",",
"MBeanException",
",",
... | Return only those attributes of an mbean which has one of the given names | [
"Return",
"only",
"those",
"attributes",
"of",
"an",
"mbean",
"which",
"has",
"one",
"of",
"the",
"given",
"names"
] | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/handler/ReadHandler.java#L167-L177 |
120,096 | rhuss/jolokia | agent/core/src/main/java/org/jolokia/handler/ReadHandler.java | ReadHandler.resolveAttributes | private List<String> resolveAttributes(MBeanServerExecutor pServers, ObjectName pMBeanName, List<String> pAttributeNames)
throws IOException, ReflectionException, MBeanException, AttributeNotFoundException, InstanceNotFoundException {
List<String> attributes = pAttributeNames;
if (shouldAllA... | java | private List<String> resolveAttributes(MBeanServerExecutor pServers, ObjectName pMBeanName, List<String> pAttributeNames)
throws IOException, ReflectionException, MBeanException, AttributeNotFoundException, InstanceNotFoundException {
List<String> attributes = pAttributeNames;
if (shouldAllA... | [
"private",
"List",
"<",
"String",
">",
"resolveAttributes",
"(",
"MBeanServerExecutor",
"pServers",
",",
"ObjectName",
"pMBeanName",
",",
"List",
"<",
"String",
">",
"pAttributeNames",
")",
"throws",
"IOException",
",",
"ReflectionException",
",",
"MBeanException",
... | Resolve attributes and look up attribute names if all attributes need to be fetched. | [
"Resolve",
"attributes",
"and",
"look",
"up",
"attribute",
"names",
"if",
"all",
"attributes",
"need",
"to",
"be",
"fetched",
"."
] | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/handler/ReadHandler.java#L212-L220 |
120,097 | rhuss/jolokia | agent/core/src/main/java/org/jolokia/handler/ReadHandler.java | ReadHandler.getMBeanInfo | private MBeanInfo getMBeanInfo(MBeanServerExecutor pServerManager, ObjectName pObjectName)
throws IOException, ReflectionException, MBeanException, AttributeNotFoundException, InstanceNotFoundException {
return pServerManager.call(pObjectName, MBEAN_INFO_HANDLER);
} | java | private MBeanInfo getMBeanInfo(MBeanServerExecutor pServerManager, ObjectName pObjectName)
throws IOException, ReflectionException, MBeanException, AttributeNotFoundException, InstanceNotFoundException {
return pServerManager.call(pObjectName, MBEAN_INFO_HANDLER);
} | [
"private",
"MBeanInfo",
"getMBeanInfo",
"(",
"MBeanServerExecutor",
"pServerManager",
",",
"ObjectName",
"pObjectName",
")",
"throws",
"IOException",
",",
"ReflectionException",
",",
"MBeanException",
",",
"AttributeNotFoundException",
",",
"InstanceNotFoundException",
"{",
... | Get the MBeanInfo from one of the provided MBeanServers | [
"Get",
"the",
"MBeanInfo",
"from",
"one",
"of",
"the",
"provided",
"MBeanServers"
] | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/handler/ReadHandler.java#L227-L230 |
120,098 | rhuss/jolokia | agent/core/src/main/java/org/jolokia/handler/ReadHandler.java | ReadHandler.getAttribute | private Object getAttribute(MBeanServerExecutor pServerManager, ObjectName pMBeanName, String attribute)
throws MBeanException, ReflectionException, IOException, AttributeNotFoundException, InstanceNotFoundException {
return pServerManager.call(pMBeanName, MBEAN_ATTRIBUTE_READ_HANDLER, attribute);
... | java | private Object getAttribute(MBeanServerExecutor pServerManager, ObjectName pMBeanName, String attribute)
throws MBeanException, ReflectionException, IOException, AttributeNotFoundException, InstanceNotFoundException {
return pServerManager.call(pMBeanName, MBEAN_ATTRIBUTE_READ_HANDLER, attribute);
... | [
"private",
"Object",
"getAttribute",
"(",
"MBeanServerExecutor",
"pServerManager",
",",
"ObjectName",
"pMBeanName",
",",
"String",
"attribute",
")",
"throws",
"MBeanException",
",",
"ReflectionException",
",",
"IOException",
",",
"AttributeNotFoundException",
",",
"Instan... | Try multiple servers for fetching an attribute | [
"Try",
"multiple",
"servers",
"for",
"fetching",
"an",
"attribute"
] | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/handler/ReadHandler.java#L233-L236 |
120,099 | rhuss/jolokia | agent/core/src/main/java/org/jolokia/handler/ReadHandler.java | ReadHandler.getAllAttributesNames | private List<String> getAllAttributesNames(MBeanServerExecutor pServerManager, ObjectName pObjectName)
throws IOException, ReflectionException, MBeanException, AttributeNotFoundException, InstanceNotFoundException {
MBeanInfo mBeanInfo = getMBeanInfo(pServerManager, pObjectName);
List<String... | java | private List<String> getAllAttributesNames(MBeanServerExecutor pServerManager, ObjectName pObjectName)
throws IOException, ReflectionException, MBeanException, AttributeNotFoundException, InstanceNotFoundException {
MBeanInfo mBeanInfo = getMBeanInfo(pServerManager, pObjectName);
List<String... | [
"private",
"List",
"<",
"String",
">",
"getAllAttributesNames",
"(",
"MBeanServerExecutor",
"pServerManager",
",",
"ObjectName",
"pObjectName",
")",
"throws",
"IOException",
",",
"ReflectionException",
",",
"MBeanException",
",",
"AttributeNotFoundException",
",",
"Instan... | Return a set of attributes as a map with the attribute name as key and their values as values | [
"Return",
"a",
"set",
"of",
"attributes",
"as",
"a",
"map",
"with",
"the",
"attribute",
"name",
"as",
"key",
"and",
"their",
"values",
"as",
"values"
] | dc95e7bef859b1829776c5a84c8f7738f5d7d9c3 | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/handler/ReadHandler.java#L239-L249 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.