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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
119,900 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java | HBaseClientTemplate.getScannerBuilder | public <E> EntityScannerBuilder<E> getScannerBuilder(
EntityMapper<E> entityMapper) {
EntityScannerBuilder<E> builder = new BaseEntityScanner.Builder<E>(pool,
tableName, entityMapper);
for (ScanModifier scanModifier : scanModifiers) {
builder.addScanModifier(scanModifier);
}
return b... | java | public <E> EntityScannerBuilder<E> getScannerBuilder(
EntityMapper<E> entityMapper) {
EntityScannerBuilder<E> builder = new BaseEntityScanner.Builder<E>(pool,
tableName, entityMapper);
for (ScanModifier scanModifier : scanModifiers) {
builder.addScanModifier(scanModifier);
}
return b... | [
"public",
"<",
"E",
">",
"EntityScannerBuilder",
"<",
"E",
">",
"getScannerBuilder",
"(",
"EntityMapper",
"<",
"E",
">",
"entityMapper",
")",
"{",
"EntityScannerBuilder",
"<",
"E",
">",
"builder",
"=",
"new",
"BaseEntityScanner",
".",
"Builder",
"<",
"E",
">... | Get an EntityScannerBuilder that the client can use to build an
EntityScanner.
@param entityMapper
The EntityMapper to use to map rows to entities.
@return The EntityScannerBuilder | [
"Get",
"an",
"EntityScannerBuilder",
"that",
"the",
"client",
"can",
"use",
"to",
"build",
"an",
"EntityScanner",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java#L663-L671 |
119,901 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java | HBaseClientTemplate.createBatch | public <E> EntityBatch<E> createBatch(EntityMapper<E> entityMapper,
long writeBufferSize) {
return new BaseEntityBatch<E>(this, entityMapper, pool, tableName,
writeBufferSize);
} | java | public <E> EntityBatch<E> createBatch(EntityMapper<E> entityMapper,
long writeBufferSize) {
return new BaseEntityBatch<E>(this, entityMapper, pool, tableName,
writeBufferSize);
} | [
"public",
"<",
"E",
">",
"EntityBatch",
"<",
"E",
">",
"createBatch",
"(",
"EntityMapper",
"<",
"E",
">",
"entityMapper",
",",
"long",
"writeBufferSize",
")",
"{",
"return",
"new",
"BaseEntityBatch",
"<",
"E",
">",
"(",
"this",
",",
"entityMapper",
",",
... | Create an EntityBatch that can be used to write batches of entities.
@param entityMapper
The EntityMapper to use to map rows to entities.
@param writeBufferSize
The buffer size used when writing batches
@return EntityBatch | [
"Create",
"an",
"EntityBatch",
"that",
"can",
"be",
"used",
"to",
"write",
"batches",
"of",
"entities",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseClientTemplate.java#L682-L686 |
119,902 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/PartialPathConversion.java | PartialPathConversion.toKey | public StorageKey toKey(Path fromPath, StorageKey storage) {
final List<FieldPartitioner> partitioners =
Accessor.getDefault().getFieldPartitioners(storage.getPartitionStrategy());
//Strip off the root directory to get partition segments
String truncatedPath = fromPath.toString();
if(trunca... | java | public StorageKey toKey(Path fromPath, StorageKey storage) {
final List<FieldPartitioner> partitioners =
Accessor.getDefault().getFieldPartitioners(storage.getPartitionStrategy());
//Strip off the root directory to get partition segments
String truncatedPath = fromPath.toString();
if(trunca... | [
"public",
"StorageKey",
"toKey",
"(",
"Path",
"fromPath",
",",
"StorageKey",
"storage",
")",
"{",
"final",
"List",
"<",
"FieldPartitioner",
">",
"partitioners",
"=",
"Accessor",
".",
"getDefault",
"(",
")",
".",
"getFieldPartitioners",
"(",
"storage",
".",
"ge... | Supposed to build keys from start to finish vs end to start | [
"Supposed",
"to",
"build",
"keys",
"from",
"start",
"to",
"finish",
"vs",
"end",
"to",
"start"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/PartialPathConversion.java#L50-L88 |
119,903 | kite-sdk/kite | kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/shaded/com/google/common/reflect/FluentIterable.java | FluentIterable.toArray | @GwtIncompatible("Array.newArray(Class, int)")
public final E[] toArray(Class<E> type) {
return Iterables.toArray(iterable, type);
} | java | @GwtIncompatible("Array.newArray(Class, int)")
public final E[] toArray(Class<E> type) {
return Iterables.toArray(iterable, type);
} | [
"@",
"GwtIncompatible",
"(",
"\"Array.newArray(Class, int)\"",
")",
"public",
"final",
"E",
"[",
"]",
"toArray",
"(",
"Class",
"<",
"E",
">",
"type",
")",
"{",
"return",
"Iterables",
".",
"toArray",
"(",
"iterable",
",",
"type",
")",
";",
"}"
] | Returns an array containing all of the elements from this fluent iterable in iteration order.
@param type the type of the elements
@return a newly-allocated array into which all the elements of this fluent iterable have
been copied | [
"Returns",
"an",
"array",
"containing",
"all",
"of",
"the",
"elements",
"from",
"this",
"fluent",
"iterable",
"in",
"iteration",
"order",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/shaded/com/google/common/reflect/FluentIterable.java#L483-L486 |
119,904 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/KeyRangeIterable.java | KeyRangeIterable.start | private static <T> Iterator<T> start(T singleton) {
return Collections.singleton(singleton).iterator();
} | java | private static <T> Iterator<T> start(T singleton) {
return Collections.singleton(singleton).iterator();
} | [
"private",
"static",
"<",
"T",
">",
"Iterator",
"<",
"T",
">",
"start",
"(",
"T",
"singleton",
")",
"{",
"return",
"Collections",
".",
"singleton",
"(",
"singleton",
")",
".",
"iterator",
"(",
")",
";",
"}"
] | Convenience function to wrap some object in an Iterator.
@param singleton an Object to wrap in a singleton iterator
@param <T> The type of {@code singleton}
@return an Iterator that yeilds the given object once | [
"Convenience",
"function",
"to",
"wrap",
"some",
"object",
"in",
"an",
"Iterator",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/KeyRangeIterable.java#L97-L99 |
119,905 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/CSVProperties.java | CSVProperties.coalesce | private static <T> T coalesce(T... values) {
for (T value : values) {
if (value != null) {
return value;
}
}
return null;
} | java | private static <T> T coalesce(T... values) {
for (T value : values) {
if (value != null) {
return value;
}
}
return null;
} | [
"private",
"static",
"<",
"T",
">",
"T",
"coalesce",
"(",
"T",
"...",
"values",
")",
"{",
"for",
"(",
"T",
"value",
":",
"values",
")",
"{",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"return",
"value",
";",
"}",
"}",
"return",
"null",
";",
"}... | Returns the first non-null value from the sequence or null if there is no
non-null value. | [
"Returns",
"the",
"first",
"non",
"-",
"null",
"value",
"from",
"the",
"sequence",
"or",
"null",
"if",
"there",
"is",
"no",
"non",
"-",
"null",
"value",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/CSVProperties.java#L115-L122 |
119,906 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/io/MemcmpEncoder.java | MemcmpEncoder.writeInt | @Override
public void writeInt(int n) throws IOException {
byte[] intBytes = new byte[] { (byte) ((n >>> 24) ^ 0x80),
(byte) (n >>> 16), (byte) (n >>> 8), (byte) n };
out.write(intBytes);
} | java | @Override
public void writeInt(int n) throws IOException {
byte[] intBytes = new byte[] { (byte) ((n >>> 24) ^ 0x80),
(byte) (n >>> 16), (byte) (n >>> 8), (byte) n };
out.write(intBytes);
} | [
"@",
"Override",
"public",
"void",
"writeInt",
"(",
"int",
"n",
")",
"throws",
"IOException",
"{",
"byte",
"[",
"]",
"intBytes",
"=",
"new",
"byte",
"[",
"]",
"{",
"(",
"byte",
")",
"(",
"(",
"n",
">>>",
"24",
")",
"^",
"0x80",
")",
",",
"(",
"... | An int is written by flipping the sign bit, and writing it as a big endian
int.
@param n
The int to encode. | [
"An",
"int",
"is",
"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/MemcmpEncoder.java#L64-L69 |
119,907 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/io/MemcmpEncoder.java | MemcmpEncoder.writeLong | @Override
public void writeLong(long n) throws IOException {
byte[] intBytes = new byte[] { (byte) ((n >>> 56) ^ 0x80),
(byte) (n >>> 48), (byte) (n >>> 40), (byte) (n >>> 32),
(byte) (n >>> 24), (byte) (n >>> 16), (byte) (n >>> 8), (byte) n };
out.write(intBytes);
} | java | @Override
public void writeLong(long n) throws IOException {
byte[] intBytes = new byte[] { (byte) ((n >>> 56) ^ 0x80),
(byte) (n >>> 48), (byte) (n >>> 40), (byte) (n >>> 32),
(byte) (n >>> 24), (byte) (n >>> 16), (byte) (n >>> 8), (byte) n };
out.write(intBytes);
} | [
"@",
"Override",
"public",
"void",
"writeLong",
"(",
"long",
"n",
")",
"throws",
"IOException",
"{",
"byte",
"[",
"]",
"intBytes",
"=",
"new",
"byte",
"[",
"]",
"{",
"(",
"byte",
")",
"(",
"(",
"n",
">>>",
"56",
")",
"^",
"0x80",
")",
",",
"(",
... | A long is written by flipping the sign bit, and writing it as a big endian
long.
@param n
The long to encode. | [
"A",
"long",
"is",
"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/MemcmpEncoder.java#L78-L84 |
119,908 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/example/UserProfileExample.java | UserProfileExample.printUserProfies | public void printUserProfies() {
EntityScanner<UserProfileModel> scanner = userProfileDao.getScanner();
scanner.initialize();
try {
for (UserProfileModel entity : scanner) {
System.out.println(entity.toString());
}
} finally {
// scanners need to be closed.
scanner.close(... | java | public void printUserProfies() {
EntityScanner<UserProfileModel> scanner = userProfileDao.getScanner();
scanner.initialize();
try {
for (UserProfileModel entity : scanner) {
System.out.println(entity.toString());
}
} finally {
// scanners need to be closed.
scanner.close(... | [
"public",
"void",
"printUserProfies",
"(",
")",
"{",
"EntityScanner",
"<",
"UserProfileModel",
">",
"scanner",
"=",
"userProfileDao",
".",
"getScanner",
"(",
")",
";",
"scanner",
".",
"initialize",
"(",
")",
";",
"try",
"{",
"for",
"(",
"UserProfileModel",
"... | Print all user profiles.
This method demonstrates how to open a scanner that will scan the entire
table. It has no start or stop keys specified. | [
"Print",
"all",
"user",
"profiles",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/example/UserProfileExample.java#L93-L104 |
119,909 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/example/UserProfileExample.java | UserProfileExample.printUserProfileActionsForLastName | public void printUserProfileActionsForLastName(String lastName) {
// Create a partial key that will allow us to start the scanner from the
// first user record that has last name equal to the one provided.
PartitionKey startKey = new PartitionKey("lastName");
// Get the scanner with the start key. Null... | java | public void printUserProfileActionsForLastName(String lastName) {
// Create a partial key that will allow us to start the scanner from the
// first user record that has last name equal to the one provided.
PartitionKey startKey = new PartitionKey("lastName");
// Get the scanner with the start key. Null... | [
"public",
"void",
"printUserProfileActionsForLastName",
"(",
"String",
"lastName",
")",
"{",
"// Create a partial key that will allow us to start the scanner from the",
"// first user record that has last name equal to the one provided.",
"PartitionKey",
"startKey",
"=",
"new",
"Partitio... | Print the user profiles and actions for all users with the provided last
name
This method demonstrates how to open a scanner with a start key. It's using
the composite dao, so the records it returns will be a composite of both
the profile model and actions model.
@param lastName
The last name of users to scan. | [
"Print",
"the",
"user",
"profiles",
"and",
"actions",
"for",
"all",
"users",
"with",
"the",
"provided",
"last",
"name"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/example/UserProfileExample.java#L117-L142 |
119,910 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/example/UserProfileExample.java | UserProfileExample.create | public void create(String firstName, String lastName, boolean married) {
long ts = System.currentTimeMillis();
UserProfileModel profileModel = UserProfileModel.newBuilder()
.setFirstName(firstName).setLastName(lastName).setMarried(married)
.setCreated(ts).build();
UserActionsModel actionsMo... | java | public void create(String firstName, String lastName, boolean married) {
long ts = System.currentTimeMillis();
UserProfileModel profileModel = UserProfileModel.newBuilder()
.setFirstName(firstName).setLastName(lastName).setMarried(married)
.setCreated(ts).build();
UserActionsModel actionsMo... | [
"public",
"void",
"create",
"(",
"String",
"firstName",
",",
"String",
"lastName",
",",
"boolean",
"married",
")",
"{",
"long",
"ts",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"UserProfileModel",
"profileModel",
"=",
"UserProfileModel",
".",
"new... | Create a fresh new user record.
This method demonstrates creating both a UserProfileModel and a
UserActionsModel atomically in a single row. When creating a user profile,
we add the "created" action to the actions map. This shows how we can use
the CompositeDao to accomplish this.
@param firstName
The first name of t... | [
"Create",
"a",
"fresh",
"new",
"user",
"record",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/example/UserProfileExample.java#L159-L179 |
119,911 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/example/UserProfileExample.java | UserProfileExample.updateUserProfile | public void updateUserProfile(String firstName, String lastName,
boolean married) {
// Get the timestamp we'll use to set the value of the profile_updated
// action.
long ts = System.currentTimeMillis();
// Construct the key we'll use to fetch the user.
PartitionKey key = new PartitionKey(las... | java | public void updateUserProfile(String firstName, String lastName,
boolean married) {
// Get the timestamp we'll use to set the value of the profile_updated
// action.
long ts = System.currentTimeMillis();
// Construct the key we'll use to fetch the user.
PartitionKey key = new PartitionKey(las... | [
"public",
"void",
"updateUserProfile",
"(",
"String",
"firstName",
",",
"String",
"lastName",
",",
"boolean",
"married",
")",
"{",
"// Get the timestamp we'll use to set the value of the profile_updated",
"// action.",
"long",
"ts",
"=",
"System",
".",
"currentTimeMillis",
... | Update the married status of a new user record.
This method demonstrates updating both a UserProfileModel and a
UserActionsModel with a single HBase request using the composite dao. It
performs a get/update/put operation, which is protected by the
check_conflict field on UserProfileModel from colliding with another
ge... | [
"Update",
"the",
"married",
"status",
"of",
"a",
"new",
"user",
"record",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/example/UserProfileExample.java#L197-L230 |
119,912 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/example/UserProfileExample.java | UserProfileExample.addAction | public void addAction(String firstName, String lastName, String actionType,
String actionValue) {
// Create a new UserActionsModel, and add a new actions map to it with a
// single action value. Even if one exists in this row, since it has a lone
// keyAsColumn field, it won't remove any actions that ... | java | public void addAction(String firstName, String lastName, String actionType,
String actionValue) {
// Create a new UserActionsModel, and add a new actions map to it with a
// single action value. Even if one exists in this row, since it has a lone
// keyAsColumn field, it won't remove any actions that ... | [
"public",
"void",
"addAction",
"(",
"String",
"firstName",
",",
"String",
"lastName",
",",
"String",
"actionType",
",",
"String",
"actionValue",
")",
"{",
"// Create a new UserActionsModel, and add a new actions map to it with a",
"// single action value. Even if one exists in th... | Add an action to the user profile.
This method demonstrates how we can use a keyAsColumn map field (the
actions field of the UserActionsModel) to add values to the map without
having to do a get/update/put operation. When doing the put, it won't
remove columns that exist in the row that aren't in the new map we are
pu... | [
"Add",
"an",
"action",
"to",
"the",
"user",
"profile",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/example/UserProfileExample.java#L251-L264 |
119,913 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/example/UserProfileExample.java | UserProfileExample.registerSchemas | private void registerSchemas(Configuration conf, SchemaManager schemaManager)
throws InterruptedException {
HBaseAdmin admin;
try {
// Construct an HBaseAdmin object (required by schema tool), and delete it
// if it exists so we start fresh.
admin = new HBaseAdmin(conf);
if (admin.... | java | private void registerSchemas(Configuration conf, SchemaManager schemaManager)
throws InterruptedException {
HBaseAdmin admin;
try {
// Construct an HBaseAdmin object (required by schema tool), and delete it
// if it exists so we start fresh.
admin = new HBaseAdmin(conf);
if (admin.... | [
"private",
"void",
"registerSchemas",
"(",
"Configuration",
"conf",
",",
"SchemaManager",
"schemaManager",
")",
"throws",
"InterruptedException",
"{",
"HBaseAdmin",
"admin",
";",
"try",
"{",
"// Construct an HBaseAdmin object (required by schema tool), and delete it",
"// if it... | Uses SchemaTool to register the required schemas and create the required
tables.
@param conf
The HBaseConfiguration.
@param schemaManager
The schema manager SchemaTool needs to create the schemas. | [
"Uses",
"SchemaTool",
"to",
"register",
"the",
"required",
"schemas",
"and",
"create",
"the",
"required",
"tables",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/example/UserProfileExample.java#L275-L294 |
119,914 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/example/UserProfileExample.java | UserProfileExample.main | public static void main(String[] args) throws InterruptedException {
UserProfileExample example = new UserProfileExample();
// Let's create some user profiles
example.create("John", "Doe", true);
example.create("Jane", "Doe", false);
example.create("Foo", "Bar", false);
// Now print those user... | java | public static void main(String[] args) throws InterruptedException {
UserProfileExample example = new UserProfileExample();
// Let's create some user profiles
example.create("John", "Doe", true);
example.create("Jane", "Doe", false);
example.create("Foo", "Bar", false);
// Now print those user... | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"throws",
"InterruptedException",
"{",
"UserProfileExample",
"example",
"=",
"new",
"UserProfileExample",
"(",
")",
";",
"// Let's create some user profiles",
"example",
".",
"create",
"(",
... | The main driver method. Doesn't require any arguments.
@param args | [
"The",
"main",
"driver",
"method",
".",
"Doesn",
"t",
"require",
"any",
"arguments",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/example/UserProfileExample.java#L301-L328 |
119,915 | kite-sdk/kite | kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/scriptengine/java/FastJavaScriptEngine.java | FastJavaScriptEngine.parse | private Class parse(String str, ScriptContext ctx) throws ScriptException {
String fileName = getFileName(ctx);
String sourcePath = getSourcePath(ctx);
String classPath = getClassPath(ctx);
Map<String, byte[]> classBytes = compiler.compile(fileName, str,
ctx.getErrorWriter(), sourcePath, classPath);
... | java | private Class parse(String str, ScriptContext ctx) throws ScriptException {
String fileName = getFileName(ctx);
String sourcePath = getSourcePath(ctx);
String classPath = getClassPath(ctx);
Map<String, byte[]> classBytes = compiler.compile(fileName, str,
ctx.getErrorWriter(), sourcePath, classPath);
... | [
"private",
"Class",
"parse",
"(",
"String",
"str",
",",
"ScriptContext",
"ctx",
")",
"throws",
"ScriptException",
"{",
"String",
"fileName",
"=",
"getFileName",
"(",
"ctx",
")",
";",
"String",
"sourcePath",
"=",
"getSourcePath",
"(",
"ctx",
")",
";",
"String... | Internals only below this point | [
"Internals",
"only",
"below",
"this",
"point"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/scriptengine/java/FastJavaScriptEngine.java#L131-L183 |
119,916 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroEntitySerDe.java | AvroEntitySerDe.getColumnDecoder | private Decoder getColumnDecoder(Schema writtenFieldAvroSchema, InputStream in) {
// Use a special Avro decoder that has special handling for int, long,
// and String types. See ColumnDecoder for more information.
if (writtenFieldAvroSchema.getType() == Type.INT
|| writtenFieldAvroSchema.getType() =... | java | private Decoder getColumnDecoder(Schema writtenFieldAvroSchema, InputStream in) {
// Use a special Avro decoder that has special handling for int, long,
// and String types. See ColumnDecoder for more information.
if (writtenFieldAvroSchema.getType() == Type.INT
|| writtenFieldAvroSchema.getType() =... | [
"private",
"Decoder",
"getColumnDecoder",
"(",
"Schema",
"writtenFieldAvroSchema",
",",
"InputStream",
"in",
")",
"{",
"// Use a special Avro decoder that has special handling for int, long,",
"// and String types. See ColumnDecoder for more information.",
"if",
"(",
"writtenFieldAvroS... | Returns an Avro Decoder. The implementation it chooses will depend on the
schema of the field.
@param in
InputStream to decode bytes from
@return The avro decoder. | [
"Returns",
"an",
"Avro",
"Decoder",
".",
"The",
"implementation",
"it",
"chooses",
"will",
"depend",
"on",
"the",
"schema",
"of",
"the",
"field",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroEntitySerDe.java#L359-L369 |
119,917 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroEntitySerDe.java | AvroEntitySerDe.getColumnEncoder | private Encoder getColumnEncoder(Schema fieldAvroSchema, OutputStream out) {
// Use a special Avro encoder that has special handling for int, long,
// and String types. See ColumnEncoder for more information.
if (fieldAvroSchema.getType() == Type.INT
|| fieldAvroSchema.getType() == Type.LONG
... | java | private Encoder getColumnEncoder(Schema fieldAvroSchema, OutputStream out) {
// Use a special Avro encoder that has special handling for int, long,
// and String types. See ColumnEncoder for more information.
if (fieldAvroSchema.getType() == Type.INT
|| fieldAvroSchema.getType() == Type.LONG
... | [
"private",
"Encoder",
"getColumnEncoder",
"(",
"Schema",
"fieldAvroSchema",
",",
"OutputStream",
"out",
")",
"{",
"// Use a special Avro encoder that has special handling for int, long,",
"// and String types. See ColumnEncoder for more information.",
"if",
"(",
"fieldAvroSchema",
".... | Returns an Avro Encoder. The implementation it chooses will depend on the
schema of the field.
@param out
Output stream to encode bytes to
@return The avro encoder | [
"Returns",
"an",
"Avro",
"Encoder",
".",
"The",
"implementation",
"it",
"chooses",
"will",
"depend",
"on",
"the",
"schema",
"of",
"the",
"field",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroEntitySerDe.java#L379-L389 |
119,918 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntityScannerBuilder.java | EntityScannerBuilder.addEqualFilter | public EntityScannerBuilder<E> addEqualFilter(String fieldName,
Object filterValue) {
SingleFieldEntityFilter singleFieldEntityFilter = new SingleFieldEntityFilter(
entityMapper.getEntitySchema(), entityMapper.getEntitySerDe(),
fieldName, filterValue, CompareFilter.CompareOp.EQUAL);
filter... | java | public EntityScannerBuilder<E> addEqualFilter(String fieldName,
Object filterValue) {
SingleFieldEntityFilter singleFieldEntityFilter = new SingleFieldEntityFilter(
entityMapper.getEntitySchema(), entityMapper.getEntitySerDe(),
fieldName, filterValue, CompareFilter.CompareOp.EQUAL);
filter... | [
"public",
"EntityScannerBuilder",
"<",
"E",
">",
"addEqualFilter",
"(",
"String",
"fieldName",
",",
"Object",
"filterValue",
")",
"{",
"SingleFieldEntityFilter",
"singleFieldEntityFilter",
"=",
"new",
"SingleFieldEntityFilter",
"(",
"entityMapper",
".",
"getEntitySchema",... | Add an Equality Filter to the Scanner, Will Filter Results Not Equal to the
Filter Value
@param fieldName
The name of the column you want to apply the filter on
@param filterValue
The value for comparison
@return EntityScannerBuilder | [
"Add",
"an",
"Equality",
"Filter",
"to",
"the",
"Scanner",
"Will",
"Filter",
"Results",
"Not",
"Equal",
"to",
"the",
"Filter",
"Value"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntityScannerBuilder.java#L211-L218 |
119,919 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntityScannerBuilder.java | EntityScannerBuilder.addRegexMatchFilter | public EntityScannerBuilder<E> addRegexMatchFilter(String fieldName,
String regexString) {
RegexEntityFilter regexEntityFilter = new RegexEntityFilter(
entityMapper.getEntitySchema(), entityMapper.getEntitySerDe(),
fieldName, regexString);
filterList.add(regexEntityFilter.getFilter());
... | java | public EntityScannerBuilder<E> addRegexMatchFilter(String fieldName,
String regexString) {
RegexEntityFilter regexEntityFilter = new RegexEntityFilter(
entityMapper.getEntitySchema(), entityMapper.getEntitySerDe(),
fieldName, regexString);
filterList.add(regexEntityFilter.getFilter());
... | [
"public",
"EntityScannerBuilder",
"<",
"E",
">",
"addRegexMatchFilter",
"(",
"String",
"fieldName",
",",
"String",
"regexString",
")",
"{",
"RegexEntityFilter",
"regexEntityFilter",
"=",
"new",
"RegexEntityFilter",
"(",
"entityMapper",
".",
"getEntitySchema",
"(",
")"... | Add a Regex Equality Filter to the Scanner, Will Filter Results Not Equal
to the Filter Value
@param fieldName
The name of the column you want to apply the filter on
@param filterValue
The regular expression to use for comparison
@return ScannerBuilder | [
"Add",
"a",
"Regex",
"Equality",
"Filter",
"to",
"the",
"Scanner",
"Will",
"Filter",
"Results",
"Not",
"Equal",
"to",
"the",
"Filter",
"Value"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntityScannerBuilder.java#L249-L256 |
119,920 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntityScannerBuilder.java | EntityScannerBuilder.addIsMissingFilter | public EntityScannerBuilder<E> addIsMissingFilter(String fieldName) {
SingleFieldEntityFilter singleFieldEntityFilter = new SingleFieldEntityFilter(
entityMapper.getEntitySchema(), entityMapper.getEntitySerDe(),
fieldName, "++++NON_SHALL_PASS++++", CompareFilter.CompareOp.EQUAL);
SingleColumnVal... | java | public EntityScannerBuilder<E> addIsMissingFilter(String fieldName) {
SingleFieldEntityFilter singleFieldEntityFilter = new SingleFieldEntityFilter(
entityMapper.getEntitySchema(), entityMapper.getEntitySerDe(),
fieldName, "++++NON_SHALL_PASS++++", CompareFilter.CompareOp.EQUAL);
SingleColumnVal... | [
"public",
"EntityScannerBuilder",
"<",
"E",
">",
"addIsMissingFilter",
"(",
"String",
"fieldName",
")",
"{",
"SingleFieldEntityFilter",
"singleFieldEntityFilter",
"=",
"new",
"SingleFieldEntityFilter",
"(",
"entityMapper",
".",
"getEntitySchema",
"(",
")",
",",
"entityM... | Only include rows which are missing this field, this was the only possible
way to do it.
@param fieldName
The field which should be missing
@return ScannerBuilder | [
"Only",
"include",
"rows",
"which",
"are",
"missing",
"this",
"field",
"this",
"was",
"the",
"only",
"possible",
"way",
"to",
"do",
"it",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntityScannerBuilder.java#L315-L324 |
119,921 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroEntityComposer.java | AvroEntityComposer.initRecordBuilderFactories | private void initRecordBuilderFactories() {
for (FieldMapping fieldMapping : avroSchema.getColumnMappingDescriptor().getFieldMappings()) {
if (fieldMapping.getMappingType() == MappingType.KEY_AS_COLUMN) {
String fieldName = fieldMapping.getFieldName();
Schema fieldSchema = avroSchema.getAvroSc... | java | private void initRecordBuilderFactories() {
for (FieldMapping fieldMapping : avroSchema.getColumnMappingDescriptor().getFieldMappings()) {
if (fieldMapping.getMappingType() == MappingType.KEY_AS_COLUMN) {
String fieldName = fieldMapping.getFieldName();
Schema fieldSchema = avroSchema.getAvroSc... | [
"private",
"void",
"initRecordBuilderFactories",
"(",
")",
"{",
"for",
"(",
"FieldMapping",
"fieldMapping",
":",
"avroSchema",
".",
"getColumnMappingDescriptor",
"(",
")",
".",
"getFieldMappings",
"(",
")",
")",
"{",
"if",
"(",
"fieldMapping",
".",
"getMappingType... | Initialize the AvroRecordBuilderFactories for all keyAsColumn mapped fields
that are record types. We need to be able to get record builders for these
since the records are broken across many columns, and need to be
constructed by the composer. | [
"Initialize",
"the",
"AvroRecordBuilderFactories",
"for",
"all",
"keyAsColumn",
"mapped",
"fields",
"that",
"are",
"record",
"types",
".",
"We",
"need",
"to",
"be",
"able",
"to",
"get",
"record",
"builders",
"for",
"these",
"since",
"the",
"records",
"are",
"b... | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroEntityComposer.java#L196-L209 |
119,922 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/ColumnMapping.java | ColumnMapping.getRequiredColumns | public Set<String> getRequiredColumns() {
Set<String> set = new HashSet<String>();
for (FieldMapping fieldMapping : fieldMappings) {
if (FieldMapping.MappingType.KEY == fieldMapping.getMappingType()) {
continue;
} else if (FieldMapping.MappingType.KEY_AS_COLUMN == fieldMapping.getMappingType... | java | public Set<String> getRequiredColumns() {
Set<String> set = new HashSet<String>();
for (FieldMapping fieldMapping : fieldMappings) {
if (FieldMapping.MappingType.KEY == fieldMapping.getMappingType()) {
continue;
} else if (FieldMapping.MappingType.KEY_AS_COLUMN == fieldMapping.getMappingType... | [
"public",
"Set",
"<",
"String",
">",
"getRequiredColumns",
"(",
")",
"{",
"Set",
"<",
"String",
">",
"set",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"FieldMapping",
"fieldMapping",
":",
"fieldMappings",
")",
"{",
"if",
"(",... | Get the columns required by this schema.
@return The set of columns | [
"Get",
"the",
"columns",
"required",
"by",
"this",
"schema",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/ColumnMapping.java#L61-L74 |
119,923 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/ColumnMapping.java | ColumnMapping.getRequiredColumnFamilies | public Set<String> getRequiredColumnFamilies() {
Set<String> set = new HashSet<String>();
for (FieldMapping mapping : fieldMappings) {
if (FieldMapping.MappingType.KEY != mapping.getMappingType())
set.add(mapping.getFamilyAsString());
}
return set;
} | java | public Set<String> getRequiredColumnFamilies() {
Set<String> set = new HashSet<String>();
for (FieldMapping mapping : fieldMappings) {
if (FieldMapping.MappingType.KEY != mapping.getMappingType())
set.add(mapping.getFamilyAsString());
}
return set;
} | [
"public",
"Set",
"<",
"String",
">",
"getRequiredColumnFamilies",
"(",
")",
"{",
"Set",
"<",
"String",
">",
"set",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"FieldMapping",
"mapping",
":",
"fieldMappings",
")",
"{",
"if",
"(... | Get the column families required by this schema.
@return The set of column families. | [
"Get",
"the",
"column",
"families",
"required",
"by",
"this",
"schema",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/ColumnMapping.java#L81-L88 |
119,924 | kite-sdk/kite | kite-minicluster/src/main/java/org/kitesdk/minicluster/HdfsService.java | HdfsService.shouldFormatDFSCluster | private static boolean shouldFormatDFSCluster(String localDFSLocation,
boolean clean) {
boolean format = true;
File f = new File(localDFSLocation);
if (f.exists() && f.isDirectory() && !clean) {
format = false;
}
return format;
} | java | private static boolean shouldFormatDFSCluster(String localDFSLocation,
boolean clean) {
boolean format = true;
File f = new File(localDFSLocation);
if (f.exists() && f.isDirectory() && !clean) {
format = false;
}
return format;
} | [
"private",
"static",
"boolean",
"shouldFormatDFSCluster",
"(",
"String",
"localDFSLocation",
",",
"boolean",
"clean",
")",
"{",
"boolean",
"format",
"=",
"true",
";",
"File",
"f",
"=",
"new",
"File",
"(",
"localDFSLocation",
")",
";",
"if",
"(",
"f",
".",
... | Returns true if we should format the DFS Cluster. We'll format if clean is
true, or if the dfsFsLocation does not exist.
@param localDFSLocation
The location on the local FS to hold the HDFS metadata and block
data
@param clean
Specifies if we want to start a clean cluster
@return Returns true if we should format a DF... | [
"Returns",
"true",
"if",
"we",
"should",
"format",
"the",
"DFS",
"Cluster",
".",
"We",
"ll",
"format",
"if",
"clean",
"is",
"true",
"or",
"if",
"the",
"dfsFsLocation",
"does",
"not",
"exist",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-minicluster/src/main/java/org/kitesdk/minicluster/HdfsService.java#L171-L179 |
119,925 | kite-sdk/kite | kite-minicluster/src/main/java/org/kitesdk/minicluster/HdfsService.java | HdfsService.configureDFSCluster | private static Configuration configureDFSCluster(Configuration config,
String localDFSLocation, String bindIP, int namenodeRpcPort,
int namenodeHttpPort, int datanodePort, int datanodeIpcPort,
int datanodeHttpPort) {
logger.info("HDFS force binding to ip: " + bindIP);
config = new KiteCompati... | java | private static Configuration configureDFSCluster(Configuration config,
String localDFSLocation, String bindIP, int namenodeRpcPort,
int namenodeHttpPort, int datanodePort, int datanodeIpcPort,
int datanodeHttpPort) {
logger.info("HDFS force binding to ip: " + bindIP);
config = new KiteCompati... | [
"private",
"static",
"Configuration",
"configureDFSCluster",
"(",
"Configuration",
"config",
",",
"String",
"localDFSLocation",
",",
"String",
"bindIP",
",",
"int",
"namenodeRpcPort",
",",
"int",
"namenodeHttpPort",
",",
"int",
"datanodePort",
",",
"int",
"datanodeIpc... | Configure the DFS Cluster before launching it.
@param config
The already created Hadoop configuration we'll further configure
for HDFS
@param localDFSLocation
The location on the local filesystem where cluster data is stored
@param bindIP
An IP address we want to force the datanode and namenode to bind
to.
@param name... | [
"Configure",
"the",
"DFS",
"Cluster",
"before",
"launching",
"it",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-minicluster/src/main/java/org/kitesdk/minicluster/HdfsService.java#L199-L227 |
119,926 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Constraints.java | Constraints.filter | public <E> Iterator<E> filter(Iterator<E> iterator, EntityAccessor<E> accessor) {
return Iterators.filter(iterator, toEntityPredicate(accessor));
} | java | public <E> Iterator<E> filter(Iterator<E> iterator, EntityAccessor<E> accessor) {
return Iterators.filter(iterator, toEntityPredicate(accessor));
} | [
"public",
"<",
"E",
">",
"Iterator",
"<",
"E",
">",
"filter",
"(",
"Iterator",
"<",
"E",
">",
"iterator",
",",
"EntityAccessor",
"<",
"E",
">",
"accessor",
")",
"{",
"return",
"Iterators",
".",
"filter",
"(",
"iterator",
",",
"toEntityPredicate",
"(",
... | Filter the entities returned by a given iterator by these constraints.
@param <E> The type of entities to be matched
@return an iterator filtered by these constraints | [
"Filter",
"the",
"entities",
"returned",
"by",
"a",
"given",
"iterator",
"by",
"these",
"constraints",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Constraints.java#L193-L195 |
119,927 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Constraints.java | Constraints.alignedWithBoundaries | @SuppressWarnings("unchecked")
public boolean alignedWithBoundaries() {
if (constraints.isEmpty()) {
return true;
} else if (strategy == null) {
// constraints must align with partitions, which requires a strategy
return false;
}
Multimap<String, FieldPartitioner> partitioners = Has... | java | @SuppressWarnings("unchecked")
public boolean alignedWithBoundaries() {
if (constraints.isEmpty()) {
return true;
} else if (strategy == null) {
// constraints must align with partitions, which requires a strategy
return false;
}
Multimap<String, FieldPartitioner> partitioners = Has... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"boolean",
"alignedWithBoundaries",
"(",
")",
"{",
"if",
"(",
"constraints",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"else",
"if",
"(",
"strategy",
"==",
"null",
")",
"... | If this returns true, the entities selected by this set of constraints
align to partition boundaries.
For example, for a partition strategy [hash(num), identity(num)],
any constraint on the "num" field will be correctly enforced by the
partition predicate for this constraint set. However, a "color" field
wouldn't be s... | [
"If",
"this",
"returns",
"true",
"the",
"entities",
"selected",
"by",
"this",
"set",
"of",
"constraints",
"align",
"to",
"partition",
"boundaries",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Constraints.java#L251-L337 |
119,928 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Constraints.java | Constraints.toNormalizedQueryMap | public Map<String, String> toNormalizedQueryMap() {
Map<String, String> query = Maps.newTreeMap();
return toQueryMap(query, true);
} | java | public Map<String, String> toNormalizedQueryMap() {
Map<String, String> query = Maps.newTreeMap();
return toQueryMap(query, true);
} | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"toNormalizedQueryMap",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"query",
"=",
"Maps",
".",
"newTreeMap",
"(",
")",
";",
"return",
"toQueryMap",
"(",
"query",
",",
"true",
")",
";",
... | Get a normalized query map for the constraints. A normalized query map will
be equal in value and iteration order for any logically equivalent set of
constraints. | [
"Get",
"a",
"normalized",
"query",
"map",
"for",
"the",
"constraints",
".",
"A",
"normalized",
"query",
"map",
"will",
"be",
"equal",
"in",
"value",
"and",
"iteration",
"order",
"for",
"any",
"logically",
"equivalent",
"set",
"of",
"constraints",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Constraints.java#L459-L462 |
119,929 | kite-sdk/kite | kite-data/kite-data-hive/src/main/java/org/kitesdk/data/spi/hive/HiveSchemaConverter.java | HiveSchemaConverter.startsWith | private static boolean startsWith(String[] left, List<String> right) {
// short circuit if a match isn't possible
if (left.length < right.size()) {
return false;
}
for (int i = 0; i < right.size(); i += 1) {
if (!left[i].equals(right.get(i))) {
return false;
}
}
retur... | java | private static boolean startsWith(String[] left, List<String> right) {
// short circuit if a match isn't possible
if (left.length < right.size()) {
return false;
}
for (int i = 0; i < right.size(); i += 1) {
if (!left[i].equals(right.get(i))) {
return false;
}
}
retur... | [
"private",
"static",
"boolean",
"startsWith",
"(",
"String",
"[",
"]",
"left",
",",
"List",
"<",
"String",
">",
"right",
")",
"{",
"// short circuit if a match isn't possible",
"if",
"(",
"left",
".",
"length",
"<",
"right",
".",
"size",
"(",
")",
")",
"{"... | Returns true if left starts with right. | [
"Returns",
"true",
"if",
"left",
"starts",
"with",
"right",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hive/src/main/java/org/kitesdk/data/spi/hive/HiveSchemaConverter.java#L331-L344 |
119,930 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/KeySchema.java | KeySchema.position | public int position(String fieldName) {
if (fieldPositions.containsKey(fieldName)) {
return fieldPositions.get(fieldName);
} else {
throw new DatasetException("Cannot recover " + fieldName + " from key");
}
} | java | public int position(String fieldName) {
if (fieldPositions.containsKey(fieldName)) {
return fieldPositions.get(fieldName);
} else {
throw new DatasetException("Cannot recover " + fieldName + " from key");
}
} | [
"public",
"int",
"position",
"(",
"String",
"fieldName",
")",
"{",
"if",
"(",
"fieldPositions",
".",
"containsKey",
"(",
"fieldName",
")",
")",
"{",
"return",
"fieldPositions",
".",
"get",
"(",
"fieldName",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"Da... | Resolves the storage position of a field in keys with this KeySchema.
@param fieldName
The source field name.
@return
The position of the field in keys with this schema.
@throws DatasetException
If the field cannot be recovered from keys with this schema. | [
"Resolves",
"the",
"storage",
"position",
"of",
"a",
"field",
"in",
"keys",
"with",
"this",
"KeySchema",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/KeySchema.java#L95-L101 |
119,931 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/PartitionExpression.java | PartitionExpression.toExpression | public static String toExpression(PartitionStrategy partitionStrategy) {
List<FieldPartitioner> fieldPartitioners = partitionStrategy
.getFieldPartitioners();
if (fieldPartitioners.size() == 1) {
return PartitionFunctions.toExpression(fieldPartitioners.get(0));
}
StringBuilder sb = new Str... | java | public static String toExpression(PartitionStrategy partitionStrategy) {
List<FieldPartitioner> fieldPartitioners = partitionStrategy
.getFieldPartitioners();
if (fieldPartitioners.size() == 1) {
return PartitionFunctions.toExpression(fieldPartitioners.get(0));
}
StringBuilder sb = new Str... | [
"public",
"static",
"String",
"toExpression",
"(",
"PartitionStrategy",
"partitionStrategy",
")",
"{",
"List",
"<",
"FieldPartitioner",
">",
"fieldPartitioners",
"=",
"partitionStrategy",
".",
"getFieldPartitioners",
"(",
")",
";",
"if",
"(",
"fieldPartitioners",
".",... | Convert a PartitionStrategy into a serialized expression. This can be used
to set a PartitionStrategy in an Avro property if the PartitionStrategy is
passed as an object. | [
"Convert",
"a",
"PartitionStrategy",
"into",
"a",
"serialized",
"expression",
".",
"This",
"can",
"be",
"used",
"to",
"set",
"a",
"PartitionStrategy",
"in",
"an",
"Avro",
"property",
"if",
"the",
"PartitionStrategy",
"is",
"passed",
"as",
"an",
"object",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/PartitionExpression.java#L77-L93 |
119,932 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/VersionedAvroEntityMapper.java | VersionedAvroEntityMapper.initializeEntityVersionEntityMapper | private void initializeEntityVersionEntityMapper() {
AvroEntitySchema avroEntitySchema = schemaParser
.parseEntitySchema(managedSchemaEntityVersionSchema);
avroEntitySchema = AvroUtils.mergeSpecificStringTypes(
ManagedSchemaEntityVersion.class, avroEntitySchema);
AvroEntityComposer<ManagedSc... | java | private void initializeEntityVersionEntityMapper() {
AvroEntitySchema avroEntitySchema = schemaParser
.parseEntitySchema(managedSchemaEntityVersionSchema);
avroEntitySchema = AvroUtils.mergeSpecificStringTypes(
ManagedSchemaEntityVersion.class, avroEntitySchema);
AvroEntityComposer<ManagedSc... | [
"private",
"void",
"initializeEntityVersionEntityMapper",
"(",
")",
"{",
"AvroEntitySchema",
"avroEntitySchema",
"=",
"schemaParser",
".",
"parseEntitySchema",
"(",
"managedSchemaEntityVersionSchema",
")",
";",
"avroEntitySchema",
"=",
"AvroUtils",
".",
"mergeSpecificStringTy... | Initialize the entity mapper we'll use to convert the schema version
metadata in each row to a ManagedSchemaEntityVersion record. | [
"Initialize",
"the",
"entity",
"mapper",
"we",
"ll",
"use",
"to",
"convert",
"the",
"schema",
"version",
"metadata",
"in",
"each",
"row",
"to",
"a",
"ManagedSchemaEntityVersion",
"record",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/VersionedAvroEntityMapper.java#L309-L320 |
119,933 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/VersionedAvroEntityMapper.java | VersionedAvroEntityMapper.updateEntityMappers | private void updateEntityMappers() {
for (Entry<Integer, EntitySchema> entry : schemaManager.getEntitySchemas(
tableName, entityName).entrySet()) {
if (!entityMappers.containsKey(entry.getKey())) {
AvroEntitySchema writtenSchema = (AvroEntitySchema) entry.getValue();
EntityMapper<ENTIT... | java | private void updateEntityMappers() {
for (Entry<Integer, EntitySchema> entry : schemaManager.getEntitySchemas(
tableName, entityName).entrySet()) {
if (!entityMappers.containsKey(entry.getKey())) {
AvroEntitySchema writtenSchema = (AvroEntitySchema) entry.getValue();
EntityMapper<ENTIT... | [
"private",
"void",
"updateEntityMappers",
"(",
")",
"{",
"for",
"(",
"Entry",
"<",
"Integer",
",",
"EntitySchema",
">",
"entry",
":",
"schemaManager",
".",
"getEntitySchemas",
"(",
"tableName",
",",
"entityName",
")",
".",
"entrySet",
"(",
")",
")",
"{",
"... | Update the map of wrapped entity mappers to reflect the most recent entity
schema metadata returned by the schemaManager. | [
"Update",
"the",
"map",
"of",
"wrapped",
"entity",
"mappers",
"to",
"reflect",
"the",
"most",
"recent",
"entity",
"schema",
"metadata",
"returned",
"by",
"the",
"schemaManager",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/VersionedAvroEntityMapper.java#L326-L336 |
119,934 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/partition/RangeFieldPartitioner.java | RangeFieldPartitioner.transformClosed | private Range<String> transformClosed(Range<String> range) {
if (range.hasLowerBound()) {
String lower = range.lowerEndpoint();
// the special case, (a, _] and apply(a) == a is handled by skipping a
String afterLower = domain.next(apply(lower));
if (afterLower != null) {
if (range.ha... | java | private Range<String> transformClosed(Range<String> range) {
if (range.hasLowerBound()) {
String lower = range.lowerEndpoint();
// the special case, (a, _] and apply(a) == a is handled by skipping a
String afterLower = domain.next(apply(lower));
if (afterLower != null) {
if (range.ha... | [
"private",
"Range",
"<",
"String",
">",
"transformClosed",
"(",
"Range",
"<",
"String",
">",
"range",
")",
"{",
"if",
"(",
"range",
".",
"hasLowerBound",
"(",
")",
")",
"{",
"String",
"lower",
"=",
"range",
".",
"lowerEndpoint",
"(",
")",
";",
"// the ... | Transforms a Range predicate to a closed range on this partitioner's upper
bounds. Handles edge cases correctly.
@param range a Range of Strings
@return a Range of upper-bound Strings | [
"Transforms",
"a",
"Range",
"predicate",
"to",
"a",
"closed",
"range",
"on",
"this",
"partitioner",
"s",
"upper",
"bounds",
".",
"Handles",
"edge",
"cases",
"correctly",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/partition/RangeFieldPartitioner.java#L145-L182 |
119,935 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemUtil.java | FileSystemUtil.deleteParentDirectoriesIfEmpty | static boolean deleteParentDirectoriesIfEmpty(FileSystem fs, Path root, Path path) throws IOException {
boolean deleted = false;
try {
for (Path current = path.getParent();
!current.equals(root) && !(current.getParent() == null);
current = current.getParent()) {
final FileSta... | java | static boolean deleteParentDirectoriesIfEmpty(FileSystem fs, Path root, Path path) throws IOException {
boolean deleted = false;
try {
for (Path current = path.getParent();
!current.equals(root) && !(current.getParent() == null);
current = current.getParent()) {
final FileSta... | [
"static",
"boolean",
"deleteParentDirectoriesIfEmpty",
"(",
"FileSystem",
"fs",
",",
"Path",
"root",
",",
"Path",
"path",
")",
"throws",
"IOException",
"{",
"boolean",
"deleted",
"=",
"false",
";",
"try",
"{",
"for",
"(",
"Path",
"current",
"=",
"path",
".",... | Deletes the empty parent directories of the specified path.
The method catches and ignores FileNotFoundException as it is possible that multiple parallel Kite instances are
importing into a directory under the same root directory and it can happen that a Kite instance founds an empty
directory which needs to be deleted... | [
"Deletes",
"the",
"empty",
"parent",
"directories",
"of",
"the",
"specified",
"path",
".",
"The",
"method",
"catches",
"and",
"ignores",
"FileNotFoundException",
"as",
"it",
"is",
"possible",
"that",
"multiple",
"parallel",
"Kite",
"instances",
"are",
"importing",... | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemUtil.java#L258-L278 |
119,936 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemUtil.java | FileSystemUtil.supportsRename | public static boolean supportsRename(URI fsUri, Configuration conf) {
String fsUriScheme = fsUri.getScheme();
// Only S3 is known to not support renaming, but allow configuration override.
// This logic is intended as a temporary placeholder solution and should
// be revisited once HADOOP-9565 has been... | java | public static boolean supportsRename(URI fsUri, Configuration conf) {
String fsUriScheme = fsUri.getScheme();
// Only S3 is known to not support renaming, but allow configuration override.
// This logic is intended as a temporary placeholder solution and should
// be revisited once HADOOP-9565 has been... | [
"public",
"static",
"boolean",
"supportsRename",
"(",
"URI",
"fsUri",
",",
"Configuration",
"conf",
")",
"{",
"String",
"fsUriScheme",
"=",
"fsUri",
".",
"getScheme",
"(",
")",
";",
"// Only S3 is known to not support renaming, but allow configuration override.",
"// This... | Determine whether a FileSystem that supports efficient file renaming is being used. Two known
FileSystem implementations that currently lack this feature are S3N and S3A.
@param fsUri the FileSystem URI
@param conf the FileSystem Configuration
@return {@code true} if the FileSystem URI or {@link FileSystemProperties#S... | [
"Determine",
"whether",
"a",
"FileSystem",
"that",
"supports",
"efficient",
"file",
"renaming",
"is",
"being",
"used",
".",
"Two",
"known",
"FileSystem",
"implementations",
"that",
"currently",
"lack",
"this",
"feature",
"are",
"S3N",
"and",
"S3A",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemUtil.java#L710-L718 |
119,937 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/CSVAppender.java | CSVAppender.valueString | private static String valueString(Object value, Schema schema) {
if (value == null || schema.getType() == Schema.Type.NULL) {
return null;
}
switch (schema.getType()) {
case BOOLEAN:
case FLOAT:
case DOUBLE:
case INT:
case LONG:
case STRING:
return value.to... | java | private static String valueString(Object value, Schema schema) {
if (value == null || schema.getType() == Schema.Type.NULL) {
return null;
}
switch (schema.getType()) {
case BOOLEAN:
case FLOAT:
case DOUBLE:
case INT:
case LONG:
case STRING:
return value.to... | [
"private",
"static",
"String",
"valueString",
"(",
"Object",
"value",
",",
"Schema",
"schema",
")",
"{",
"if",
"(",
"value",
"==",
"null",
"||",
"schema",
".",
"getType",
"(",
")",
"==",
"Schema",
".",
"Type",
".",
"NULL",
")",
"{",
"return",
"null",
... | Returns a the value as the first matching schema type or null.
Note that if the value may be null even if the schema does not allow the
value to be null.
@param value a value
@param schema a Schema
@return a String representation of the value according to the Schema type | [
"Returns",
"a",
"the",
"value",
"as",
"the",
"first",
"matching",
"schema",
"type",
"or",
"null",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/CSVAppender.java#L131-L155 |
119,938 | kite-sdk/kite | kite-data/kite-data-mapreduce/src/main/java/org/kitesdk/data/mapreduce/DatasetKeyOutputFormat.java | DatasetKeyOutputFormat.loadOrCreateJobDataset | @SuppressWarnings("unchecked")
private static <E> Dataset<E> loadOrCreateJobDataset(JobContext jobContext) {
Dataset<Object> dataset = load(jobContext).getDataset();
String jobDatasetName = getJobDatasetName(jobContext);
DatasetRepository repo = getDatasetRepository(jobContext);
if (repo.exists(TEMP_N... | java | @SuppressWarnings("unchecked")
private static <E> Dataset<E> loadOrCreateJobDataset(JobContext jobContext) {
Dataset<Object> dataset = load(jobContext).getDataset();
String jobDatasetName = getJobDatasetName(jobContext);
DatasetRepository repo = getDatasetRepository(jobContext);
if (repo.exists(TEMP_N... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"static",
"<",
"E",
">",
"Dataset",
"<",
"E",
">",
"loadOrCreateJobDataset",
"(",
"JobContext",
"jobContext",
")",
"{",
"Dataset",
"<",
"Object",
">",
"dataset",
"=",
"load",
"(",
"jobContext",
"... | The job dataset may already exist if the ApplicationMaster was restarted | [
"The",
"job",
"dataset",
"may",
"already",
"exist",
"if",
"the",
"ApplicationMaster",
"was",
"restarted"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-mapreduce/src/main/java/org/kitesdk/data/mapreduce/DatasetKeyOutputFormat.java#L574-L594 |
119,939 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java | SchemaTool.createOrMigrateSchemaDirectory | public void createOrMigrateSchemaDirectory(String schemaDirectory,
boolean createTableAndFamilies) throws InterruptedException {
List<String> schemaStrings;
if (schemaDirectory.startsWith(CLASSPATH_PREFIX)) {
URL dirURL = getClass().getClassLoader().getResource(
schemaDirectory.substring(C... | java | public void createOrMigrateSchemaDirectory(String schemaDirectory,
boolean createTableAndFamilies) throws InterruptedException {
List<String> schemaStrings;
if (schemaDirectory.startsWith(CLASSPATH_PREFIX)) {
URL dirURL = getClass().getClassLoader().getResource(
schemaDirectory.substring(C... | [
"public",
"void",
"createOrMigrateSchemaDirectory",
"(",
"String",
"schemaDirectory",
",",
"boolean",
"createTableAndFamilies",
")",
"throws",
"InterruptedException",
"{",
"List",
"<",
"String",
">",
"schemaStrings",
";",
"if",
"(",
"schemaDirectory",
".",
"startsWith",... | Scans the schemaDirectory for avro schemas, and creates or migrates HBase
Common managed schemas managed by this instances entity manager.
@param schemaDirectory
The directory to recursively scan for avro schema files. This
directory can be a directory on the classpath, including a
directory that is embeddded in a jar... | [
"Scans",
"the",
"schemaDirectory",
"for",
"avro",
"schemas",
"and",
"creates",
"or",
"migrates",
"HBase",
"Common",
"managed",
"schemas",
"managed",
"by",
"this",
"instances",
"entity",
"manager",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java#L110-L181 |
119,940 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java | SchemaTool.prepareManagedSchema | private boolean prepareManagedSchema(String tableName,
String entitySchemaString) {
String entityName = getEntityNameFromSchemaString(entitySchemaString);
AvroEntitySchema entitySchema = parser
.parseEntitySchema(entitySchemaString);
AvroKeySchema keySchema = parser.parseKeySchema(entitySchema... | java | private boolean prepareManagedSchema(String tableName,
String entitySchemaString) {
String entityName = getEntityNameFromSchemaString(entitySchemaString);
AvroEntitySchema entitySchema = parser
.parseEntitySchema(entitySchemaString);
AvroKeySchema keySchema = parser.parseKeySchema(entitySchema... | [
"private",
"boolean",
"prepareManagedSchema",
"(",
"String",
"tableName",
",",
"String",
"entitySchemaString",
")",
"{",
"String",
"entityName",
"=",
"getEntityNameFromSchemaString",
"(",
"entitySchemaString",
")",
";",
"AvroEntitySchema",
"entitySchema",
"=",
"parser",
... | Prepare managed schema for this entitySchema | [
"Prepare",
"managed",
"schema",
"for",
"this",
"entitySchema"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java#L255-L291 |
119,941 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java | SchemaTool.prepareTableDescriptor | private HTableDescriptor prepareTableDescriptor(String tableName,
String entitySchemaString) {
HTableDescriptor descriptor = new HTableDescriptor(
Bytes.toBytes(tableName));
AvroEntitySchema entitySchema = parser
.parseEntitySchema(entitySchemaString);
Set<String> familiesToAdd = entit... | java | private HTableDescriptor prepareTableDescriptor(String tableName,
String entitySchemaString) {
HTableDescriptor descriptor = new HTableDescriptor(
Bytes.toBytes(tableName));
AvroEntitySchema entitySchema = parser
.parseEntitySchema(entitySchemaString);
Set<String> familiesToAdd = entit... | [
"private",
"HTableDescriptor",
"prepareTableDescriptor",
"(",
"String",
"tableName",
",",
"String",
"entitySchemaString",
")",
"{",
"HTableDescriptor",
"descriptor",
"=",
"new",
"HTableDescriptor",
"(",
"Bytes",
".",
"toBytes",
"(",
"tableName",
")",
")",
";",
"Avro... | Prepare the Table descriptor for the given entity Schema | [
"Prepare",
"the",
"Table",
"descriptor",
"for",
"the",
"given",
"entity",
"Schema"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java#L296-L312 |
119,942 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java | SchemaTool.createTables | private void createTables(Collection<HTableDescriptor> tableDescriptors)
throws InterruptedException {
try {
Set<String> tablesCreated = Sets.newHashSet();
Multimap<String, HTableDescriptor> pendingTableUpdates = ArrayListMultimap
.create();
for (HTableDescriptor tableDescriptor : ... | java | private void createTables(Collection<HTableDescriptor> tableDescriptors)
throws InterruptedException {
try {
Set<String> tablesCreated = Sets.newHashSet();
Multimap<String, HTableDescriptor> pendingTableUpdates = ArrayListMultimap
.create();
for (HTableDescriptor tableDescriptor : ... | [
"private",
"void",
"createTables",
"(",
"Collection",
"<",
"HTableDescriptor",
">",
"tableDescriptors",
")",
"throws",
"InterruptedException",
"{",
"try",
"{",
"Set",
"<",
"String",
">",
"tablesCreated",
"=",
"Sets",
".",
"newHashSet",
"(",
")",
";",
"Multimap",... | Create the tables asynchronously with the HBase | [
"Create",
"the",
"tables",
"asynchronously",
"with",
"the",
"HBase"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java#L317-L364 |
119,943 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java | SchemaTool.modifyTable | private void modifyTable(String tableName, HTableDescriptor newDescriptor) {
LOG.info("Modifying table " + tableName);
HColumnDescriptor[] newFamilies = newDescriptor.getColumnFamilies();
try {
List<HColumnDescriptor> columnsToAdd = Lists.newArrayList();
HTableDescriptor currentFamilies = hbaseA... | java | private void modifyTable(String tableName, HTableDescriptor newDescriptor) {
LOG.info("Modifying table " + tableName);
HColumnDescriptor[] newFamilies = newDescriptor.getColumnFamilies();
try {
List<HColumnDescriptor> columnsToAdd = Lists.newArrayList();
HTableDescriptor currentFamilies = hbaseA... | [
"private",
"void",
"modifyTable",
"(",
"String",
"tableName",
",",
"HTableDescriptor",
"newDescriptor",
")",
"{",
"LOG",
".",
"info",
"(",
"\"Modifying table \"",
"+",
"tableName",
")",
";",
"HColumnDescriptor",
"[",
"]",
"newFamilies",
"=",
"newDescriptor",
".",
... | add the column families which are not already present to the given table | [
"add",
"the",
"column",
"families",
"which",
"are",
"not",
"already",
"present",
"to",
"the",
"given",
"table"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java#L369-L395 |
119,944 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java | SchemaTool.getSchemaStringFromFile | private String getSchemaStringFromFile(File schemaFile) {
String schemaString;
FileInputStream fis = null;
try {
fis = new FileInputStream(schemaFile);
schemaString = AvroUtils.inputStreamToString(fis);
} catch (IOException e) {
throw new DatasetException(e);
} finally {
if (... | java | private String getSchemaStringFromFile(File schemaFile) {
String schemaString;
FileInputStream fis = null;
try {
fis = new FileInputStream(schemaFile);
schemaString = AvroUtils.inputStreamToString(fis);
} catch (IOException e) {
throw new DatasetException(e);
} finally {
if (... | [
"private",
"String",
"getSchemaStringFromFile",
"(",
"File",
"schemaFile",
")",
"{",
"String",
"schemaString",
";",
"FileInputStream",
"fis",
"=",
"null",
";",
"try",
"{",
"fis",
"=",
"new",
"FileInputStream",
"(",
"schemaFile",
")",
";",
"schemaString",
"=",
... | Will return the contents of schemaFile as a string
@param schemaFile
The file who's contents should be returned.
@return The contents of schemaFile | [
"Will",
"return",
"the",
"contents",
"of",
"schemaFile",
"as",
"a",
"string"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java#L412-L429 |
119,945 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java | SchemaTool.getSchemaStringsFromDir | private List<String> getSchemaStringsFromDir(File dir) {
List<String> schemaStrings = new ArrayList<String>();
Collection<File> schemaFiles = FileUtils.listFiles(dir,
new SuffixFileFilter(".avsc"), TrueFileFilter.INSTANCE);
for (File schemaFile : schemaFiles) {
schemaStrings.add(getSchemaStrin... | java | private List<String> getSchemaStringsFromDir(File dir) {
List<String> schemaStrings = new ArrayList<String>();
Collection<File> schemaFiles = FileUtils.listFiles(dir,
new SuffixFileFilter(".avsc"), TrueFileFilter.INSTANCE);
for (File schemaFile : schemaFiles) {
schemaStrings.add(getSchemaStrin... | [
"private",
"List",
"<",
"String",
">",
"getSchemaStringsFromDir",
"(",
"File",
"dir",
")",
"{",
"List",
"<",
"String",
">",
"schemaStrings",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"Collection",
"<",
"File",
">",
"schemaFiles",
"=",
"... | Gets the list of HBase Common Avro schema strings from dir. It recursively
searches dir to find files that end in .avsc to locate those strings.
@param dir
The dir to recursively search for schema strings
@return The list of schema strings | [
"Gets",
"the",
"list",
"of",
"HBase",
"Common",
"Avro",
"schema",
"strings",
"from",
"dir",
".",
"It",
"recursively",
"searches",
"dir",
"to",
"find",
"files",
"that",
"end",
"in",
".",
"avsc",
"to",
"locate",
"those",
"strings",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java#L476-L484 |
119,946 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java | SchemaTool.getSchemaStringsFromJar | private List<String> getSchemaStringsFromJar(String jarPath,
String directoryPath) {
LOG.info("Getting schema strings in: " + directoryPath + ", from jar: "
+ jarPath);
JarFile jar;
try {
jar = new JarFile(URLDecoder.decode(jarPath, "UTF-8"));
} catch (UnsupportedEncodingException e)... | java | private List<String> getSchemaStringsFromJar(String jarPath,
String directoryPath) {
LOG.info("Getting schema strings in: " + directoryPath + ", from jar: "
+ jarPath);
JarFile jar;
try {
jar = new JarFile(URLDecoder.decode(jarPath, "UTF-8"));
} catch (UnsupportedEncodingException e)... | [
"private",
"List",
"<",
"String",
">",
"getSchemaStringsFromJar",
"(",
"String",
"jarPath",
",",
"String",
"directoryPath",
")",
"{",
"LOG",
".",
"info",
"(",
"\"Getting schema strings in: \"",
"+",
"directoryPath",
"+",
"\", from jar: \"",
"+",
"jarPath",
")",
";... | Gets the list of HBase Common Avro schema strings from a directory in the
Jar. It recursively searches the directory in the jar to find files that
end in .avsc to locate thos strings.
@param jarPath
The path to the jar to search
@param directoryPath
The directory in the jar to find avro schema strings
@return The list... | [
"Gets",
"the",
"list",
"of",
"HBase",
"Common",
"Avro",
"schema",
"strings",
"from",
"a",
"directory",
"in",
"the",
"Jar",
".",
"It",
"recursively",
"searches",
"the",
"directory",
"in",
"the",
"jar",
"to",
"find",
"files",
"that",
"end",
"in",
".",
"avs... | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/tool/SchemaTool.java#L497-L527 |
119,947 | kite-sdk/kite | kite-data/kite-data-hive/src/main/java/org/kitesdk/data/spi/hive/Loader.java | Loader.setMetaStoreURI | private static void setMetaStoreURI(
Configuration conf, Map<String, String> match) {
try {
// If the host is set, construct a new MetaStore URI and set the property
// in the Configuration. Otherwise, do not change the MetaStore URI.
String host = match.get(URIPattern.HOST);
if (host ... | java | private static void setMetaStoreURI(
Configuration conf, Map<String, String> match) {
try {
// If the host is set, construct a new MetaStore URI and set the property
// in the Configuration. Otherwise, do not change the MetaStore URI.
String host = match.get(URIPattern.HOST);
if (host ... | [
"private",
"static",
"void",
"setMetaStoreURI",
"(",
"Configuration",
"conf",
",",
"Map",
"<",
"String",
",",
"String",
">",
"match",
")",
"{",
"try",
"{",
"// If the host is set, construct a new MetaStore URI and set the property",
"// in the Configuration. Otherwise, do not... | Sets the MetaStore URI in the given Configuration, if there is a host in
the match arguments. If there is no host, then the conf is not changed.
@param conf a Configuration that will be used to connect to the MetaStore
@param match URIPattern match results | [
"Sets",
"the",
"MetaStore",
"URI",
"in",
"the",
"given",
"Configuration",
"if",
"there",
"is",
"a",
"host",
"in",
"the",
"match",
"arguments",
".",
"If",
"there",
"is",
"no",
"host",
"then",
"the",
"conf",
"is",
"not",
"changed",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hive/src/main/java/org/kitesdk/data/spi/hive/Loader.java#L221-L241 |
119,948 | kite-sdk/kite | kite-morphlines/kite-morphlines-saxon/src/main/java/org/kitesdk/morphline/saxon/XMLStreamCopier.java | XMLStreamCopier.copy | public void copy(boolean isFragmentMode) throws XMLStreamException {
int ev = isFragmentMode ?
XMLStreamConstants.START_ELEMENT : XMLStreamConstants.START_DOCUMENT;
reader.require(ev, null, null);
int depth = 0;
ev = reader.getEventType();
while (true) {
switch (ev) {
case XMLStreamConstants.START... | java | public void copy(boolean isFragmentMode) throws XMLStreamException {
int ev = isFragmentMode ?
XMLStreamConstants.START_ELEMENT : XMLStreamConstants.START_DOCUMENT;
reader.require(ev, null, null);
int depth = 0;
ev = reader.getEventType();
while (true) {
switch (ev) {
case XMLStreamConstants.START... | [
"public",
"void",
"copy",
"(",
"boolean",
"isFragmentMode",
")",
"throws",
"XMLStreamException",
"{",
"int",
"ev",
"=",
"isFragmentMode",
"?",
"XMLStreamConstants",
".",
"START_ELEMENT",
":",
"XMLStreamConstants",
".",
"START_DOCUMENT",
";",
"reader",
".",
"require"... | Reads all events from the reader and pipes them into the writer.
@param isFragmentMode
if true, copies all events of the XML fragment starting at the
current cursor position, if false copies all events of the
document starting at the current cursor positions.
@throws XMLStreamException
If an error occurs while copying... | [
"Reads",
"all",
"events",
"from",
"the",
"reader",
"and",
"pipes",
"them",
"into",
"the",
"writer",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-saxon/src/main/java/org/kitesdk/morphline/saxon/XMLStreamCopier.java#L85-L171 |
119,949 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseUtils.java | HBaseUtils.mergePuts | public static Put mergePuts(byte[] keyBytes, List<Put> putList) {
Put put = new Put(keyBytes);
for (Put putToMerge : putList) {
Map<byte[], List<KeyValue>> familyMap =
(Map<byte[], List<KeyValue>>) GET_FAMILY_MAP_METHOD.invoke(putToMerge);
for (List<KeyValue> keyValueList : familyM... | java | public static Put mergePuts(byte[] keyBytes, List<Put> putList) {
Put put = new Put(keyBytes);
for (Put putToMerge : putList) {
Map<byte[], List<KeyValue>> familyMap =
(Map<byte[], List<KeyValue>>) GET_FAMILY_MAP_METHOD.invoke(putToMerge);
for (List<KeyValue> keyValueList : familyM... | [
"public",
"static",
"Put",
"mergePuts",
"(",
"byte",
"[",
"]",
"keyBytes",
",",
"List",
"<",
"Put",
">",
"putList",
")",
"{",
"Put",
"put",
"=",
"new",
"Put",
"(",
"keyBytes",
")",
";",
"for",
"(",
"Put",
"putToMerge",
":",
"putList",
")",
"{",
"Ma... | Given a list of puts, create a new put with the values in each put merged
together. It is expected that no puts have a value for the same fully
qualified column. Return the new put.
@param key
The key of the new put.
@param putList
The list of puts to merge
@return the new Put instance | [
"Given",
"a",
"list",
"of",
"puts",
"create",
"a",
"new",
"put",
"with",
"the",
"values",
"in",
"each",
"put",
"merged",
"together",
".",
"It",
"is",
"expected",
"that",
"no",
"puts",
"have",
"a",
"value",
"for",
"the",
"same",
"fully",
"qualified",
"c... | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseUtils.java#L65-L80 |
119,950 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseUtils.java | HBaseUtils.mergePutActions | public static PutAction mergePutActions(byte[] keyBytes,
List<PutAction> putActionList) {
VersionCheckAction checkAction = null;
List<Put> putsToMerge = new ArrayList<Put>();
for (PutAction putActionToMerge : putActionList) {
putsToMerge.add(putActionToMerge.getPut());
VersionCheckAction c... | java | public static PutAction mergePutActions(byte[] keyBytes,
List<PutAction> putActionList) {
VersionCheckAction checkAction = null;
List<Put> putsToMerge = new ArrayList<Put>();
for (PutAction putActionToMerge : putActionList) {
putsToMerge.add(putActionToMerge.getPut());
VersionCheckAction c... | [
"public",
"static",
"PutAction",
"mergePutActions",
"(",
"byte",
"[",
"]",
"keyBytes",
",",
"List",
"<",
"PutAction",
">",
"putActionList",
")",
"{",
"VersionCheckAction",
"checkAction",
"=",
"null",
";",
"List",
"<",
"Put",
">",
"putsToMerge",
"=",
"new",
"... | Given a list of PutActions, create a new PutAction with the values in each
put merged together. It is expected that no puts have a value for the same
fully qualified column. Return the new PutAction.
@param key
The key of the new put.
@param putActionList
The list of PutActions to merge
@return the new PutAction insta... | [
"Given",
"a",
"list",
"of",
"PutActions",
"create",
"a",
"new",
"PutAction",
"with",
"the",
"values",
"in",
"each",
"put",
"merged",
"together",
".",
"It",
"is",
"expected",
"that",
"no",
"puts",
"have",
"a",
"value",
"for",
"the",
"same",
"fully",
"qual... | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseUtils.java#L93-L106 |
119,951 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseUtils.java | HBaseUtils.addColumnsToOperation | private static void addColumnsToOperation(Collection<String> columns, Operation operation) {
// Keep track of whole family additions
Set<String> familySet = new HashSet<String>();
// Iterate through each of the required columns
for (String column : columns) {
// Split the column by : (family : c... | java | private static void addColumnsToOperation(Collection<String> columns, Operation operation) {
// Keep track of whole family additions
Set<String> familySet = new HashSet<String>();
// Iterate through each of the required columns
for (String column : columns) {
// Split the column by : (family : c... | [
"private",
"static",
"void",
"addColumnsToOperation",
"(",
"Collection",
"<",
"String",
">",
"columns",
",",
"Operation",
"operation",
")",
"{",
"// Keep track of whole family additions",
"Set",
"<",
"String",
">",
"familySet",
"=",
"new",
"HashSet",
"<",
"String",
... | Add a Collection of Columns to an Operation, Only Add Single Columns
If Their Family Isn't Already Being Added.
@param columns
Collection of columns to add to the operation
@param operation
The HBase operation to add the columns to | [
"Add",
"a",
"Collection",
"of",
"Columns",
"to",
"an",
"Operation",
"Only",
"Add",
"Single",
"Columns",
"If",
"Their",
"Family",
"Isn",
"t",
"Already",
"Being",
"Added",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseUtils.java#L116-L138 |
119,952 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseUtils.java | HBaseUtils.addColumnsToScan | public static void addColumnsToScan(Collection<String> columns, final Scan scan) {
addColumnsToOperation(columns, new Operation() {
@Override
public void addColumn(byte[] family, byte[] column) {
scan.addColumn(family, column);
}
@Override
public void addFamily(byte[] family) ... | java | public static void addColumnsToScan(Collection<String> columns, final Scan scan) {
addColumnsToOperation(columns, new Operation() {
@Override
public void addColumn(byte[] family, byte[] column) {
scan.addColumn(family, column);
}
@Override
public void addFamily(byte[] family) ... | [
"public",
"static",
"void",
"addColumnsToScan",
"(",
"Collection",
"<",
"String",
">",
"columns",
",",
"final",
"Scan",
"scan",
")",
"{",
"addColumnsToOperation",
"(",
"columns",
",",
"new",
"Operation",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"add... | Add a Collection of Columns to a Scanner, Only Add Single Columns
If Their Family Isn't Already Being Added.
@param columns
Collection of columns to add to the scan
@param scan
The scanner object to add the columns to | [
"Add",
"a",
"Collection",
"of",
"Columns",
"to",
"a",
"Scanner",
"Only",
"Add",
"Single",
"Columns",
"If",
"Their",
"Family",
"Isn",
"t",
"Already",
"Being",
"Added",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseUtils.java#L148-L160 |
119,953 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseUtils.java | HBaseUtils.addColumnsToGet | public static void addColumnsToGet(Collection<String> columns, final Get get) {
addColumnsToOperation(columns, new Operation() {
@Override
public void addColumn(byte[] family, byte[] column) {
get.addColumn(family, column);
}
@Override
public void addFamily(byte[] family) {
... | java | public static void addColumnsToGet(Collection<String> columns, final Get get) {
addColumnsToOperation(columns, new Operation() {
@Override
public void addColumn(byte[] family, byte[] column) {
get.addColumn(family, column);
}
@Override
public void addFamily(byte[] family) {
... | [
"public",
"static",
"void",
"addColumnsToGet",
"(",
"Collection",
"<",
"String",
">",
"columns",
",",
"final",
"Get",
"get",
")",
"{",
"addColumnsToOperation",
"(",
"columns",
",",
"new",
"Operation",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"addCol... | Add a Collection of Columns to a Get, Only Add Single Columns
If Their Family Isn't Already Being Added.
@param columns
Collection of columns to add to the Get
@param get
The Get object to add the columns to | [
"Add",
"a",
"Collection",
"of",
"Columns",
"to",
"a",
"Get",
"Only",
"Add",
"Single",
"Columns",
"If",
"Their",
"Family",
"Isn",
"t",
"Already",
"Being",
"Added",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseUtils.java#L170-L182 |
119,954 | kite-sdk/kite | kite-morphlines/kite-morphlines-saxon/src/main/java/org/kitesdk/morphline/saxon/XMLInputFactoryCreator.java | XMLInputFactoryCreator.setupProperties | protected void setupProperties(XMLInputFactory factory) {
factory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, Boolean.TRUE);
factory.setProperty(XMLInputFactory.IS_COALESCING, Boolean.TRUE);
factory.setProperty(XMLInputFactory.SUPPORT_DTD, Boolean.TRUE);
try {
factory.setProperty(XMLInputFactory.IS_V... | java | protected void setupProperties(XMLInputFactory factory) {
factory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, Boolean.TRUE);
factory.setProperty(XMLInputFactory.IS_COALESCING, Boolean.TRUE);
factory.setProperty(XMLInputFactory.SUPPORT_DTD, Boolean.TRUE);
try {
factory.setProperty(XMLInputFactory.IS_V... | [
"protected",
"void",
"setupProperties",
"(",
"XMLInputFactory",
"factory",
")",
"{",
"factory",
".",
"setProperty",
"(",
"XMLInputFactory",
".",
"IS_NAMESPACE_AWARE",
",",
"Boolean",
".",
"TRUE",
")",
";",
"factory",
".",
"setProperty",
"(",
"XMLInputFactory",
"."... | Initializes default parser properties, if any. | [
"Initializes",
"default",
"parser",
"properties",
"if",
"any",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-saxon/src/main/java/org/kitesdk/morphline/saxon/XMLInputFactoryCreator.java#L152-L209 |
119,955 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemMetadataProvider.java | FileSystemMetadataProvider.pathForMetadata | private Path pathForMetadata(String namespace, String name) {
return pathForMetadata(rootDirectory, namespace, name);
} | java | private Path pathForMetadata(String namespace, String name) {
return pathForMetadata(rootDirectory, namespace, name);
} | [
"private",
"Path",
"pathForMetadata",
"(",
"String",
"namespace",
",",
"String",
"name",
")",
"{",
"return",
"pathForMetadata",
"(",
"rootDirectory",
",",
"namespace",
",",
"name",
")",
";",
"}"
] | Returns the path where this MetadataProvider will store metadata.
Note that this is not dependent on the actual storage location for the
dataset, although they are usually co-located. This provider must be able
to read metadata without a location for the Dataset when loading.
@param name The {@link Dataset} name
@ret... | [
"Returns",
"the",
"path",
"where",
"this",
"MetadataProvider",
"will",
"store",
"metadata",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemMetadataProvider.java#L461-L463 |
119,956 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemMetadataProvider.java | FileSystemMetadataProvider.pathForMetadata | private static Path pathForMetadata(Path root, String namespace, String name) {
return new Path(
FileSystemDatasetRepository.pathForDataset(root, namespace, name),
METADATA_DIRECTORY);
} | java | private static Path pathForMetadata(Path root, String namespace, String name) {
return new Path(
FileSystemDatasetRepository.pathForDataset(root, namespace, name),
METADATA_DIRECTORY);
} | [
"private",
"static",
"Path",
"pathForMetadata",
"(",
"Path",
"root",
",",
"String",
"namespace",
",",
"String",
"name",
")",
"{",
"return",
"new",
"Path",
"(",
"FileSystemDatasetRepository",
".",
"pathForDataset",
"(",
"root",
",",
"namespace",
",",
"name",
")... | Returns the correct metadata path for the given dataset.
@param root A Path
@param name A String dataset name
@return the metadata Path | [
"Returns",
"the",
"correct",
"metadata",
"path",
"for",
"the",
"given",
"dataset",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemMetadataProvider.java#L561-L565 |
119,957 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemMetadataProvider.java | FileSystemMetadataProvider.checkExists | private static void checkExists(FileSystem fs, Path location) {
try {
if (!fs.exists(location)) {
throw new DatasetNotFoundException(
"Descriptor location does not exist: " + location);
}
} catch (IOException ex) {
throw new DatasetIOException(
"Cannot access desc... | java | private static void checkExists(FileSystem fs, Path location) {
try {
if (!fs.exists(location)) {
throw new DatasetNotFoundException(
"Descriptor location does not exist: " + location);
}
} catch (IOException ex) {
throw new DatasetIOException(
"Cannot access desc... | [
"private",
"static",
"void",
"checkExists",
"(",
"FileSystem",
"fs",
",",
"Path",
"location",
")",
"{",
"try",
"{",
"if",
"(",
"!",
"fs",
".",
"exists",
"(",
"location",
")",
")",
"{",
"throw",
"new",
"DatasetNotFoundException",
"(",
"\"Descriptor location d... | Precondition-style static validation that a dataset exists
@param fs A FileSystem where the metadata should be stored
@param location The Path where the metadata should be stored
@throws org.kitesdk.data.DatasetNotFoundException if the descriptor location is missing
@throws org.kitesdk.data.DatasetIOException ... | [
"Precondition",
"-",
"style",
"static",
"validation",
"that",
"a",
"dataset",
"exists"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemMetadataProvider.java#L575-L585 |
119,958 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/SpecificAvroDao.java | SpecificAvroDao.buildCompositeDaoWithEntityManager | public static <K extends SpecificRecord, S extends SpecificRecord> Dao<Map<String, S>> buildCompositeDaoWithEntityManager(
HTablePool tablePool, String tableName, List<Class<S>> subEntityClasses,
SchemaManager schemaManager) {
List<EntityMapper<S>> entityMappers = new ArrayList<EntityMapper<S>>();
... | java | public static <K extends SpecificRecord, S extends SpecificRecord> Dao<Map<String, S>> buildCompositeDaoWithEntityManager(
HTablePool tablePool, String tableName, List<Class<S>> subEntityClasses,
SchemaManager schemaManager) {
List<EntityMapper<S>> entityMappers = new ArrayList<EntityMapper<S>>();
... | [
"public",
"static",
"<",
"K",
"extends",
"SpecificRecord",
",",
"S",
"extends",
"SpecificRecord",
">",
"Dao",
"<",
"Map",
"<",
"String",
",",
"S",
">",
">",
"buildCompositeDaoWithEntityManager",
"(",
"HTablePool",
"tablePool",
",",
"String",
"tableName",
",",
... | Create a CompositeDao, which will return SpecificRecord instances
in a Map container.
@param tablePool
An HTablePool instance to use for connecting to HBase.
@param tableName
The table name of the managed schema.
@param subEntityClasses
The classes that make up the subentities.
@param schemaManager
The SchemaManager w... | [
"Create",
"a",
"CompositeDao",
"which",
"will",
"return",
"SpecificRecord",
"instances",
"in",
"a",
"Map",
"container",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/SpecificAvroDao.java#L326-L341 |
119,959 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/MultiLevelIterator.java | MultiLevelIterator.advance | private boolean advance() {
// done when there are depth iterators and the last iterator has an item
while (iterators.size() < depth || !iterators.getLast().hasNext()) {
// each iteration: add an iterator for the next level from the current
// last iterator, or remove the last iterator because it is... | java | private boolean advance() {
// done when there are depth iterators and the last iterator has an item
while (iterators.size() < depth || !iterators.getLast().hasNext()) {
// each iteration: add an iterator for the next level from the current
// last iterator, or remove the last iterator because it is... | [
"private",
"boolean",
"advance",
"(",
")",
"{",
"// done when there are depth iterators and the last iterator has an item",
"while",
"(",
"iterators",
".",
"size",
"(",
")",
"<",
"depth",
"||",
"!",
"iterators",
".",
"getLast",
"(",
")",
".",
"hasNext",
"(",
")",
... | Advance the iterator stack to the next item or return false if there are
none left.
If this function returns true, then there are {@code depth} iterators in
the iterator stack and {@code hasNext()} is true for the last iterator.
If this function returns false, then there are no more items in the multi-
level iterator... | [
"Advance",
"the",
"iterator",
"stack",
"to",
"the",
"next",
"item",
"or",
"return",
"false",
"if",
"there",
"are",
"none",
"left",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/MultiLevelIterator.java#L124-L143 |
119,960 | kite-sdk/kite | kite-data/kite-data-crunch/src/main/java/org/kitesdk/data/crunch/DatasetSourceTarget.java | DatasetSourceTarget.inputBundle | private static FormatBundle<DatasetKeyInputFormat> inputBundle(Configuration conf) {
FormatBundle<DatasetKeyInputFormat> bundle = FormatBundle
.forInput(DatasetKeyInputFormat.class);
for (Map.Entry<String, String> entry : conf) {
bundle.set(entry.getKey(), entry.getValue());
}
return bundl... | java | private static FormatBundle<DatasetKeyInputFormat> inputBundle(Configuration conf) {
FormatBundle<DatasetKeyInputFormat> bundle = FormatBundle
.forInput(DatasetKeyInputFormat.class);
for (Map.Entry<String, String> entry : conf) {
bundle.set(entry.getKey(), entry.getValue());
}
return bundl... | [
"private",
"static",
"FormatBundle",
"<",
"DatasetKeyInputFormat",
">",
"inputBundle",
"(",
"Configuration",
"conf",
")",
"{",
"FormatBundle",
"<",
"DatasetKeyInputFormat",
">",
"bundle",
"=",
"FormatBundle",
".",
"forInput",
"(",
"DatasetKeyInputFormat",
".",
"class"... | Builds a FormatBundle for DatasetKeyInputFormat by copying a temp config.
All properties will be copied from the temporary configuration
@param conf A Configuration that will be copied
@return a FormatBundle with the contents of conf | [
"Builds",
"a",
"FormatBundle",
"for",
"DatasetKeyInputFormat",
"by",
"copying",
"a",
"temp",
"config",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-crunch/src/main/java/org/kitesdk/data/crunch/DatasetSourceTarget.java#L184-L191 |
119,961 | kite-sdk/kite | kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/base/Validator.java | Validator.validateEnum | public <T extends Enum<T>> T validateEnum(Config config, String value, Class<T> type, T... choices) {
if (choices.length == 0) {
choices = type.getEnumConstants();
}
Preconditions.checkArgument(choices.length > 0);
try {
T result = Enum.valueOf(type, value);
if (!Arrays.asList(choices... | java | public <T extends Enum<T>> T validateEnum(Config config, String value, Class<T> type, T... choices) {
if (choices.length == 0) {
choices = type.getEnumConstants();
}
Preconditions.checkArgument(choices.length > 0);
try {
T result = Enum.valueOf(type, value);
if (!Arrays.asList(choices... | [
"public",
"<",
"T",
"extends",
"Enum",
"<",
"T",
">",
">",
"T",
"validateEnum",
"(",
"Config",
"config",
",",
"String",
"value",
",",
"Class",
"<",
"T",
">",
"type",
",",
"T",
"...",
"choices",
")",
"{",
"if",
"(",
"choices",
".",
"length",
"==",
... | Validates that an enum of the given type with the given value exists, and that this enum is
contained in the given list of permitted choices; finally returns that enum object. | [
"Validates",
"that",
"an",
"enum",
"of",
"the",
"given",
"type",
"with",
"the",
"given",
"value",
"exists",
"and",
"that",
"this",
"enum",
"is",
"contained",
"in",
"the",
"given",
"list",
"of",
"permitted",
"choices",
";",
"finally",
"returns",
"that",
"en... | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/base/Validator.java#L50-L68 |
119,962 | kite-sdk/kite | kite-morphlines/kite-morphlines-metrics-scalable/src/main/java/org/kitesdk/morphline/metrics/scalable/ScalableStatistics.java | ScalableStatistics.add | public void add(double value) {
count++;
min = Math.min(min, value);
max = Math.max(max, value);
sum += value;
sumOfSquares += value * value;
addQuantileValue(value);
} | java | public void add(double value) {
count++;
min = Math.min(min, value);
max = Math.max(max, value);
sum += value;
sumOfSquares += value * value;
addQuantileValue(value);
} | [
"public",
"void",
"add",
"(",
"double",
"value",
")",
"{",
"count",
"++",
";",
"min",
"=",
"Math",
".",
"min",
"(",
"min",
",",
"value",
")",
";",
"max",
"=",
"Math",
".",
"max",
"(",
"max",
",",
"value",
")",
";",
"sum",
"+=",
"value",
";",
... | Adds the given data value to the data set | [
"Adds",
"the",
"given",
"data",
"value",
"to",
"the",
"data",
"set"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-metrics-scalable/src/main/java/org/kitesdk/morphline/metrics/scalable/ScalableStatistics.java#L106-L113 |
119,963 | kite-sdk/kite | kite-morphlines/kite-morphlines-metrics-scalable/src/main/java/org/kitesdk/morphline/metrics/scalable/ScalableStatistics.java | ScalableStatistics.add | public void add(ScalableStatistics other) {
count += other.count;
min = Math.min(min, other.min);
max = Math.max(max, other.max);
sum += other.sum;
sumOfSquares += other.sumOfSquares;
tdigest.add(other.tdigest);
if (other.exactValues != null) {
for (int i = 0; i < other.numExactValues;... | java | public void add(ScalableStatistics other) {
count += other.count;
min = Math.min(min, other.min);
max = Math.max(max, other.max);
sum += other.sum;
sumOfSquares += other.sumOfSquares;
tdigest.add(other.tdigest);
if (other.exactValues != null) {
for (int i = 0; i < other.numExactValues;... | [
"public",
"void",
"add",
"(",
"ScalableStatistics",
"other",
")",
"{",
"count",
"+=",
"other",
".",
"count",
";",
"min",
"=",
"Math",
".",
"min",
"(",
"min",
",",
"other",
".",
"min",
")",
";",
"max",
"=",
"Math",
".",
"max",
"(",
"max",
",",
"ot... | Merges another statistics instance into this instance. For example, this way the independent
stats and quantiles of each separate MapReduce task can be merged into a single overall job
summary statistic. | [
"Merges",
"another",
"statistics",
"instance",
"into",
"this",
"instance",
".",
"For",
"example",
"this",
"way",
"the",
"independent",
"stats",
"and",
"quantiles",
"of",
"each",
"separate",
"MapReduce",
"task",
"can",
"be",
"merged",
"into",
"a",
"single",
"ov... | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-metrics-scalable/src/main/java/org/kitesdk/morphline/metrics/scalable/ScalableStatistics.java#L142-L154 |
119,964 | kite-sdk/kite | kite-morphlines/kite-morphlines-metrics-scalable/src/main/java/org/kitesdk/morphline/metrics/scalable/ScalableStatistics.java | ScalableStatistics.asBytes | public byte[] asBytes() {
byte[] className = tdigest.getClass().getName().getBytes(Charsets.UTF_8);
int vlen = exactValues == null ? 0 : numExactValues;
ByteBuffer buf = ByteBuffer.allocate(4 + 8*5 + 4 + 4 + 8*vlen + 4 + className.length + tdigest.byteSize() + 4);
buf.putInt(MAGIC_CODE); // for sanity c... | java | public byte[] asBytes() {
byte[] className = tdigest.getClass().getName().getBytes(Charsets.UTF_8);
int vlen = exactValues == null ? 0 : numExactValues;
ByteBuffer buf = ByteBuffer.allocate(4 + 8*5 + 4 + 4 + 8*vlen + 4 + className.length + tdigest.byteSize() + 4);
buf.putInt(MAGIC_CODE); // for sanity c... | [
"public",
"byte",
"[",
"]",
"asBytes",
"(",
")",
"{",
"byte",
"[",
"]",
"className",
"=",
"tdigest",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
".",
"getBytes",
"(",
"Charsets",
".",
"UTF_8",
")",
";",
"int",
"vlen",
"=",
"exactValues",
"... | Serializes the data structure into a byte array | [
"Serializes",
"the",
"data",
"structure",
"into",
"a",
"byte",
"array"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-metrics-scalable/src/main/java/org/kitesdk/morphline/metrics/scalable/ScalableStatistics.java#L157-L187 |
119,965 | kite-sdk/kite | kite-morphlines/kite-morphlines-metrics-scalable/src/main/java/org/kitesdk/morphline/metrics/scalable/ScalableStatistics.java | ScalableStatistics.fromBytes | public static ScalableStatistics fromBytes(byte[] bytes) {
Preconditions.checkArgument(bytes.length > 0);
ByteBuffer buf = ByteBuffer.wrap(bytes);
ScalableStatistics stats = new ScalableStatistics();
Preconditions.checkArgument(buf.getInt() == MAGIC_CODE);
// read basic descriptive stats
st... | java | public static ScalableStatistics fromBytes(byte[] bytes) {
Preconditions.checkArgument(bytes.length > 0);
ByteBuffer buf = ByteBuffer.wrap(bytes);
ScalableStatistics stats = new ScalableStatistics();
Preconditions.checkArgument(buf.getInt() == MAGIC_CODE);
// read basic descriptive stats
st... | [
"public",
"static",
"ScalableStatistics",
"fromBytes",
"(",
"byte",
"[",
"]",
"bytes",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"bytes",
".",
"length",
">",
"0",
")",
";",
"ByteBuffer",
"buf",
"=",
"ByteBuffer",
".",
"wrap",
"(",
"bytes",
")",... | Derializes the data structure from a byte array | [
"Derializes",
"the",
"data",
"structure",
"from",
"a",
"byte",
"array"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-metrics-scalable/src/main/java/org/kitesdk/morphline/metrics/scalable/ScalableStatistics.java#L190-L231 |
119,966 | kite-sdk/kite | kite-tools-parent/kite-tools/src/main/java/org/kitesdk/tools/JobClasspathHelper.java | JobClasspathHelper.createMd5SumFile | private void createMd5SumFile(FileSystem fs, String md5sum, Path remoteMd5Path) throws IOException {
FSDataOutputStream os = null;
try {
os = fs.create(remoteMd5Path, true);
os.writeBytes(md5sum);
os.flush();
} catch (Exception e) {
LOG.error("{}", e);
} finally {
if (os !=... | java | private void createMd5SumFile(FileSystem fs, String md5sum, Path remoteMd5Path) throws IOException {
FSDataOutputStream os = null;
try {
os = fs.create(remoteMd5Path, true);
os.writeBytes(md5sum);
os.flush();
} catch (Exception e) {
LOG.error("{}", e);
} finally {
if (os !=... | [
"private",
"void",
"createMd5SumFile",
"(",
"FileSystem",
"fs",
",",
"String",
"md5sum",
",",
"Path",
"remoteMd5Path",
")",
"throws",
"IOException",
"{",
"FSDataOutputStream",
"os",
"=",
"null",
";",
"try",
"{",
"os",
"=",
"fs",
".",
"create",
"(",
"remoteMd... | This method creates an file that contains a line with a MD5 sum
@param fs
FileSystem where to create the file.
@param md5sum
The string containing the MD5 sum.
@param remoteMd5Path
The path where to save the file.
@throws IOException | [
"This",
"method",
"creates",
"an",
"file",
"that",
"contains",
"a",
"line",
"with",
"a",
"MD5",
"sum"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-tools-parent/kite-tools/src/main/java/org/kitesdk/tools/JobClasspathHelper.java#L231-L244 |
119,967 | kite-sdk/kite | kite-minicluster/src/main/java/org/kitesdk/minicluster/HBaseService.java | HBaseService.configureHBaseCluster | private static Configuration configureHBaseCluster(Configuration config,
int zkClientPort, FileSystem hdfsFs, String bindIP, int masterPort,
int regionserverPort) throws IOException {
// Configure the zookeeper port
config
.set(HConstants.ZOOKEEPER_CLIENT_PORT, Integer.toString(zkClientPort)... | java | private static Configuration configureHBaseCluster(Configuration config,
int zkClientPort, FileSystem hdfsFs, String bindIP, int masterPort,
int regionserverPort) throws IOException {
// Configure the zookeeper port
config
.set(HConstants.ZOOKEEPER_CLIENT_PORT, Integer.toString(zkClientPort)... | [
"private",
"static",
"Configuration",
"configureHBaseCluster",
"(",
"Configuration",
"config",
",",
"int",
"zkClientPort",
",",
"FileSystem",
"hdfsFs",
",",
"String",
"bindIP",
",",
"int",
"masterPort",
",",
"int",
"regionserverPort",
")",
"throws",
"IOException",
"... | Configure the HBase cluster before launching it
@param config
already created Hadoop configuration we'll further configure for
HDFS
@param zkClientPort
The client port zookeeper is listening on
@param hdfsFs
The HDFS FileSystem this HBase cluster will run on top of
@param bindIP
The IP Address to force bind all socket... | [
"Configure",
"the",
"HBase",
"cluster",
"before",
"launching",
"it"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-minicluster/src/main/java/org/kitesdk/minicluster/HBaseService.java#L164-L218 |
119,968 | kite-sdk/kite | kite-minicluster/src/main/java/org/kitesdk/minicluster/HBaseService.java | HBaseService.waitForHBaseToComeOnline | private static void waitForHBaseToComeOnline(MiniHBaseCluster hbaseCluster)
throws IOException, InterruptedException {
// Wait for the master to be initialized. This is required because even
// before it's initialized, the regionserver can come online and the meta
// table can be scannable. If the clu... | java | private static void waitForHBaseToComeOnline(MiniHBaseCluster hbaseCluster)
throws IOException, InterruptedException {
// Wait for the master to be initialized. This is required because even
// before it's initialized, the regionserver can come online and the meta
// table can be scannable. If the clu... | [
"private",
"static",
"void",
"waitForHBaseToComeOnline",
"(",
"MiniHBaseCluster",
"hbaseCluster",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"// Wait for the master to be initialized. This is required because even",
"// before it's initialized, the regionserver can c... | Wait for the hbase cluster to start up and come online, and then return.
@param hbaseCluster
The hbase cluster to wait for.
@throws IOException | [
"Wait",
"for",
"the",
"hbase",
"cluster",
"to",
"start",
"up",
"and",
"come",
"online",
"and",
"then",
"return",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-minicluster/src/main/java/org/kitesdk/minicluster/HBaseService.java#L227-L255 |
119,969 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/SignalManager.java | SignalManager.signalReady | public void signalReady(Constraints viewConstraints) {
try {
rootFileSystem.mkdirs(signalDirectory);
} catch (IOException e) {
throw new DatasetIOException("Unable to create signal manager directory: "
+ signalDirectory, e);
}
String normalizedConstraints = getNormalizedConstr... | java | public void signalReady(Constraints viewConstraints) {
try {
rootFileSystem.mkdirs(signalDirectory);
} catch (IOException e) {
throw new DatasetIOException("Unable to create signal manager directory: "
+ signalDirectory, e);
}
String normalizedConstraints = getNormalizedConstr... | [
"public",
"void",
"signalReady",
"(",
"Constraints",
"viewConstraints",
")",
"{",
"try",
"{",
"rootFileSystem",
".",
"mkdirs",
"(",
"signalDirectory",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"throw",
"new",
"DatasetIOException",
"(",
"\"Unab... | Create a signal for the specified constraints.
@param viewConstraints The constraints to create a signal for.
@throws DatasetException if the signal could not be created. | [
"Create",
"a",
"signal",
"for",
"the",
"specified",
"constraints",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/SignalManager.java#L66-L85 |
119,970 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/SignalManager.java | SignalManager.getReadyTimestamp | public long getReadyTimestamp(Constraints viewConstraints) {
String normalizedConstraints = getNormalizedConstraints(viewConstraints);
Path signalPath = new Path(signalDirectory, normalizedConstraints);
// check if the signal exists
try {
try {
FileStatus signalStatus = rootFileSystem.get... | java | public long getReadyTimestamp(Constraints viewConstraints) {
String normalizedConstraints = getNormalizedConstraints(viewConstraints);
Path signalPath = new Path(signalDirectory, normalizedConstraints);
// check if the signal exists
try {
try {
FileStatus signalStatus = rootFileSystem.get... | [
"public",
"long",
"getReadyTimestamp",
"(",
"Constraints",
"viewConstraints",
")",
"{",
"String",
"normalizedConstraints",
"=",
"getNormalizedConstraints",
"(",
"viewConstraints",
")",
";",
"Path",
"signalPath",
"=",
"new",
"Path",
"(",
"signalDirectory",
",",
"normal... | Check the last time the specified constraints have been signaled as ready.
@param viewConstraints The constraints to check for a signal.
@return the timestamp of the last time the constraints were signaled as ready.
if the constraints have never been signaled, -1 will be returned.
@throws DatasetException if the sig... | [
"Check",
"the",
"last",
"time",
"the",
"specified",
"constraints",
"have",
"been",
"signaled",
"as",
"ready",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/SignalManager.java#L97-L113 |
119,971 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemDataset.java | FileSystemDataset.viewForUri | View<E> viewForUri(URI location) {
Preconditions.checkNotNull(location, "Partition location cannot be null");
PartitionView<E> view = getPartitionView(location);
if (view == unbounded) {
return this;
}
return view;
} | java | View<E> viewForUri(URI location) {
Preconditions.checkNotNull(location, "Partition location cannot be null");
PartitionView<E> view = getPartitionView(location);
if (view == unbounded) {
return this;
}
return view;
} | [
"View",
"<",
"E",
">",
"viewForUri",
"(",
"URI",
"location",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"location",
",",
"\"Partition location cannot be null\"",
")",
";",
"PartitionView",
"<",
"E",
">",
"view",
"=",
"getPartitionView",
"(",
"location"... | needed to preserve the behavior of FileSystemDatasets | [
"needed",
"to",
"preserve",
"the",
"behavior",
"of",
"FileSystemDatasets"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemDataset.java#L180-L187 |
119,972 | kite-sdk/kite | kite-data/kite-data-hive/src/main/java/org/kitesdk/data/spi/hive/HiveAbstractMetadataProvider.java | HiveAbstractMetadataProvider.isExternal | protected boolean isExternal(String namespace, String name) {
String resolved = resolveNamespace(namespace, name);
if (resolved != null) {
return isExternal(getMetaStoreUtil().getTable(resolved, name));
}
return false;
} | java | protected boolean isExternal(String namespace, String name) {
String resolved = resolveNamespace(namespace, name);
if (resolved != null) {
return isExternal(getMetaStoreUtil().getTable(resolved, name));
}
return false;
} | [
"protected",
"boolean",
"isExternal",
"(",
"String",
"namespace",
",",
"String",
"name",
")",
"{",
"String",
"resolved",
"=",
"resolveNamespace",
"(",
"namespace",
",",
"name",
")",
";",
"if",
"(",
"resolved",
"!=",
"null",
")",
"{",
"return",
"isExternal",
... | Returns whether the table is a managed hive table.
@param name a Table name
@return true if the table is managed, false otherwise
@throws DatasetNotFoundException If the table does not exist in Hive | [
"Returns",
"whether",
"the",
"table",
"is",
"a",
"managed",
"hive",
"table",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hive/src/main/java/org/kitesdk/data/spi/hive/HiveAbstractMetadataProvider.java#L90-L96 |
119,973 | kite-sdk/kite | kite-data/kite-data-hive/src/main/java/org/kitesdk/data/spi/hive/HiveAbstractMetadataProvider.java | HiveAbstractMetadataProvider.isNamespace | private boolean isNamespace(String database) {
Collection<String> tables = getMetaStoreUtil().getAllTables(database);
for (String name : tables) {
if (isReadable(database, name)) {
return true;
}
}
return false;
} | java | private boolean isNamespace(String database) {
Collection<String> tables = getMetaStoreUtil().getAllTables(database);
for (String name : tables) {
if (isReadable(database, name)) {
return true;
}
}
return false;
} | [
"private",
"boolean",
"isNamespace",
"(",
"String",
"database",
")",
"{",
"Collection",
"<",
"String",
">",
"tables",
"=",
"getMetaStoreUtil",
"(",
")",
".",
"getAllTables",
"(",
"database",
")",
";",
"for",
"(",
"String",
"name",
":",
"tables",
")",
"{",
... | Returns true if there is at least one table in the give database that can
be read.
@param database a Hive database name
@return {@code true} if there is at least one readable table in database
@see {@link #isReadable(String, String)} | [
"Returns",
"true",
"if",
"there",
"is",
"at",
"least",
"one",
"table",
"in",
"the",
"give",
"database",
"that",
"can",
"be",
"read",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hive/src/main/java/org/kitesdk/data/spi/hive/HiveAbstractMetadataProvider.java#L199-L207 |
119,974 | kite-sdk/kite | kite-data/kite-data-hive/src/main/java/org/kitesdk/data/spi/hive/HiveAbstractMetadataProvider.java | HiveAbstractMetadataProvider.isReadable | private boolean isReadable(String namespace, String name) {
Table table = getMetaStoreUtil().getTable(namespace, name);
if (isManaged(table) || isExternal(table)) { // readable table types
try {
// get a descriptor for the table. if this succeeds, it is readable
HiveUtils.descriptorForTabl... | java | private boolean isReadable(String namespace, String name) {
Table table = getMetaStoreUtil().getTable(namespace, name);
if (isManaged(table) || isExternal(table)) { // readable table types
try {
// get a descriptor for the table. if this succeeds, it is readable
HiveUtils.descriptorForTabl... | [
"private",
"boolean",
"isReadable",
"(",
"String",
"namespace",
",",
"String",
"name",
")",
"{",
"Table",
"table",
"=",
"getMetaStoreUtil",
"(",
")",
".",
"getTable",
"(",
"namespace",
",",
"name",
")",
";",
"if",
"(",
"isManaged",
"(",
"table",
")",
"||... | Returns true if the given table exists and can be read by this library.
@param namespace a Hive database name
@param name a table name
@return {@code true} if the table exists and is supported | [
"Returns",
"true",
"if",
"the",
"given",
"table",
"exists",
"and",
"can",
"be",
"read",
"by",
"this",
"library",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hive/src/main/java/org/kitesdk/data/spi/hive/HiveAbstractMetadataProvider.java#L216-L234 |
119,975 | kite-sdk/kite | kite-data/kite-data-flume/src/main/java/org/apache/flume/clients/log4jappender/Log4jAppender.java | Log4jAppender.append | @Override
public synchronized void append(LoggingEvent event) throws FlumeException{
//If rpcClient is null, it means either this appender object was never
//setup by setting hostname and port and then calling activateOptions
//or this appender object was closed by calling close(), so we throw an
//ex... | java | @Override
public synchronized void append(LoggingEvent event) throws FlumeException{
//If rpcClient is null, it means either this appender object was never
//setup by setting hostname and port and then calling activateOptions
//or this appender object was closed by calling close(), so we throw an
//ex... | [
"@",
"Override",
"public",
"synchronized",
"void",
"append",
"(",
"LoggingEvent",
"event",
")",
"throws",
"FlumeException",
"{",
"//If rpcClient is null, it means either this appender object was never",
"//setup by setting hostname and port and then calling activateOptions",
"//or this... | Append the LoggingEvent, to send to the first Flume hop.
@param event The LoggingEvent to be appended to the flume.
@throws FlumeException if the appender was closed,
or the hostname and port were not setup, there was a timeout, or there
was a connection error. | [
"Append",
"the",
"LoggingEvent",
"to",
"send",
"to",
"the",
"first",
"Flume",
"hop",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-flume/src/main/java/org/apache/flume/clients/log4jappender/Log4jAppender.java#L109-L159 |
119,976 | kite-sdk/kite | kite-tools-parent/kite-tools/src/main/java/org/kitesdk/tools/JarFinder.java | JarFinder.getJar | public static String getJar(Class<?> klass) {
Preconditions.checkNotNull(klass, "klass");
ClassLoader loader = klass.getClassLoader();
if (loader != null) {
String class_file = klass.getName().replaceAll("\\.", "/") + ".class";
try {
for (Enumeration<?> itr = loader.getResources(class_fi... | java | public static String getJar(Class<?> klass) {
Preconditions.checkNotNull(klass, "klass");
ClassLoader loader = klass.getClassLoader();
if (loader != null) {
String class_file = klass.getName().replaceAll("\\.", "/") + ".class";
try {
for (Enumeration<?> itr = loader.getResources(class_fi... | [
"public",
"static",
"String",
"getJar",
"(",
"Class",
"<",
"?",
">",
"klass",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"klass",
",",
"\"klass\"",
")",
";",
"ClassLoader",
"loader",
"=",
"klass",
".",
"getClassLoader",
"(",
")",
";",
"if",
"("... | Returns the full path to the Jar containing the class. It always return a JAR.
@param klass
class.
@return path to the Jar containing the class. | [
"Returns",
"the",
"full",
"path",
"to",
"the",
"Jar",
"containing",
"the",
"class",
".",
"It",
"always",
"return",
"a",
"JAR",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-tools-parent/kite-tools/src/main/java/org/kitesdk/tools/JarFinder.java#L119-L158 |
119,977 | kite-sdk/kite | kite-morphlines/kite-morphlines-solr-core/src/main/java/org/kitesdk/morphline/solr/ZooKeeperDownloader.java | ZooKeeperDownloader.readConfigName | public String readConfigName(SolrZkClient zkClient, String collection)
throws KeeperException, InterruptedException {
if (collection == null) {
throw new IllegalArgumentException("collection must not be null");
}
String configName = null;
// first check for alias
byte[] aliasData = zkClient... | java | public String readConfigName(SolrZkClient zkClient, String collection)
throws KeeperException, InterruptedException {
if (collection == null) {
throw new IllegalArgumentException("collection must not be null");
}
String configName = null;
// first check for alias
byte[] aliasData = zkClient... | [
"public",
"String",
"readConfigName",
"(",
"SolrZkClient",
"zkClient",
",",
"String",
"collection",
")",
"throws",
"KeeperException",
",",
"InterruptedException",
"{",
"if",
"(",
"collection",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
... | Returns config value given collection name
Borrowed heavily from Solr's ZKController. | [
"Returns",
"config",
"value",
"given",
"collection",
"name",
"Borrowed",
"heavily",
"from",
"Solr",
"s",
"ZKController",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-solr-core/src/main/java/org/kitesdk/morphline/solr/ZooKeeperDownloader.java#L68-L105 |
119,978 | kite-sdk/kite | kite-morphlines/kite-morphlines-solr-core/src/main/java/org/kitesdk/morphline/solr/ZooKeeperDownloader.java | ZooKeeperDownloader.downloadConfigDir | public File downloadConfigDir(SolrZkClient zkClient, String configName, File dir)
throws IOException, InterruptedException, KeeperException {
Preconditions.checkArgument(dir.exists());
Preconditions.checkArgument(dir.isDirectory());
ZkConfigManager manager = new ZkConfigManager(zkClient);
manager.down... | java | public File downloadConfigDir(SolrZkClient zkClient, String configName, File dir)
throws IOException, InterruptedException, KeeperException {
Preconditions.checkArgument(dir.exists());
Preconditions.checkArgument(dir.isDirectory());
ZkConfigManager manager = new ZkConfigManager(zkClient);
manager.down... | [
"public",
"File",
"downloadConfigDir",
"(",
"SolrZkClient",
"zkClient",
",",
"String",
"configName",
",",
"File",
"dir",
")",
"throws",
"IOException",
",",
"InterruptedException",
",",
"KeeperException",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"dir",
".",
... | Download and return the config directory from ZK | [
"Download",
"and",
"return",
"the",
"config",
"directory",
"from",
"ZK"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-solr-core/src/main/java/org/kitesdk/morphline/solr/ZooKeeperDownloader.java#L110-L129 |
119,979 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Compatibility.java | Compatibility.check | public static void check(String namespace, String name, DatasetDescriptor descriptor) {
checkDatasetName(namespace, name);
checkDescriptor(descriptor);
} | java | public static void check(String namespace, String name, DatasetDescriptor descriptor) {
checkDatasetName(namespace, name);
checkDescriptor(descriptor);
} | [
"public",
"static",
"void",
"check",
"(",
"String",
"namespace",
",",
"String",
"name",
",",
"DatasetDescriptor",
"descriptor",
")",
"{",
"checkDatasetName",
"(",
"namespace",
",",
"name",
")",
";",
"checkDescriptor",
"(",
"descriptor",
")",
";",
"}"
] | Checks the name and descriptor for known compatibility issues and throws an
exception if an incompatibility is found.
If the column names are not compatible across components or if any
partition name duplicates its source field name, this will cause an error.
@param namespace a String namespace
@param name a String d... | [
"Checks",
"the",
"name",
"and",
"descriptor",
"for",
"known",
"compatibility",
"issues",
"and",
"throws",
"an",
"exception",
"if",
"an",
"incompatibility",
"is",
"found",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Compatibility.java#L67-L70 |
119,980 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Compatibility.java | Compatibility.checkAndWarn | public static void checkAndWarn(String namespace, String datasetName, Schema schema) {
try {
checkDatasetName(namespace, datasetName);
checkSchema(schema);
} catch (IllegalArgumentException e) {
LOG.warn(e.getMessage());
} catch (IllegalStateException e) {
LOG.warn(e.getMessage());
... | java | public static void checkAndWarn(String namespace, String datasetName, Schema schema) {
try {
checkDatasetName(namespace, datasetName);
checkSchema(schema);
} catch (IllegalArgumentException e) {
LOG.warn(e.getMessage());
} catch (IllegalStateException e) {
LOG.warn(e.getMessage());
... | [
"public",
"static",
"void",
"checkAndWarn",
"(",
"String",
"namespace",
",",
"String",
"datasetName",
",",
"Schema",
"schema",
")",
"{",
"try",
"{",
"checkDatasetName",
"(",
"namespace",
",",
"datasetName",
")",
";",
"checkSchema",
"(",
"schema",
")",
";",
"... | Checks the name and schema for known compatibility issues and warns.
If the column names are not compatible across components, this will warn
the user.
@param namespace a String namespace
@param datasetName a String dataset name
@param schema a {@link Schema} | [
"Checks",
"the",
"name",
"and",
"schema",
"for",
"known",
"compatibility",
"issues",
"and",
"warns",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Compatibility.java#L82-L91 |
119,981 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Compatibility.java | Compatibility.checkDatasetName | public static void checkDatasetName(String namespace, String name) {
Preconditions.checkNotNull(namespace, "Namespace cannot be null");
Preconditions.checkNotNull(name, "Dataset name cannot be null");
ValidationException.check(Compatibility.isCompatibleName(namespace),
"Namespace %s is not alphanume... | java | public static void checkDatasetName(String namespace, String name) {
Preconditions.checkNotNull(namespace, "Namespace cannot be null");
Preconditions.checkNotNull(name, "Dataset name cannot be null");
ValidationException.check(Compatibility.isCompatibleName(namespace),
"Namespace %s is not alphanume... | [
"public",
"static",
"void",
"checkDatasetName",
"(",
"String",
"namespace",
",",
"String",
"name",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"namespace",
",",
"\"Namespace cannot be null\"",
")",
";",
"Preconditions",
".",
"checkNotNull",
"(",
"name",
"... | Precondition-style validation that a dataset name is compatible.
@param namespace a String namespace
@param name a String name | [
"Precondition",
"-",
"style",
"validation",
"that",
"a",
"dataset",
"name",
"is",
"compatible",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Compatibility.java#L99-L108 |
119,982 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Compatibility.java | Compatibility.checkDescriptor | public static void checkDescriptor(DatasetDescriptor descriptor) {
Preconditions.checkNotNull(descriptor, "Descriptor cannot be null");
Schema schema = descriptor.getSchema();
checkSchema(schema);
if (descriptor.isPartitioned()) {
// marked as [BUG] because this is checked in DatasetDescriptor
... | java | public static void checkDescriptor(DatasetDescriptor descriptor) {
Preconditions.checkNotNull(descriptor, "Descriptor cannot be null");
Schema schema = descriptor.getSchema();
checkSchema(schema);
if (descriptor.isPartitioned()) {
// marked as [BUG] because this is checked in DatasetDescriptor
... | [
"public",
"static",
"void",
"checkDescriptor",
"(",
"DatasetDescriptor",
"descriptor",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"descriptor",
",",
"\"Descriptor cannot be null\"",
")",
";",
"Schema",
"schema",
"=",
"descriptor",
".",
"getSchema",
"(",
")... | Precondition-style validation that the DatasetDescriptor is compatible.
@param descriptor a {@link DatasetDescriptor} | [
"Precondition",
"-",
"style",
"validation",
"that",
"the",
"DatasetDescriptor",
"is",
"compatible",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Compatibility.java#L128-L164 |
119,983 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Compatibility.java | Compatibility.getIncompatibleNames | private static List<String> getIncompatibleNames(Schema schema) {
NameValidation validation = new NameValidation();
SchemaUtil.visit(schema, validation);
return validation.getIncompatibleNames();
} | java | private static List<String> getIncompatibleNames(Schema schema) {
NameValidation validation = new NameValidation();
SchemaUtil.visit(schema, validation);
return validation.getIncompatibleNames();
} | [
"private",
"static",
"List",
"<",
"String",
">",
"getIncompatibleNames",
"(",
"Schema",
"schema",
")",
"{",
"NameValidation",
"validation",
"=",
"new",
"NameValidation",
"(",
")",
";",
"SchemaUtil",
".",
"visit",
"(",
"schema",
",",
"validation",
")",
";",
"... | Returns a list of field names from the schema that contain characters that
are known to be incompatible with some projects, such as Hive or HBase.
@param schema a {@link org.apache.avro.Schema} to check
@return a {@link java.util.List} of incompatible field names | [
"Returns",
"a",
"list",
"of",
"field",
"names",
"from",
"the",
"schema",
"that",
"contain",
"characters",
"that",
"are",
"known",
"to",
"be",
"incompatible",
"with",
"some",
"projects",
"such",
"as",
"Hive",
"or",
"HBase",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Compatibility.java#L184-L188 |
119,984 | kite-sdk/kite | kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/api/Record.java | Record.copy | public Record copy() {
//return new Record(ArrayListMultimap.create(fields)); // adding fields later causes (slow) rehashing
ArrayListMultimap<String,Object> copy = ArrayListMultimap.create(fields.size() + 16, 10);
copy.putAll(fields);
return new Record(copy);
} | java | public Record copy() {
//return new Record(ArrayListMultimap.create(fields)); // adding fields later causes (slow) rehashing
ArrayListMultimap<String,Object> copy = ArrayListMultimap.create(fields.size() + 16, 10);
copy.putAll(fields);
return new Record(copy);
} | [
"public",
"Record",
"copy",
"(",
")",
"{",
"//return new Record(ArrayListMultimap.create(fields)); // adding fields later causes (slow) rehashing",
"ArrayListMultimap",
"<",
"String",
",",
"Object",
">",
"copy",
"=",
"ArrayListMultimap",
".",
"create",
"(",
"fields",
".",
"... | Returns a shallow copy of this record. | [
"Returns",
"a",
"shallow",
"copy",
"of",
"this",
"record",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/api/Record.java#L50-L55 |
119,985 | kite-sdk/kite | kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/api/Record.java | Record.getFirstValue | public Object getFirstValue(String key) {
List values = fields.get(key);
return values.size() > 0 ? values.get(0) : null;
} | java | public Object getFirstValue(String key) {
List values = fields.get(key);
return values.size() > 0 ? values.get(0) : null;
} | [
"public",
"Object",
"getFirstValue",
"(",
"String",
"key",
")",
"{",
"List",
"values",
"=",
"fields",
".",
"get",
"(",
"key",
")",
";",
"return",
"values",
".",
"size",
"(",
")",
">",
"0",
"?",
"values",
".",
"get",
"(",
"0",
")",
":",
"null",
";... | Returns the first value associated with the given key, or null if no such value exists | [
"Returns",
"the",
"first",
"value",
"associated",
"with",
"the",
"given",
"key",
"or",
"null",
"if",
"no",
"such",
"value",
"exists"
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/api/Record.java#L76-L79 |
119,986 | kite-sdk/kite | kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/api/Record.java | Record.replaceValues | public void replaceValues(String key, Object value) {
// fields.replaceValues(key, Collections.singletonList(value)); // unnecessarily slow
List<Object> list = fields.get(key);
list.clear();
list.add(value);
} | java | public void replaceValues(String key, Object value) {
// fields.replaceValues(key, Collections.singletonList(value)); // unnecessarily slow
List<Object> list = fields.get(key);
list.clear();
list.add(value);
} | [
"public",
"void",
"replaceValues",
"(",
"String",
"key",
",",
"Object",
"value",
")",
"{",
"// fields.replaceValues(key, Collections.singletonList(value)); // unnecessarily slow",
"List",
"<",
"Object",
">",
"list",
"=",
"fields",
".",
"get",
"(",
"key",
")",
";",
... | Removes all values that are associated with the given key, and then associates the given value
with the given key. | [
"Removes",
"all",
"values",
"that",
"are",
"associated",
"with",
"the",
"given",
"key",
"and",
"then",
"associates",
"the",
"given",
"value",
"with",
"the",
"given",
"key",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/api/Record.java#L85-L90 |
119,987 | kite-sdk/kite | kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/api/Record.java | Record.putIfAbsent | public void putIfAbsent(String key, Object value) {
if (!fields.containsEntry(key, value)) {
fields.put(key, value);
}
} | java | public void putIfAbsent(String key, Object value) {
if (!fields.containsEntry(key, value)) {
fields.put(key, value);
}
} | [
"public",
"void",
"putIfAbsent",
"(",
"String",
"key",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"!",
"fields",
".",
"containsEntry",
"(",
"key",
",",
"value",
")",
")",
"{",
"fields",
".",
"put",
"(",
"key",
",",
"value",
")",
";",
"}",
"}"
] | Adds the given value to the values currently associated with the given key, iff the key isn't
already associated with that same value. | [
"Adds",
"the",
"given",
"value",
"to",
"the",
"values",
"currently",
"associated",
"with",
"the",
"given",
"key",
"iff",
"the",
"key",
"isn",
"t",
"already",
"associated",
"with",
"that",
"same",
"value",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/api/Record.java#L102-L106 |
119,988 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/URIBuilder.java | URIBuilder.build | public static URI build(String repoUri, String namespace, String dataset) {
return build(URI.create(repoUri), namespace, dataset);
} | java | public static URI build(String repoUri, String namespace, String dataset) {
return build(URI.create(repoUri), namespace, dataset);
} | [
"public",
"static",
"URI",
"build",
"(",
"String",
"repoUri",
",",
"String",
"namespace",
",",
"String",
"dataset",
")",
"{",
"return",
"build",
"(",
"URI",
".",
"create",
"(",
"repoUri",
")",
",",
"namespace",
",",
"dataset",
")",
";",
"}"
] | Builds a dataset URI from the given repository URI string, namespace, and
dataset name.
@param repoUri a repository URI string
@param namespace a String namespace
@param dataset a String dataset name
@return a dataset URI for the namespace and dataset name in the repository
@since 0.17.0 | [
"Builds",
"a",
"dataset",
"URI",
"from",
"the",
"given",
"repository",
"URI",
"string",
"namespace",
"and",
"dataset",
"name",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/URIBuilder.java#L55-L57 |
119,989 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/URIBuilder.java | URIBuilder.build | public static URI build(URI repoUri, String namespace, String dataset) {
return new URIBuilder(repoUri, namespace, dataset).build();
} | java | public static URI build(URI repoUri, String namespace, String dataset) {
return new URIBuilder(repoUri, namespace, dataset).build();
} | [
"public",
"static",
"URI",
"build",
"(",
"URI",
"repoUri",
",",
"String",
"namespace",
",",
"String",
"dataset",
")",
"{",
"return",
"new",
"URIBuilder",
"(",
"repoUri",
",",
"namespace",
",",
"dataset",
")",
".",
"build",
"(",
")",
";",
"}"
] | Builds a dataset URI from the given repository URI, namespace, and dataset
name.
@param repoUri a repository URI
@param namespace a String namespace
@param dataset a String dataset name
@return a dataset URI for the namespace and dataset name in the repository
@since 0.17.0 | [
"Builds",
"a",
"dataset",
"URI",
"from",
"the",
"given",
"repository",
"URI",
"namespace",
"and",
"dataset",
"name",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/URIBuilder.java#L70-L72 |
119,990 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/SchemaUtil.java | SchemaUtil.isConsistentWithExpectedType | public static boolean isConsistentWithExpectedType(Schema.Type type,
Class<?> expectedClass) {
Class<?> typeClass = TYPE_TO_CLASS.get(type);
return typeClass != null && expectedClass.isAssignableFrom(typeClass);
} | java | public static boolean isConsistentWithExpectedType(Schema.Type type,
Class<?> expectedClass) {
Class<?> typeClass = TYPE_TO_CLASS.get(type);
return typeClass != null && expectedClass.isAssignableFrom(typeClass);
} | [
"public",
"static",
"boolean",
"isConsistentWithExpectedType",
"(",
"Schema",
".",
"Type",
"type",
",",
"Class",
"<",
"?",
">",
"expectedClass",
")",
"{",
"Class",
"<",
"?",
">",
"typeClass",
"=",
"TYPE_TO_CLASS",
".",
"get",
"(",
"type",
")",
";",
"return... | Checks that a schema type should produce an object of the expected class.
This check uses {@link Class#isAssignableFrom(Class)}.
@param type an avro Schema.Type
@param expectedClass a java class
@return {@code true} if the type produces objects assignable to the class,
{@code false} if the class is not assignable fro... | [
"Checks",
"that",
"a",
"schema",
"type",
"should",
"produce",
"an",
"object",
"of",
"the",
"expected",
"class",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/SchemaUtil.java#L107-L111 |
119,991 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/SchemaUtil.java | SchemaUtil.partitionFieldSchema | public static Schema partitionFieldSchema(FieldPartitioner<?, ?> fp, Schema schema) {
if (fp instanceof IdentityFieldPartitioner) {
// copy the schema directly from the entity to preserve annotations
return fieldSchema(schema, fp.getSourceName());
} else {
Class<?> fieldType = getPartitionType... | java | public static Schema partitionFieldSchema(FieldPartitioner<?, ?> fp, Schema schema) {
if (fp instanceof IdentityFieldPartitioner) {
// copy the schema directly from the entity to preserve annotations
return fieldSchema(schema, fp.getSourceName());
} else {
Class<?> fieldType = getPartitionType... | [
"public",
"static",
"Schema",
"partitionFieldSchema",
"(",
"FieldPartitioner",
"<",
"?",
",",
"?",
">",
"fp",
",",
"Schema",
"schema",
")",
"{",
"if",
"(",
"fp",
"instanceof",
"IdentityFieldPartitioner",
")",
"{",
"// copy the schema directly from the entity to preser... | Builds a Schema for the FieldPartitioner using the given Schema to
determine types not fixed by the FieldPartitioner.
@param fp a FieldPartitioner
@param schema an entity Schema that will be partitioned
@return a Schema for the field partitioner | [
"Builds",
"a",
"Schema",
"for",
"the",
"FieldPartitioner",
"using",
"the",
"given",
"Schema",
"to",
"determine",
"types",
"not",
"fixed",
"by",
"the",
"FieldPartitioner",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/SchemaUtil.java#L165-L184 |
119,992 | kite-sdk/kite | kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/SchemaUtil.java | SchemaUtil.partitionField | private static Schema.Field partitionField(FieldPartitioner<?, ?> fp,
Schema schema) {
return new Schema.Field(
fp.getName(), partitionFieldSchema(fp, schema), null, null);
} | java | private static Schema.Field partitionField(FieldPartitioner<?, ?> fp,
Schema schema) {
return new Schema.Field(
fp.getName(), partitionFieldSchema(fp, schema), null, null);
} | [
"private",
"static",
"Schema",
".",
"Field",
"partitionField",
"(",
"FieldPartitioner",
"<",
"?",
",",
"?",
">",
"fp",
",",
"Schema",
"schema",
")",
"{",
"return",
"new",
"Schema",
".",
"Field",
"(",
"fp",
".",
"getName",
"(",
")",
",",
"partitionFieldSc... | Builds a Schema.Field for the FieldPartitioner using the Schema to
determine types not fixed by the FieldPartitioner.
@param fp a FieldPartitioner
@param schema an entity Schema that will be partitioned
@return a Schema.Field for the field partitioner, with the same name | [
"Builds",
"a",
"Schema",
".",
"Field",
"for",
"the",
"FieldPartitioner",
"using",
"the",
"Schema",
"to",
"determine",
"types",
"not",
"fixed",
"by",
"the",
"FieldPartitioner",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/SchemaUtil.java#L291-L295 |
119,993 | kite-sdk/kite | kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/stdio/MediaType.java | MediaType.set | public static Set<MediaType> set(MediaType... types) {
Set<MediaType> set = new HashSet<MediaType>();
for (MediaType type : types) {
if (type != null) {
set.add(type);
}
}
return Collections.unmodifiableSet(set);
} | java | public static Set<MediaType> set(MediaType... types) {
Set<MediaType> set = new HashSet<MediaType>();
for (MediaType type : types) {
if (type != null) {
set.add(type);
}
}
return Collections.unmodifiableSet(set);
} | [
"public",
"static",
"Set",
"<",
"MediaType",
">",
"set",
"(",
"MediaType",
"...",
"types",
")",
"{",
"Set",
"<",
"MediaType",
">",
"set",
"=",
"new",
"HashSet",
"<",
"MediaType",
">",
"(",
")",
";",
"for",
"(",
"MediaType",
"type",
":",
"types",
")",... | Convenience method that returns an unmodifiable set that contains
all the given media types.
@since Apache Tika 1.2
@param types media types
@return unmodifiable set of the given types | [
"Convenience",
"method",
"that",
"returns",
"an",
"unmodifiable",
"set",
"that",
"contains",
"all",
"the",
"given",
"media",
"types",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/stdio/MediaType.java#L111-L119 |
119,994 | kite-sdk/kite | kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/stdio/MediaType.java | MediaType.set | public static Set<MediaType> set(String... types) {
Set<MediaType> set = new HashSet<MediaType>();
for (String type : types) {
MediaType mt = parse(type);
if (mt != null) {
set.add(mt);
}
}
return Collections.unmodifiableSet(set);
} | java | public static Set<MediaType> set(String... types) {
Set<MediaType> set = new HashSet<MediaType>();
for (String type : types) {
MediaType mt = parse(type);
if (mt != null) {
set.add(mt);
}
}
return Collections.unmodifiableSet(set);
} | [
"public",
"static",
"Set",
"<",
"MediaType",
">",
"set",
"(",
"String",
"...",
"types",
")",
"{",
"Set",
"<",
"MediaType",
">",
"set",
"=",
"new",
"HashSet",
"<",
"MediaType",
">",
"(",
")",
";",
"for",
"(",
"String",
"type",
":",
"types",
")",
"{"... | Convenience method that parses the given media type strings and
returns an unmodifiable set that contains all the parsed types.
@since Apache Tika 1.2
@param types media type strings
@return unmodifiable set of the parsed types | [
"Convenience",
"method",
"that",
"parses",
"the",
"given",
"media",
"type",
"strings",
"and",
"returns",
"an",
"unmodifiable",
"set",
"that",
"contains",
"all",
"the",
"parsed",
"types",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/stdio/MediaType.java#L129-L138 |
119,995 | kite-sdk/kite | kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/stdio/MediaType.java | MediaType.unquote | private static String unquote(String s) {
while (s.startsWith("\"") || s.startsWith("'")) {
s = s.substring(1);
}
while (s.endsWith("\"") || s.endsWith("'")) {
s = s.substring(0, s.length() - 1);
}
return s;
} | java | private static String unquote(String s) {
while (s.startsWith("\"") || s.startsWith("'")) {
s = s.substring(1);
}
while (s.endsWith("\"") || s.endsWith("'")) {
s = s.substring(0, s.length() - 1);
}
return s;
} | [
"private",
"static",
"String",
"unquote",
"(",
"String",
"s",
")",
"{",
"while",
"(",
"s",
".",
"startsWith",
"(",
"\"\\\"\"",
")",
"||",
"s",
".",
"startsWith",
"(",
"\"'\"",
")",
")",
"{",
"s",
"=",
"s",
".",
"substring",
"(",
"1",
")",
";",
"}... | Fuzzy unquoting mechanism that works also with somewhat malformed
quotes.
@param s string to unquote
@return unquoted string | [
"Fuzzy",
"unquoting",
"mechanism",
"that",
"works",
"also",
"with",
"somewhat",
"malformed",
"quotes",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/stdio/MediaType.java#L244-L252 |
119,996 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroUtils.java | AvroUtils.readAvroEntity | public static <T> T readAvroEntity(byte[] bytes, DatumReader<T> reader) {
Decoder decoder = new DecoderFactory().binaryDecoder(bytes, null);
return AvroUtils.<T> readAvroEntity(decoder, reader);
} | java | public static <T> T readAvroEntity(byte[] bytes, DatumReader<T> reader) {
Decoder decoder = new DecoderFactory().binaryDecoder(bytes, null);
return AvroUtils.<T> readAvroEntity(decoder, reader);
} | [
"public",
"static",
"<",
"T",
">",
"T",
"readAvroEntity",
"(",
"byte",
"[",
"]",
"bytes",
",",
"DatumReader",
"<",
"T",
">",
"reader",
")",
"{",
"Decoder",
"decoder",
"=",
"new",
"DecoderFactory",
"(",
")",
".",
"binaryDecoder",
"(",
"bytes",
",",
"nul... | Given a byte array and a DatumReader, decode an avro entity from the byte
array. Decodes using the avro BinaryDecoder. Return the constructed entity.
@param bytes
The byte array to decode the entity from.
@param reader
The DatumReader that will decode the byte array.
@return The Avro entity. | [
"Given",
"a",
"byte",
"array",
"and",
"a",
"DatumReader",
"decode",
"an",
"avro",
"entity",
"from",
"the",
"byte",
"array",
".",
"Decodes",
"using",
"the",
"avro",
"BinaryDecoder",
".",
"Return",
"the",
"constructed",
"entity",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroUtils.java#L65-L68 |
119,997 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroUtils.java | AvroUtils.readAvroEntity | public static <T> T readAvroEntity(Decoder decoder, DatumReader<T> reader) {
try {
return reader.read(null, decoder);
} catch (IOException e) {
throw new SerializationException("Could not deserialize Avro entity", e);
}
} | java | public static <T> T readAvroEntity(Decoder decoder, DatumReader<T> reader) {
try {
return reader.read(null, decoder);
} catch (IOException e) {
throw new SerializationException("Could not deserialize Avro entity", e);
}
} | [
"public",
"static",
"<",
"T",
">",
"T",
"readAvroEntity",
"(",
"Decoder",
"decoder",
",",
"DatumReader",
"<",
"T",
">",
"reader",
")",
"{",
"try",
"{",
"return",
"reader",
".",
"read",
"(",
"null",
",",
"decoder",
")",
";",
"}",
"catch",
"(",
"IOExce... | Decode an entity from the initialized Avro Decoder using the DatumReader.
@param decoder
The decoder to decode the entity fields
@param reader
The Avro DatumReader that will read the entity with the decoder.
@return The entity. | [
"Decode",
"an",
"entity",
"from",
"the",
"initialized",
"Avro",
"Decoder",
"using",
"the",
"DatumReader",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroUtils.java#L79-L85 |
119,998 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroUtils.java | AvroUtils.writeAvroEntity | public static <T> byte[] writeAvroEntity(T entity, DatumWriter<T> writer) {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
Encoder encoder = new EncoderFactory().binaryEncoder(outputStream, null);
writeAvroEntity(entity, encoder, writer);
return outputStream.toByteArray();
} | java | public static <T> byte[] writeAvroEntity(T entity, DatumWriter<T> writer) {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
Encoder encoder = new EncoderFactory().binaryEncoder(outputStream, null);
writeAvroEntity(entity, encoder, writer);
return outputStream.toByteArray();
} | [
"public",
"static",
"<",
"T",
">",
"byte",
"[",
"]",
"writeAvroEntity",
"(",
"T",
"entity",
",",
"DatumWriter",
"<",
"T",
">",
"writer",
")",
"{",
"ByteArrayOutputStream",
"outputStream",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"Encoder",
"encode... | Given an entity and a DatumReader, encode the avro entity to a byte array.
Encodes using the avro BinaryEncoder. Return the serialized bytes.
@param entity
The entity we want to encode.
@param writer
The DatumWriter we'll use to encode the entity to a byte array
@return The avro entity encoded in a byte array. | [
"Given",
"an",
"entity",
"and",
"a",
"DatumReader",
"encode",
"the",
"avro",
"entity",
"to",
"a",
"byte",
"array",
".",
"Encodes",
"using",
"the",
"avro",
"BinaryEncoder",
".",
"Return",
"the",
"serialized",
"bytes",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroUtils.java#L97-L102 |
119,999 | kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroUtils.java | AvroUtils.writeAvroEntity | public static <T> void writeAvroEntity(T entity, Encoder encoder,
DatumWriter<T> writer) {
try {
writer.write(entity, encoder);
encoder.flush();
} catch (IOException e) {
throw new SerializationException("Could not serialize Avro entity", e);
}
} | java | public static <T> void writeAvroEntity(T entity, Encoder encoder,
DatumWriter<T> writer) {
try {
writer.write(entity, encoder);
encoder.flush();
} catch (IOException e) {
throw new SerializationException("Could not serialize Avro entity", e);
}
} | [
"public",
"static",
"<",
"T",
">",
"void",
"writeAvroEntity",
"(",
"T",
"entity",
",",
"Encoder",
"encoder",
",",
"DatumWriter",
"<",
"T",
">",
"writer",
")",
"{",
"try",
"{",
"writer",
".",
"write",
"(",
"entity",
",",
"encoder",
")",
";",
"encoder",
... | Given an entity, an avro schema, and an encoder, write the entity to the
encoder's underlying output stream.
@param entity
The entity we want to encode.
@param encoder
The Avro Encoder we will write to.
@param writer
The DatumWriter we'll use to encode the entity to the encoder. | [
"Given",
"an",
"entity",
"an",
"avro",
"schema",
"and",
"an",
"encoder",
"write",
"the",
"entity",
"to",
"the",
"encoder",
"s",
"underlying",
"output",
"stream",
"."
] | 72bfb4b1a881af85808cd7f14bc3e15160a1e811 | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroUtils.java#L115-L123 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.