[GitHub] incubator-carbondata pull request #398: [CARBONDATA-400] Error message for d...

classic Classic list List threaded Threaded
30 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #398: [CARBONDATA-400] Error message for d...

qiuchenjian-2
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/398#discussion_r109963768
 
    --- Diff: integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtil.scala ---
    @@ -784,11 +784,24 @@ object GlobalDictionaryUtil {
           }
         } catch {
           case ex: Exception =>
    -        LOGGER.error(ex, "generate global dictionary failed")
    -        throw ex
    +        ex match {
    +          case spx: SparkException =>
    +            LOGGER.error(spx, "generate global dictionary failed")
    +            throw new Exception(
    +              trimErrorMessage(spx.getMessage))
    +          case _ =>
    +            LOGGER.error(ex, "generate global dictionary failed")
    +            throw ex
    +        }
         }
       }
     
    +  // Get proper error message of TextParsingException
    +  def trimErrorMessage(input: String): String = {
    +    val message = input.split("Hint")(0).split("TextParsingException: ")(1)
    --- End diff --
   
    There may be chances of input is null because `spsx.getMessage()` can be null, so handle NPE here.
    And also please check the array length after you split with `"Hint"`, other wise we may get ArrayIndexOutOfBoundException.


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #398: [CARBONDATA-400] Error message for dataload...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user akashrn5 commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/398
 
    @ravipesala please review


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #398: [CARBONDATA-400] Error message for dataload...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/398
 
    Build Failed  with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1450/



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #398: [CARBONDATA-400] Error message for dataload...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/398
 
    Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1451/



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #398: [CARBONDATA-400] Error message for d...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/398#discussion_r110078344
 
    --- Diff: integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtil.scala ---
    @@ -784,9 +784,28 @@ object GlobalDictionaryUtil {
           }
         } catch {
           case ex: Exception =>
    -        LOGGER.error(ex, "generate global dictionary failed")
    -        throw ex
    +        ex match {
    +          case spx: SparkException =>
    +            LOGGER.error(spx, "generate global dictionary failed")
    +            throw new Exception("generate global dictionary failed" +
    +                                trimErrorMessage(spx.getMessage))
    +          case _ =>
    +            LOGGER.error(ex, "generate global dictionary failed")
    +            throw ex
    +        }
    +    }
    +  }
    +
    +  // Get proper error message of TextParsingException
    +  def trimErrorMessage(input: String): String = {
    +    var errorMessage: String = ""
    +    if (input != null) {
    +      if (input.split("Hint").length > 0) {
    +        errorMessage = input.split("Hint")(0).split("TextParsingException: ")(1)
    --- End diff --
   
    even for `split("TextParsingException: ")` also check the length  more than 1.


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #398: [CARBONDATA-400] Error message for dataload...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/398
 
    Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1459/



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #398: [CARBONDATA-400] Error message for dataload...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/398
 
    Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1460/



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #398: [CARBONDATA-400] Error message for d...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/398#discussion_r110117757
 
    --- Diff: integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtil.scala ---
    @@ -784,9 +784,28 @@ object GlobalDictionaryUtil {
           }
         } catch {
           case ex: Exception =>
    -        LOGGER.error(ex, "generate global dictionary failed")
    -        throw ex
    +        ex match {
    +          case spx: SparkException =>
    +            LOGGER.error(spx, "generate global dictionary failed")
    +            throw new Exception("generate global dictionary failed, " +
    +                                trimErrorMessage(spx.getMessage))
    +          case _ =>
    +            LOGGER.error(ex, "generate global dictionary failed")
    +            throw ex
    +        }
    +    }
    +  }
    +
    +  // Get proper error message of TextParsingException
    +  def trimErrorMessage(input: String): String = {
    +    var errorMessage: String = null
    +    if (input != null) {
    +      if (input.split("Hint").length > 0 &&
    +          input.split("Hint")(0).split("TextParsingException: ").length > 1) {
    +        errorMessage = input.split("Hint")(0).split("TextParsingException: ")(1)
    +      }
    --- End diff --
   
    Just simplify as follows.
    ```
    val hintSplit = input.split("Hint")
    if (hintSplit.length > 0) {
      val parseSplit = hintSplit(0).split("TextParsingException: ")
      if (parseSplit.length > 1) {
       errorMessage = parseSplit(1)
      }
    }
    ```


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata issue #398: [CARBONDATA-400] Error message for dataload...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/incubator-carbondata/pull/398
 
    LGTM


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] incubator-carbondata pull request #398: [CARBONDATA-400] Error message for d...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user asfgit closed the pull request at:

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


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
12