-
-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added sub-projects cascading-nested and cascading-nested-json providi…
…ng base support for nested data types and direct support for JSON data processing.
- Loading branch information
Showing
41 changed files
with
3,833 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright (c) 2016-2017 Chris K Wensel. All Rights Reserved. | ||
* | ||
* Project and contact information: http://www.cascading.org/ | ||
* | ||
* This file is part of the Cascading project. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
ext.jacksonDatabindVersion = '2.8.7' | ||
ext.jacksonDatatypeGuavaVersion = jacksonDatabindVersion | ||
ext.jacksonDataFormatsVersion = jacksonDatabindVersion | ||
|
||
dependencies { | ||
compile project( ':cascading-core' ) | ||
compile project( ':cascading-nested' ) | ||
|
||
compile group: 'io.heretical', name: 'pointer-path-json', version: '1.0.0-wip-8' | ||
|
||
provided group: 'org.slf4j', name: 'slf4j-api', version: '1.7.5' | ||
|
||
testCompile project( path: ':cascading-core', configuration: 'testArtifacts' ) | ||
} | ||
|
||
javadoc { | ||
configure( options ) { | ||
links << "http://${rootProject.s3UploadDocs.destination}javadoc/cascading-core".toString() | ||
|
||
// linksOffline( '../../../cascading-core', "http://${rootProject.s3UploadDocs.destination}javadoc/cascading-core".toString() ) | ||
} | ||
} | ||
|
||
platformTest.enabled = false |
55 changes: 55 additions & 0 deletions
55
cascading-nested-json/src/main/java/cascading/nested/json/JSONBuildAsAggregator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright (c) 2016-2017 Chris K Wensel. All Rights Reserved. | ||
* | ||
* Project and contact information: http://www.cascading.org/ | ||
* | ||
* This file is part of the Cascading project. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package cascading.nested.json; | ||
|
||
import java.beans.ConstructorProperties; | ||
|
||
import cascading.nested.core.BuildSpec; | ||
import cascading.nested.core.NestedBaseBuildAggregator; | ||
import cascading.tuple.Fields; | ||
import com.fasterxml.jackson.databind.JsonNode; | ||
import com.fasterxml.jackson.databind.node.ArrayNode; | ||
|
||
/** | ||
* Class JSONBuildAsAggregator provides for the ability to create new JSON objects from aggregated tuple values. | ||
* | ||
* @see NestedBaseBuildAggregator for more details. | ||
*/ | ||
public class JSONBuildAsAggregator extends NestedBaseBuildAggregator<JsonNode, ArrayNode> | ||
{ | ||
/** | ||
* Constructor JSONBuildAsAggregator creates a new JSONBuildAsAggregator instance. | ||
* | ||
* @param fieldDeclaration of Fields | ||
* @param buildSpecs of BuildSpec... | ||
*/ | ||
@ConstructorProperties({"fieldDeclaration", "buildSpecs"}) | ||
public JSONBuildAsAggregator( Fields fieldDeclaration, BuildSpec... buildSpecs ) | ||
{ | ||
super( JSONCoercibleType.TYPE, fieldDeclaration, buildSpecs ); | ||
} | ||
|
||
@Override | ||
protected boolean isInto() | ||
{ | ||
return false; | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
cascading-nested-json/src/main/java/cascading/nested/json/JSONBuildAsFunction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Copyright (c) 2016-2017 Chris K Wensel. All Rights Reserved. | ||
* | ||
* Project and contact information: http://www.cascading.org/ | ||
* | ||
* This file is part of the Cascading project. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package cascading.nested.json; | ||
|
||
import java.beans.ConstructorProperties; | ||
|
||
import cascading.nested.core.BuildSpec; | ||
import cascading.nested.core.NestedBaseBuildFunction; | ||
import cascading.tuple.Fields; | ||
import com.fasterxml.jackson.databind.JsonNode; | ||
import com.fasterxml.jackson.databind.node.ArrayNode; | ||
|
||
/** | ||
* Class JSONBuildAsFunction provides for the ability to create new JSON objects from streamed tuple values. | ||
* | ||
* @see NestedBaseBuildFunction for more details. | ||
*/ | ||
public class JSONBuildAsFunction extends NestedBaseBuildFunction<JsonNode, ArrayNode> | ||
{ | ||
/** | ||
* Constructor JSONBuildAsFunction creates a new JSONBuildAsFunction instance. | ||
* | ||
* @param fieldDeclaration of Fields | ||
* @param buildSpecs of BuildSpec... | ||
*/ | ||
@ConstructorProperties({"fieldDeclaration", "buildSpecs"}) | ||
public JSONBuildAsFunction( Fields fieldDeclaration, BuildSpec... buildSpecs ) | ||
{ | ||
super( JSONCoercibleType.TYPE, fieldDeclaration, buildSpecs ); | ||
} | ||
|
||
/** | ||
* Method isInto returns the into of this JSONBuildAsFunction object. | ||
* | ||
* @return the into (type boolean) of this JSONBuildAsFunction object. | ||
*/ | ||
@Override | ||
protected boolean isInto() | ||
{ | ||
return false; | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
cascading-nested-json/src/main/java/cascading/nested/json/JSONBuildIntoFunction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright (c) 2016-2017 Chris K Wensel. All Rights Reserved. | ||
* | ||
* Project and contact information: http://www.cascading.org/ | ||
* | ||
* This file is part of the Cascading project. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package cascading.nested.json; | ||
|
||
import java.beans.ConstructorProperties; | ||
|
||
import cascading.nested.core.BuildSpec; | ||
import cascading.nested.core.NestedBaseBuildFunction; | ||
import cascading.tuple.Fields; | ||
import com.fasterxml.jackson.databind.JsonNode; | ||
import com.fasterxml.jackson.databind.node.ArrayNode; | ||
|
||
/** | ||
* Class JSONBuildIntoFunction provides for the ability to update existing JSON objects from streamed tuple values. | ||
* | ||
* @see NestedBaseBuildFunction for more details. | ||
*/ | ||
public class JSONBuildIntoFunction extends NestedBaseBuildFunction<JsonNode, ArrayNode> | ||
{ | ||
/** | ||
* Constructor JSONBuildIntoFunction creates a new JSONBuildIntoFunction instance. | ||
* | ||
* @param fieldDeclaration of Fields | ||
* @param buildSpecs of BuildSpec... | ||
*/ | ||
@ConstructorProperties({"fieldDeclaration", "buildSpecs"}) | ||
public JSONBuildIntoFunction( Fields fieldDeclaration, BuildSpec... buildSpecs ) | ||
{ | ||
super( JSONCoercibleType.TYPE, fieldDeclaration, buildSpecs ); | ||
} | ||
|
||
@Override | ||
protected boolean isInto() | ||
{ | ||
return true; | ||
} | ||
} |
Oops, something went wrong.