You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by akashrn5 <gi...@git.apache.org> on 2018/10/26 14:07:12 UTC
[GitHub] carbondata pull request #2861: [HOTFIX]handle passing spark appname for part...
GitHub user akashrn5 opened a pull request:
https://github.com/apache/carbondata/pull/2861
[HOTFIX]handle passing spark appname for partition table and file format
Dataload with partion table file format fails, as the appname is not in carbonproperties in executor.
This PR sets the spark appname in carbon properties which will be written to carbondata footer.
Be sure to do all of the following checklist to help us incorporate
your contribution quickly and easily:
- [ ] Any interfaces changed?
- [ ] Any backward compatibility impacted?
- [ ] Document update required?
- [ ] Testing done
Please provide details on
- Whether new unit test cases have been added or why no new tests are required?
- How it is tested? Please attach test report.
- Is it a performance related change? Please attach the performance test report.
- Any additional information to help reviewers in testing this change.
- [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/akashrn5/incubator-carbondata written
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/carbondata/pull/2861.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2861
----
commit 92a97277a96453e321a120eec2e1dc0b6d327c17
Author: akashrn5 <ak...@...>
Date: 2018-10-26T14:04:04Z
handle passing spark appname for partition table and file format
----
---
[GitHub] carbondata issue #2861: [HOTFIX]handle passing spark appname for partition t...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Failed with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9328/
---
[GitHub] carbondata issue #2861: [HOTFIX]handle passing spark appname for partition t...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/1270/
---
[GitHub] carbondata issue #2861: [HOTFIX]handle passing spark appname for partition t...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/1315/
---
[GitHub] carbondata issue #2861: [HOTFIX]handle passing spark appname for partition t...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1053/
---
[GitHub] carbondata pull request #2861: [CARBONDATA-3025]handle passing spark appname...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/carbondata/pull/2861
---
[GitHub] carbondata issue #2861: [CARBONDATA-3025]handle passing spark appname for pa...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/1367/
---
[GitHub] carbondata issue #2861: [HOTFIX]handle passing spark appname for partition t...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/1276/
---
[GitHub] carbondata issue #2861: [HOTFIX]handle passing spark appname for partition t...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/1299/
---
[GitHub] carbondata issue #2861: [CARBONDATA-3025]handle passing spark appname for pa...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1164/
---
[GitHub] carbondata issue #2861: [HOTFIX]handle passing spark appname for partition t...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Failed with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9351/
---
[GitHub] carbondata issue #2861: [CARBONDATA-3025]handle passing spark appname for pa...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on the issue:
https://github.com/apache/carbondata/pull/2861
LGTM
---
[GitHub] carbondata issue #2861: [CARBONDATA-3025]handle passing spark appname for pa...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1156/
---
[GitHub] carbondata issue #2861: [HOTFIX]handle passing spark appname for partition t...
Posted by akashrn5 <gi...@git.apache.org>.
Github user akashrn5 commented on the issue:
https://github.com/apache/carbondata/pull/2861
retest this please
---
[GitHub] carbondata issue #2861: [HOTFIX]handle passing spark appname for partition t...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1078/
---
[GitHub] carbondata pull request #2861: [CARBONDATA-3025]handle passing spark appname...
Posted by akashrn5 <gi...@git.apache.org>.
Github user akashrn5 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2861#discussion_r229294323
--- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/datasources/SparkCarbonTableFormat.scala ---
@@ -175,6 +172,11 @@ with Serializable {
dataSchema: StructType,
context: TaskAttemptContext): OutputWriter = {
val model = CarbonTableOutputFormat.getLoadModel(context.getConfiguration)
+ val appName = context.getConfiguration.get(CarbonCommonConstants.CARBON_WRITTEN_BY_APPNAME)
+ if (null != appName) {
--- End diff --
actually the appname will be always set ,spark will always set the appname, this check is added for one of the test cases , i will remove this
---
[GitHub] carbondata issue #2861: [HOTFIX]handle passing spark appname for partition t...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Failed with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9322/
---
[GitHub] carbondata pull request #2861: [CARBONDATA-3025]handle passing spark appname...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2861#discussion_r229285529
--- Diff: integration/spark-datasource/src/main/scala/org/apache/spark/sql/carbondata/execution/datasources/SparkCarbonFileFormat.scala ---
@@ -121,15 +121,13 @@ class SparkCarbonFileFormat extends FileFormat
dataSchema: StructType): OutputWriterFactory = {
val conf = job.getConfiguration
-
+ conf
+ .set(CarbonCommonConstants.CARBON_WRITTEN_BY_APPNAME,
--- End diff --
move to previous line
---
[GitHub] carbondata pull request #2861: [CARBONDATA-3025]handle passing spark appname...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2861#discussion_r229285778
--- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/datasources/SparkCarbonTableFormat.scala ---
@@ -175,6 +172,11 @@ with Serializable {
dataSchema: StructType,
context: TaskAttemptContext): OutputWriter = {
val model = CarbonTableOutputFormat.getLoadModel(context.getConfiguration)
+ val appName = context.getConfiguration.get(CarbonCommonConstants.CARBON_WRITTEN_BY_APPNAME)
+ if (null != appName) {
--- End diff --
Is there is no appName, I think we should construct one, the appName should be always write into the file
---
[GitHub] carbondata issue #2861: [HOTFIX]handle passing spark appname for partition t...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1087/
---
[GitHub] carbondata pull request #2861: [CARBONDATA-3025]handle passing spark appname...
Posted by xuchuanyin <gi...@git.apache.org>.
Github user xuchuanyin commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2861#discussion_r229147458
--- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/datasources/SparkCarbonTableFormat.scala ---
@@ -175,6 +174,12 @@ with Serializable {
dataSchema: StructType,
context: TaskAttemptContext): OutputWriter = {
val model = CarbonTableOutputFormat.getLoadModel(context.getConfiguration)
+ val appName = context.getConfiguration.get(CarbonCommonConstants.CARBON_WRITTEN_BY_APPNAME)
+ if (null != appName) {
+ CarbonProperties.getInstance()
+ .addProperty(CarbonCommonConstants.CARBON_WRITTEN_BY_APPNAME,
+ appName)
--- End diff --
optimize the indent
---
[GitHub] carbondata issue #2861: [CARBONDATA-3025]handle passing spark appname for pa...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Success with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9419/
---
[GitHub] carbondata issue #2861: [CARBONDATA-3025]handle passing spark appname for pa...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/1376/
---
[GitHub] carbondata issue #2861: [HOTFIX]handle passing spark appname for partition t...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Failed with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9343/
---
[GitHub] carbondata issue #2861: [HOTFIX]handle passing spark appname for partition t...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1056/
---
[GitHub] carbondata issue #2861: [HOTFIX]handle passing spark appname for partition t...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1062/
---
[GitHub] carbondata pull request #2861: [CARBONDATA-3025]handle passing spark appname...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2861#discussion_r229285477
--- Diff: integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonRDD.scala ---
@@ -37,6 +37,11 @@ abstract class CarbonRDD[T: ClassTag](
@transient private val ss: SparkSession,
@transient private var deps: Seq[Dependency[_]]) extends RDD[T](ss.sparkContext, deps) {
+ @transient val sparkAppName: String = ss.sparkContext.appName
+ CarbonProperties.getInstance()
+ .addProperty(CarbonCommonConstants.CARBON_WRITTEN_BY_APPNAME,
+ sparkAppName)
--- End diff --
move to previous line
---
[GitHub] carbondata issue #2861: [CARBONDATA-3025]handle passing spark appname for pa...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Success with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9428/
---
[GitHub] carbondata issue #2861: [HOTFIX]handle passing spark appname for partition t...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1101/
---
[GitHub] carbondata issue #2861: [HOTFIX]handle passing spark appname for partition t...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/1291/
---
[GitHub] carbondata issue #2861: [HOTFIX]handle passing spark appname for partition t...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Success with Spark 2.3.1, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/9367/
---
[GitHub] carbondata issue #2861: [HOTFIX]handle passing spark appname for partition t...
Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2861
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/1104/
---
[GitHub] carbondata pull request #2861: [CARBONDATA-3025]handle passing spark appname...
Posted by akashrn5 <gi...@git.apache.org>.
Github user akashrn5 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2861#discussion_r229235332
--- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/datasources/SparkCarbonTableFormat.scala ---
@@ -175,6 +174,12 @@ with Serializable {
dataSchema: StructType,
context: TaskAttemptContext): OutputWriter = {
val model = CarbonTableOutputFormat.getLoadModel(context.getConfiguration)
+ val appName = context.getConfiguration.get(CarbonCommonConstants.CARBON_WRITTEN_BY_APPNAME)
+ if (null != appName) {
+ CarbonProperties.getInstance()
+ .addProperty(CarbonCommonConstants.CARBON_WRITTEN_BY_APPNAME,
+ appName)
--- End diff --
done
---