Github user QiangCai commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1604#discussion_r154548820
--- Diff:
integration/spark2/src/main/scala/org/apache/spark/sql/CarbonSession.scala ---
@@ -170,8 +181,15 @@ object CarbonSession {
}
options.foreach { case (k, v) =>
session.sessionState.conf.setConfString(k, v) }
SparkSession.setDefaultSession(session)
- CommonUtil.cleanInProgressSegments(
-
carbonProperties.getProperty(CarbonCommonConstants.STORE_LOCATION),
sparkContext)
+ try {
+ CommonUtil.cleanInProgressSegments(
+
carbonProperties.getProperty(CarbonCommonConstants.STORE_LOCATION),
sparkContext)
+ } catch {
+ case e: Throwable =>
+ // catch all exceptions to avoid CarbonSession initialization
failure
+ LogServiceFactory.getLogService(this.getClass.getCanonicalName)
+ .error(e, "Failed to clean in progress segments")
--- End diff --
indentation is incorrect
---