[GitHub] carbondata pull request #2246: [CARBONDATA-2413] After running CarbonWriter,...

2018-05-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/carbondata/pull/2246


---


[GitHub] carbondata pull request #2246: [CARBONDATA-2413] After running CarbonWriter,...

2018-05-18 Thread ravipesala
Github user ravipesala commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2246#discussion_r189422726
  
--- Diff: 
core/src/main/java/org/apache/carbondata/core/metadata/schema/table/DiskBasedDMSchemaStorageProvider.java
 ---
@@ -103,7 +103,7 @@ public DiskBasedDMSchemaStorageProvider(String 
storePath) {
   }
 
   @Override public List retrieveSchemas(CarbonTable 
carbonTable) throws IOException {
-checkAndReloadDataMapSchemas();
+checkAndReloadDataMapSchemas(false);
--- End diff --

I think,  it is not required to touch the md file in case of retrieve 


---


[GitHub] carbondata pull request #2246: [CARBONDATA-2413] After running CarbonWriter,...

2018-05-18 Thread jackylk
Github user jackylk commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2246#discussion_r189421336
  
--- Diff: 
core/src/main/java/org/apache/carbondata/core/metadata/schema/table/DiskBasedDMSchemaStorageProvider.java
 ---
@@ -103,7 +103,7 @@ public DiskBasedDMSchemaStorageProvider(String 
storePath) {
   }
 
   @Override public List retrieveSchemas(CarbonTable 
carbonTable) throws IOException {
-checkAndReloadDataMapSchemas();
+checkAndReloadDataMapSchemas(false);
--- End diff --

I think you need to decide the true of false based on the 
`carbonTable.isTransactionalTable`


---


[GitHub] carbondata pull request #2246: [CARBONDATA-2413] After running CarbonWriter,...

2018-05-18 Thread xubo245
Github user xubo245 commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2246#discussion_r189318314
  
--- Diff: 
core/src/main/java/org/apache/carbondata/core/metadata/schema/table/DiskBasedDMSchemaStorageProvider.java
 ---
@@ -103,7 +103,7 @@ public DiskBasedDMSchemaStorageProvider(String 
storePath) {
   }
 
   @Override public List retrieveSchemas(CarbonTable 
carbonTable) throws IOException {
-checkAndReloadDataMapSchemas();
+checkAndReloadDataMapSchemas(false);
--- End diff --

retrieveSchemas no need touch md file


---


[GitHub] carbondata pull request #2246: [CARBONDATA-2413] After running CarbonWriter,...

2018-05-18 Thread ravipesala
Github user ravipesala commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2246#discussion_r189223250
  
--- Diff: 
core/src/main/java/org/apache/carbondata/core/metadata/schema/table/DiskBasedDMSchemaStorageProvider.java
 ---
@@ -103,7 +103,7 @@ public DiskBasedDMSchemaStorageProvider(String 
storePath) {
   }
 
   @Override public List retrieveSchemas(CarbonTable 
carbonTable) throws IOException {
-checkAndReloadDataMapSchemas();
+checkAndReloadDataMapSchemas(false);
--- End diff --

In case carbon table is non transactional don't touchFile


---


[GitHub] carbondata pull request #2246: [CARBONDATA-2413] After running CarbonWriter,...

2018-05-17 Thread xubo245
Github user xubo245 commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2246#discussion_r189142890
  
--- Diff: 
core/src/main/java/org/apache/carbondata/core/metadata/schema/table/DiskBasedDMSchemaStorageProvider.java
 ---
@@ -175,6 +175,18 @@ public DiskBasedDMSchemaStorageProvider(String 
storePath) {
 }
   }
 
+  private void checkAndReloadDataMapSchemasWithoutNewFile() throws 
IOException {
--- End diff --

ok, done


---


[GitHub] carbondata pull request #2246: [CARBONDATA-2413] After running CarbonWriter,...

2018-05-17 Thread ravipesala
Github user ravipesala commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2246#discussion_r188972807
  
--- Diff: 
core/src/main/java/org/apache/carbondata/core/metadata/schema/table/DiskBasedDMSchemaStorageProvider.java
 ---
@@ -175,6 +175,18 @@ public DiskBasedDMSchemaStorageProvider(String 
storePath) {
 }
   }
 
+  private void checkAndReloadDataMapSchemasWithoutNewFile() throws 
IOException {
--- End diff --

It is duplicated to below method, just pass boolean to handle in below 
method instead of duplicating it


---


[GitHub] carbondata pull request #2246: [CARBONDATA-2413] After running CarbonWriter,...

2018-05-16 Thread xubo245
Github user xubo245 commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2246#discussion_r188817870
  
--- Diff: 
core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
 ---
@@ -1657,6 +1657,16 @@
 
   public static final String CARBON_SEARCH_MODE_ENABLE_DEFAULT = "false";
 
+  /**
+   * If set to true, SDK enabled.
+   * Default value is false, SDK not enable.
+   */
+  @CarbonProperty
+  @InterfaceStability.Unstable
+  public static final String CARBON_SDK_ENABLE = "carbon.sdk.enabled";
--- End diff --

It's constant, which can  show the status of SDK.


---


[GitHub] carbondata pull request #2246: [CARBONDATA-2413] After running CarbonWriter,...

2018-05-16 Thread jackylk
Github user jackylk commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2246#discussion_r188615464
  
--- Diff: 
core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
 ---
@@ -1657,6 +1657,16 @@
 
   public static final String CARBON_SEARCH_MODE_ENABLE_DEFAULT = "false";
 
+  /**
+   * If set to true, SDK enabled.
+   * Default value is false, SDK not enable.
+   */
+  @CarbonProperty
+  @InterfaceStability.Unstable
+  public static final String CARBON_SDK_ENABLE = "carbon.sdk.enabled";
--- End diff --

What does SDK enabled mean?


---


[GitHub] carbondata pull request #2246: [CARBONDATA-2413] After running CarbonWriter,...

2018-05-09 Thread xubo245
Github user xubo245 commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2246#discussion_r186940468
  
--- Diff: 
store/sdk/src/test/java/org/apache/carbondata/store/LocalCarbonStoreTest.java 
---
@@ -28,9 +28,16 @@
 import org.apache.carbondata.sdk.file.TestUtil;
 
 import org.apache.commons.io.FileUtils;
+import org.junit.Before;
 import org.junit.Test;
 
+import static org.apache.carbondata.sdk.file.TestUtil.setSystemLocation;
+
 public class LocalCarbonStoreTest {
+  @Before
+  public void test() {
+setSystemLocation();
--- End diff --

ok, changed


---


[GitHub] carbondata pull request #2246: [CARBONDATA-2413] After running CarbonWriter,...

2018-05-08 Thread xubo245
Github user xubo245 commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2246#discussion_r186923021
  
--- Diff: 
processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerModel.java
 ---
@@ -259,14 +259,16 @@ public static CarbonFactDataHandlerModel 
createCarbonFactDataHandlerModel(
 carbonFactDataHandlerModel.sortScope = 
CarbonDataProcessorUtil.getSortScope(configuration);
 
 DataMapWriterListener listener = new DataMapWriterListener();
-listener.registerAllWriter(
-configuration.getTableSpec().getCarbonTable(),
-configuration.getSegmentId(),
-CarbonTablePath.getShardName(
-carbonDataFileAttributes.getTaskId(),
-bucketId,
-0,
-String.valueOf(carbonDataFileAttributes.getFactTimeStamp(;
+if (null != configuration.getSegmentId()) {
+  listener.registerAllWriter(
--- End diff --

ok, done


---


[GitHub] carbondata pull request #2246: [CARBONDATA-2413] After running CarbonWriter,...

2018-05-08 Thread jackylk
Github user jackylk commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2246#discussion_r186921137
  
--- Diff: 
processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerModel.java
 ---
@@ -259,14 +259,16 @@ public static CarbonFactDataHandlerModel 
createCarbonFactDataHandlerModel(
 carbonFactDataHandlerModel.sortScope = 
CarbonDataProcessorUtil.getSortScope(configuration);
 
 DataMapWriterListener listener = new DataMapWriterListener();
-listener.registerAllWriter(
-configuration.getTableSpec().getCarbonTable(),
-configuration.getSegmentId(),
-CarbonTablePath.getShardName(
-carbonDataFileAttributes.getTaskId(),
-bucketId,
-0,
-String.valueOf(carbonDataFileAttributes.getFactTimeStamp(;
+if (null != configuration.getSegmentId()) {
+  listener.registerAllWriter(
--- End diff --

add a comment for this. SDK currently does not support writing datamap


---


[GitHub] carbondata pull request #2246: [CARBONDATA-2413] After running CarbonWriter,...

2018-05-03 Thread jackylk
Github user jackylk commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2246#discussion_r185716301
  
--- Diff: 
store/sdk/src/test/java/org/apache/carbondata/store/LocalCarbonStoreTest.java 
---
@@ -28,9 +28,16 @@
 import org.apache.carbondata.sdk.file.TestUtil;
 
 import org.apache.commons.io.FileUtils;
+import org.junit.Before;
 import org.junit.Test;
 
+import static org.apache.carbondata.sdk.file.TestUtil.setSystemLocation;
+
 public class LocalCarbonStoreTest {
+  @Before
+  public void test() {
+setSystemLocation();
--- End diff --

You should set it back to null after the testcase


---


[GitHub] carbondata pull request #2246: [CARBONDATA-2413] After running CarbonWriter,...

2018-04-27 Thread xubo245
GitHub user xubo245 opened a pull request:

https://github.com/apache/carbondata/pull/2246

[CARBONDATA-2413] After running CarbonWriter, there is null/_system 
directory about datamap


change the system folder location property, which will change the system 
location of datamap

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/xubo245/carbondata CARBONDATA-2413-remove-null

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/carbondata/pull/2246.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 #2246


commit 99c09dbedc8dc054616381d9811d4185adb5c170
Author: xubo245 <601450868@...>
Date:   2018-04-28T03:09:24Z

[CARBONDATA-2413] After running CarbonWriter, there is null directory about 
datamap

change the system folder location property, which will change the system 
location of datamap




---