You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@carbondata.apache.org by gv...@apache.org on 2016/09/08 08:00:16 UTC
[1/2] incubator-carbondata git commit: changing the error message in
delete by ID.
Repository: incubator-carbondata
Updated Branches:
refs/heads/master 7493a834d -> eb9806cd1
changing the error message in delete by ID.
Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/0f0491b0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/0f0491b0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/0f0491b0
Branch: refs/heads/master
Commit: 0f0491b0bbffaae833bd1c15c9d096be334b5dc6
Parents: 7493a83
Author: ravikiran <ra...@gmail.com>
Authored: Wed Sep 7 06:09:40 2016 -0700
Committer: Venkata Ramana G <ra...@huawei.com>
Committed: Thu Sep 8 13:28:26 2016 +0530
----------------------------------------------------------------------
.../execution/command/carbonTableSchema.scala | 20 ++++++++++----------
.../lcm/status/SegmentStatusManager.java | 11 ++++++-----
2 files changed, 16 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0f0491b0/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala b/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
index 2047872..c0ad82b 100644
--- a/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
+++ b/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
@@ -902,7 +902,7 @@ private[sql] case class DeleteLoadsById(
def run(sqlContext: SQLContext): Seq[Row] = {
val databaseName = getDB.getDatabaseName(databaseNameOp, sqlContext)
- LOGGER.audit(s"Delete load by Id request has been received for $databaseName.$tableName")
+ LOGGER.audit(s"Delete segment by Id request has been received for $databaseName.$tableName")
// validate load ids first
validateLoadIds
@@ -912,7 +912,7 @@ private[sql] case class DeleteLoadsById(
val relation = CarbonEnv.getInstance(sqlContext).carbonCatalog.lookupRelation1(
identifier, None)(sqlContext).asInstanceOf[CarbonRelation]
if (relation == null) {
- LOGGER.audit(s"Delete load by Id is failed. Table $dbName.$tableName does not exist")
+ LOGGER.audit(s"Delete segment by Id is failed. Table $dbName.$tableName does not exist")
sys.error(s"Table $dbName.$tableName does not exist")
}
@@ -931,11 +931,11 @@ private[sql] case class DeleteLoadsById(
if (invalidLoadIds.isEmpty) {
- LOGGER.audit(s"Delete load by Id is successfull for $databaseName.$tableName.")
+ LOGGER.audit(s"Delete segment by Id is successfull for $databaseName.$tableName.")
}
else {
- sys.error("Delete load by Id is failed. No matching load id found. SegmentSeqId(s) - "
- + invalidLoadIds)
+ sys.error("Delete segment by Id is failed. Invalid ID is :"
+ + invalidLoadIds.mkString(","))
}
Seq.empty
@@ -945,7 +945,7 @@ private[sql] case class DeleteLoadsById(
// validates load ids
private def validateLoadIds: Unit = {
if (loadids.isEmpty) {
- val errorMessage = "Error: Load id(s) should not be empty."
+ val errorMessage = "Error: Segment id(s) should not be empty."
throw new MalformedCarbonCommandException(errorMessage)
}
@@ -962,14 +962,14 @@ private[sql] case class DeleteLoadsByLoadDate(
def run(sqlContext: SQLContext): Seq[Row] = {
- LOGGER.audit("The delete load by load date request has been received.")
+ LOGGER.audit("The delete segment by load date request has been received.")
val dbName = getDB.getDatabaseName(databaseNameOp, sqlContext)
val identifier = TableIdentifier(tableName, Option(dbName))
val relation = CarbonEnv.getInstance(sqlContext).carbonCatalog
.lookupRelation1(identifier, None)(sqlContext).asInstanceOf[CarbonRelation]
if (relation == null) {
LOGGER
- .audit(s"Delete load by load date is failed. Table $dbName.$tableName does not " +
+ .audit(s"Delete segment by load date is failed. Table $dbName.$tableName does not " +
s"exist")
sys.error(s"Table $dbName.$tableName does not exist")
}
@@ -993,10 +993,10 @@ private[sql] case class DeleteLoadsByLoadDate(
val invalidLoadTimestamps = segmentStatusManager
.updateDeletionStatus(loadDate, path, timeObj.asInstanceOf[java.lang.Long]).asScala
if(invalidLoadTimestamps.isEmpty) {
- LOGGER.audit(s"Delete load by load date is successfull for $dbName.$tableName.")
+ LOGGER.audit(s"Delete segment by date is successfull for $dbName.$tableName.")
}
else {
- sys.error("Delete load by load date is failed. No matching load found.")
+ sys.error("Delete segment by date is failed. No matching segment found.")
}
Seq.empty
http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/0f0491b0/processing/src/main/java/org/apache/carbondata/lcm/status/SegmentStatusManager.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/lcm/status/SegmentStatusManager.java b/processing/src/main/java/org/apache/carbondata/lcm/status/SegmentStatusManager.java
index 2b83b11..22ec689 100644
--- a/processing/src/main/java/org/apache/carbondata/lcm/status/SegmentStatusManager.java
+++ b/processing/src/main/java/org/apache/carbondata/lcm/status/SegmentStatusManager.java
@@ -282,7 +282,7 @@ public class SegmentStatusManager {
}
} else {
- LOG.audit("Delete load by Id is failed. No matching load id found.");
+ LOG.audit("Delete segment by Id is failed. No matching segment id found.");
return loadIds;
}
@@ -341,7 +341,7 @@ public class SegmentStatusManager {
}
} else {
- LOG.audit("Delete load by date is failed. No matching load found.");
+ LOG.audit("Delete segment by date is failed. No matching segment found.");
invalidLoadTimestamps.add(loadDate);
return invalidLoadTimestamps;
}
@@ -414,7 +414,8 @@ public class SegmentStatusManager {
if (CarbonCommonConstants.SEGMENT_COMPACTED
.equalsIgnoreCase(loadMetadata.getLoadStatus())) {
LOG.error("Cannot delete the Segment which is compacted. Segment is " + loadId);
- break;
+ invalidLoadIds.add(loadId);
+ return invalidLoadIds;
}
if (!CarbonCommonConstants.MARKED_FOR_DELETE.equals(loadMetadata.getLoadStatus())) {
loadFound = true;
@@ -427,7 +428,7 @@ public class SegmentStatusManager {
}
if (!loadFound) {
- LOG.audit("Delete segment by ID is failed. No matching segment id found.");
+ LOG.audit("Delete segment by ID is failed. No matching segment id found :" + loadId);
invalidLoadIds.add(loadId);
return invalidLoadIds;
}
@@ -475,7 +476,7 @@ public class SegmentStatusManager {
if (!loadFound) {
invalidLoadTimestamps.add(loadDate);
- LOG.audit("Delete load by date is failed. No matching load found.");
+ LOG.audit("Delete segment by date is failed. No matching segment found.");
return invalidLoadTimestamps;
}
return invalidLoadTimestamps;
[2/2] incubator-carbondata git commit: [CARBONDATA-226] change
errormsg in delete by id. This closes #135
Posted by gv...@apache.org.
[CARBONDATA-226] change errormsg in delete by id. This closes #135
Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/eb9806cd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/eb9806cd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/eb9806cd
Branch: refs/heads/master
Commit: eb9806cd1e955620959ddcb82ecfbb87c7d0a174
Parents: 7493a83 0f0491b
Author: Venkata Ramana G <ra...@huawei.com>
Authored: Thu Sep 8 13:29:34 2016 +0530
Committer: Venkata Ramana G <ra...@huawei.com>
Committed: Thu Sep 8 13:29:34 2016 +0530
----------------------------------------------------------------------
.../execution/command/carbonTableSchema.scala | 20 ++++++++++----------
.../lcm/status/SegmentStatusManager.java | 11 ++++++-----
2 files changed, 16 insertions(+), 15 deletions(-)
----------------------------------------------------------------------