Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-1293

Tajo have to accept hostname beginning with digits.

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 0.10.0
    • Component/s: None
    • Labels:
      None

      Description

      After investigating hostname pattern rule in NetworkAddressValidator, I found that Tajo do not allow hostname beginning with digits, e.g. 0.linewalks.local.
      Even though IETF RFC953 has a constraint of starting alphabet in hostname, IETF RFC1123 lessens the limit by allowing fully numeric hostname to be valid. Therefore, I suggest that Tajo should change hostname pattern rule from "[a-zA-Z][-a-zA-Z0-9\\\\._]$" to "[a-zA-Z0-9][-a-zA-Z0-9\\\\._]$".

      2015-01-09 14:21:15,838 ERROR org.apache.tajo.master.TajoMaster: Validation Test has been failed on tajo.master.umbilical-rpc.address. Actual value is 0.linewalks.local:26001
      org.apache.tajo.rule.EvaluationFailedException: Validation Test has been failed on tajo.master.umbilical-rpc.address. Actual value is 0.linewalks.local:26001
              at org.apache.tajo.rule.SelfDiagnosisRuleSession.fireRules(SelfDiagnosisRuleSession.java:66)
              at org.apache.tajo.master.TajoMaster.diagnoseTajoMaster(TajoMaster.java:294)
              at org.apache.tajo.master.TajoMaster.serviceInit(TajoMaster.java:173)
              at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
              at org.apache.tajo.master.TajoMaster.main(TajoMaster.java:587)
      Caused by: org.apache.tajo.validation.ConstraintViolationException: ConstraintViolationException [0.linewalks.local:26001 is not a valid network address representation.]
              at org.apache.tajo.rule.base.TajoConfValidationRule.evaluate(TajoConfValidationRule.java:81)
              at org.apache.tajo.rule.SelfDiagnosisRuleSession.fireRules(SelfDiagnosisRuleSession.java:63)
              ... 4 more
      2015-01-09 14:21:15,839 INFO org.apache.hadoop.service.AbstractService: Service org.apache.tajo.master.TajoMaster failed in state INITED; cause: org.apache.tajo.rule.EvaluationFailedException: Validation Test has been failed on tajo.master.umbilical-rpc.address. Actual value is 0.linewalks.local:26001
      org.apache.tajo.rule.EvaluationFailedException: Validation Test has been failed on tajo.master.umbilical-rpc.address. Actual value is 0.linewalks.local:26001
              at org.apache.tajo.rule.SelfDiagnosisRuleSession.fireRules(SelfDiagnosisRuleSession.java:66)
              at org.apache.tajo.master.TajoMaster.diagnoseTajoMaster(TajoMaster.java:294)
              at org.apache.tajo.master.TajoMaster.serviceInit(TajoMaster.java:173)
              at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
              at org.apache.tajo.master.TajoMaster.main(TajoMaster.java:587)
      Caused by: org.apache.tajo.validation.ConstraintViolationException: ConstraintViolationException [0.linewalks.local:26001 is not a valid network address representation.]
              at org.apache.tajo.rule.base.TajoConfValidationRule.evaluate(TajoConfValidationRule.java:81)
              at org.apache.tajo.rule.SelfDiagnosisRuleSession.fireRules(SelfDiagnosisRuleSession.java:63)
              ... 4 more
      2015-01-09 14:21:15,942 INFO org.apache.tajo.master.TajoMaster: Tajo Master main thread exiting
      2015-01-09 14:21:15,942 FATAL org.apache.tajo.master.TajoMaster: Error starting TajoMaster
      org.apache.tajo.rule.EvaluationFailedException: Validation Test has been failed on tajo.master.umbilical-rpc.address. Actual value is 0.linewalks.local:26001
              at org.apache.tajo.rule.SelfDiagnosisRuleSession.fireRules(SelfDiagnosisRuleSession.java:66)
              at org.apache.tajo.master.TajoMaster.diagnoseTajoMaster(TajoMaster.java:294)
              at org.apache.tajo.master.TajoMaster.serviceInit(TajoMaster.java:173)
              at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
              at org.apache.tajo.master.TajoMaster.main(TajoMaster.java:587)
      Caused by: org.apache.tajo.validation.ConstraintViolationException: ConstraintViolationException [0.linewalks.local:26001 is not a valid network address representation.]
              at org.apache.tajo.rule.base.TajoConfValidationRule.evaluate(TajoConfValidationRule.java:81)
              at org.apache.tajo.rule.SelfDiagnosisRuleSession.fireRules(SelfDiagnosisRuleSession.java:63)
              ... 4 more
      
      1. TAJO-1293.patch
        0.7 kB
        Jinhang Choi

        Activity

        Hide
        hudson Hudson added a comment -

        ABORTED: Integrated in Tajo-master-CODEGEN-build #192 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/192/)
        TAJO-1293: Tajo have to accept hostname beginning with digits. (jihun: rev d1a46c6b6e3d4f6c74519cffab1c0562640fb0e5)

        • tajo-common/src/main/java/org/apache/tajo/validation/NetworkAddressValidator.java
        • CHANGES
        Show
        hudson Hudson added a comment - ABORTED: Integrated in Tajo-master-CODEGEN-build #192 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/192/ ) TAJO-1293 : Tajo have to accept hostname beginning with digits. (jihun: rev d1a46c6b6e3d4f6c74519cffab1c0562640fb0e5) tajo-common/src/main/java/org/apache/tajo/validation/NetworkAddressValidator.java CHANGES
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #553 (See https://builds.apache.org/job/Tajo-master-build/553/)
        TAJO-1293: Tajo have to accept hostname beginning with digits. (jihun: rev d1a46c6b6e3d4f6c74519cffab1c0562640fb0e5)

        • CHANGES
        • tajo-common/src/main/java/org/apache/tajo/validation/NetworkAddressValidator.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #553 (See https://builds.apache.org/job/Tajo-master-build/553/ ) TAJO-1293 : Tajo have to accept hostname beginning with digits. (jihun: rev d1a46c6b6e3d4f6c74519cffab1c0562640fb0e5) CHANGES tajo-common/src/main/java/org/apache/tajo/validation/NetworkAddressValidator.java
        Hide
        ykrips Jihun Kang added a comment -

        Thank you for uploading a patch. This patch has passed all test cases in Apache Tajo project. It will be merged into master branch in a short time.

        Show
        ykrips Jihun Kang added a comment - Thank you for uploading a patch. This patch has passed all test cases in Apache Tajo project. It will be merged into master branch in a short time.
        Hide
        cepiross Jinhang Choi added a comment -

        I'm so sorry for not considering testNetworkAddressValidator. I changed regex based on RFC2396 as following: ^\\w\\w-(\\.\\w\\w-)
        .[a-zA-Z]\\w-
        .?$|[a-zA-Z]\\w-*.?$

        Show
        cepiross Jinhang Choi added a comment - I'm so sorry for not considering testNetworkAddressValidator. I changed regex based on RFC2396 as following: ^\\w \\w- (\\.\\w \\w- ) . [a-zA-Z] \\w- .?$| [a-zA-Z] \\w- *.?$
        Hide
        ykrips Jihun Kang added a comment -

        Jinhang Choi, could you check testNetworkAddressValidator function in TestValidators class? A specified invalid hostname, '50000', should be removed and valid hostnames which start with numerics would be added in this test case.

        Show
        ykrips Jihun Kang added a comment - Jinhang Choi , could you check testNetworkAddressValidator function in TestValidators class? A specified invalid hostname, '50000', should be removed and valid hostnames which start with numerics would be added in this test case.
        Hide
        ykrips Jihun Kang added a comment - - edited

        Thank you for posting a patch for this issue.

        Show
        ykrips Jihun Kang added a comment - - edited Thank you for posting a patch for this issue.

          People

          • Assignee:
            cepiross Jinhang Choi
            Reporter:
            cepiross Jinhang Choi
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.5h
              0.5h
              Remaining:
              Remaining Estimate - 0.5h
              0.5h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development