Skip to content

Commit

Permalink
Merge pull request #81 from linkedin/avro-hi-2
Browse files Browse the repository at this point in the history
fix compatibility issues for avro 1.9.2 upgrade
  • Loading branch information
booddu authored Dec 6, 2022
2 parents cd1177a + 6be5fbb commit 2b4b5f1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// See LICENSE in the project root for license information.

buildscript {
ext.avroVersion = '1.8.1'
ext.avroVersion = '1.9.2'
ext.awsVersion = '2.10.15'
ext.findBugsVersion = '3.0.0'
ext.gobblinVersion = '0.17.0-dev-174'
ext.gobblinVersion = '0.17.0-dev-303'
ext.hadoopVersion = '2.3.0'
ext.hiveVersion = '1.0.1'
ext.javaVersion = JavaVersion.VERSION_1_8
Expand Down
1 change: 1 addition & 0 deletions cdi-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jacocoTestReport {
apply from: "$rootDir/gradle/java-publishing.gradle"

dependencies {
compile externalDependency.'avro'
compile externalDependency.'gson'
compile externalDependency.'gobblin-core'
compile externalDependency.'gobblin-core-base'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,13 @@ static List<String> getSchemaFieldNames(Schema schema) {
* @return copy of schema field
*/
static Schema.Field deepCopySchemaField(Schema.Field field) {
Schema.Field f = new Schema.Field(field.name(), field.schema(), field.doc(), field.defaultVal(), field.order());
field.getProps().forEach(f::addProp);
return f;
Schema.Field f = new Schema.Field(field.name(), field.schema(), field.doc(), field.defaultVal(), field.order());
field.getObjectProps().forEach(
(propName, propValue) -> {
if (propValue instanceof String) f.addProp(propName, (String) propValue);
}
);
return f;
}

/**
Expand Down

0 comments on commit 2b4b5f1

Please sign in to comment.