[GitHub] incubator-carbondata pull request #92: [CARBONDATA-176] Deletion of compacte...

2016-08-29 Thread ravikiran23
Github user ravikiran23 commented on a diff in the pull request:

https://github.com/apache/incubator-carbondata/pull/92#discussion_r76619356
  
--- Diff: 
processing/src/main/java/org/apache/carbondata/lcm/status/SegmentStatusManager.java
 ---
@@ -449,6 +457,12 @@ public void writeLoadDetailsIntoFile(String 
dataLoadLocation,
 for (LoadMetadataDetails loadMetadata : listOfLoadFolderDetailsArray) {
   Integer result = 
compareDateValues(loadMetadata.getLoadStartTimeAsLong(), loadStartTime);
   if (result < 0) {
+if (CarbonCommonConstants.SEGMENT_COMPACTED
--- End diff --

handled


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #92: [CARBONDATA-176] Deletion of compacte...

2016-08-29 Thread ravikiran23
Github user ravikiran23 commented on a diff in the pull request:

https://github.com/apache/incubator-carbondata/pull/92#discussion_r76606724
  
--- Diff: 
processing/src/main/java/org/apache/carbondata/lcm/status/SegmentStatusManager.java
 ---
@@ -410,18 +410,26 @@ public void writeLoadDetailsIntoFile(String 
dataLoadLocation,
   for (LoadMetadataDetails loadMetadata : 
listOfLoadFolderDetailsArray) {
 
 if (loadId.equalsIgnoreCase(loadMetadata.getLoadName())) {
+  // if the segment is compacted then no need to delete that.
+  if (CarbonCommonConstants.SEGMENT_COMPACTED
+  .equalsIgnoreCase(loadMetadata.getLoadStatus())) {
+LOG.error("Cannot delete the Segment which is compacted. 
Segment is " + loadId);
+loadFound = true;
+invalidLoadIds.add(loadId);
--- End diff --

fixed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #92: [CARBONDATA-176] Deletion of compacte...

2016-08-29 Thread ManoharVanam
Github user ManoharVanam commented on a diff in the pull request:

https://github.com/apache/incubator-carbondata/pull/92#discussion_r76606495
  
--- Diff: 
processing/src/main/java/org/apache/carbondata/lcm/status/SegmentStatusManager.java
 ---
@@ -410,18 +410,26 @@ public void writeLoadDetailsIntoFile(String 
dataLoadLocation,
   for (LoadMetadataDetails loadMetadata : 
listOfLoadFolderDetailsArray) {
 
 if (loadId.equalsIgnoreCase(loadMetadata.getLoadName())) {
+  // if the segment is compacted then no need to delete that.
+  if (CarbonCommonConstants.SEGMENT_COMPACTED
+  .equalsIgnoreCase(loadMetadata.getLoadStatus())) {
+LOG.error("Cannot delete the Segment which is compacted. 
Segment is " + loadId);
+loadFound = true;
+invalidLoadIds.add(loadId);
--- End diff --

Above two lines are not required as we are deleting  all or none


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #92: [CARBONDATA-176] Deletion of compacte...

2016-08-29 Thread ravikiran23
Github user ravikiran23 commented on a diff in the pull request:

https://github.com/apache/incubator-carbondata/pull/92#discussion_r76581081
  
--- Diff: 
processing/src/main/java/org/apache/carbondata/lcm/status/SegmentStatusManager.java
 ---
@@ -410,6 +410,14 @@ public void writeLoadDetailsIntoFile(String 
dataLoadLocation,
   for (LoadMetadataDetails loadMetadata : 
listOfLoadFolderDetailsArray) {
 
 if (loadId.equalsIgnoreCase(loadMetadata.getLoadName())) {
+  // if the segment is compacted then no need to delete that.
+  if (CarbonCommonConstants.SEGMENT_COMPACTED
+  .equalsIgnoreCase(loadMetadata.getLoadStatus())) {
+LOG.error("Cannot delete the load which is compacted.");
--- End diff --

Here logs will be only in case of user is trying to delete the compacted 
loads intentionally using delete segment DDL.  so it is ok to add the segment 
ID in logs.
Fixing that.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #92: [CARBONDATA-176] Deletion of compacte...

2016-08-27 Thread Vimal-Das
Github user Vimal-Das commented on a diff in the pull request:

https://github.com/apache/incubator-carbondata/pull/92#discussion_r76516430
  
--- Diff: 
processing/src/main/java/org/apache/carbondata/lcm/status/SegmentStatusManager.java
 ---
@@ -410,6 +410,14 @@ public void writeLoadDetailsIntoFile(String 
dataLoadLocation,
   for (LoadMetadataDetails loadMetadata : 
listOfLoadFolderDetailsArray) {
 
 if (loadId.equalsIgnoreCase(loadMetadata.getLoadName())) {
+  // if the segment is compacted then no need to delete that.
+  if (CarbonCommonConstants.SEGMENT_COMPACTED
+  .equalsIgnoreCase(loadMetadata.getLoadStatus())) {
+LOG.error("Cannot delete the load which is compacted.");
--- End diff --

In the log, mention the load id for which you are giving this error.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #92: [CARBONDATA-176] Deletion of compacte...

2016-08-24 Thread ravikiran23
GitHub user ravikiran23 opened a pull request:

https://github.com/apache/incubator-carbondata/pull/92

[CARBONDATA-176] Deletion of compacted segment is not allowed.

once the segment is compacted then if user selects the compacted segment to 
delete then no need to delete the segment.

displaying error msg on this.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ravikiran23/incubator-carbondata 
deletingCompactedSegment

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

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


commit bea9475ca4b97b1f505c2b3a2019b48ee1c795c0
Author: ravikiran 
Date:   2016-08-24T14:06:06Z

once the segment is compacted then if user selects the compacted segment to 
delete then no need to delete the segment.
displaying error msg on this.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---