HBase
  1. HBase
  2. HBASE-11579

CopyTable should check endtime value only if != 0

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.99.0, 0.98.4
    • Fix Version/s: 0.99.0, 0.98.5, 2.0.0
    • Component/s: mapreduce
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      CopyTable automatically assign an endTime if startTime is specified and endTime is not:

          if (startTime != 0) {
            scan.setTimeRange(startTime,
                endTime == 0 ? HConstants.LATEST_TIMESTAMP : endTime);
          }
      

      However, we test if endTime is == 0 and exit before we get a chance to set the range:

            if (startTime > endTime) {
              printUsage("Invalid time range filter: starttime=" + startTime + " >  endtime=" + endTime);
              return false;
            }
      

      So we need to check endTime only if it's != 0.

      1. HBASE-11579-v0-trunk.patch
        0.8 kB
        Jean-Marc Spaggiari

        Activity

        Jean-Marc Spaggiari created issue -
        Jean-Marc Spaggiari made changes -
        Field Original Value New Value
        Attachment HBASE-11579-v0-trunk.patch [ 12657418 ]
        Jean-Marc Spaggiari made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12657418/HBASE-11579-v0-trunk.patch
        against trunk revision .
        ATTACHMENT ID: 12657418

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        -1 javadoc. The javadoc tool appears to have generated 1 warning messages.

        +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 lineLengths. The patch does not introduce lines longer than 100

        +1 site. The mvn site goal succeeds with this patch.

        -1 core tests. The patch failed these unit tests:
        org.apache.hadoop.hbase.io.hfile.TestCacheConfig

        Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12657418/HBASE-11579-v0-trunk.patch against trunk revision . ATTACHMENT ID: 12657418 +1 @author . The patch does not contain any @author tags. -1 tests included . The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javac . The applied patch does not increase the total number of javac compiler warnings. -1 javadoc . The javadoc tool appears to have generated 1 warning messages. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 lineLengths . The patch does not introduce lines longer than 100 +1 site . The mvn site goal succeeds with this patch. -1 core tests . The patch failed these unit tests: org.apache.hadoop.hbase.io.hfile.TestCacheConfig Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/10163//console This message is automatically generated.
        Jean-Marc Spaggiari made changes -
        Description CopyTable automatically assign an endTime if startTime is specified and endTime is node:
        {code}
            if (startTime != 0) {
              scan.setTimeRange(startTime,
                  endTime == 0 ? HConstants.LATEST_TIMESTAMP : endTime);
            }
        {code}

        However, we test if endTime is == 0 and exit before we get a chance to set the range:
        {code}
              if (startTime > endTime) {
                printUsage("Invalid time range filter: starttime=" + startTime + " > endtime=" + endTime);
                return false;
              }
        {code}

        So we need to check endTime only if it's != 0.
        CopyTable automatically assign an endTime if startTime is specified and endTime is not:
        {code}
            if (startTime != 0) {
              scan.setTimeRange(startTime,
                  endTime == 0 ? HConstants.LATEST_TIMESTAMP : endTime);
            }
        {code}

        However, we test if endTime is == 0 and exit before we get a chance to set the range:
        {code}
              if (startTime > endTime) {
                printUsage("Invalid time range filter: starttime=" + startTime + " > endtime=" + endTime);
                return false;
              }
        {code}

        So we need to check endTime only if it's != 0.
        Hide
        Liu Shaohui added a comment -

        Patch LGTM

        Show
        Liu Shaohui added a comment - Patch LGTM
        Hide
        Andrew Purtell added a comment -

        Committed to 0.98+

        Ping Enis Soztutar, small bug fix went in

        Show
        Andrew Purtell added a comment - Committed to 0.98+ Ping Enis Soztutar , small bug fix went in
        Andrew Purtell made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Fix Version/s 0.99.0 [ 12325675 ]
        Fix Version/s 0.98.5 [ 12326953 ]
        Fix Version/s 2.0.0 [ 12327188 ]
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in HBase-0.98 #418 (See https://builds.apache.org/job/HBase-0.98/418/)
        HBASE-11579 CopyTable should check endtime value only if != 0 (Jean-Marc Spaggiari) (apurtell: rev 2a53add01b89f750433dfb93cdaeead0baace3a4)

        • hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
        Show
        Hudson added a comment - SUCCESS: Integrated in HBase-0.98 #418 (See https://builds.apache.org/job/HBase-0.98/418/ ) HBASE-11579 CopyTable should check endtime value only if != 0 (Jean-Marc Spaggiari) (apurtell: rev 2a53add01b89f750433dfb93cdaeead0baace3a4) hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in HBase-0.98-on-Hadoop-1.1 #397 (See https://builds.apache.org/job/HBase-0.98-on-Hadoop-1.1/397/)
        HBASE-11579 CopyTable should check endtime value only if != 0 (Jean-Marc Spaggiari) (apurtell: rev 2a53add01b89f750433dfb93cdaeead0baace3a4)

        • hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
        Show
        Hudson added a comment - SUCCESS: Integrated in HBase-0.98-on-Hadoop-1.1 #397 (See https://builds.apache.org/job/HBase-0.98-on-Hadoop-1.1/397/ ) HBASE-11579 CopyTable should check endtime value only if != 0 (Jean-Marc Spaggiari) (apurtell: rev 2a53add01b89f750433dfb93cdaeead0baace3a4) hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
        Hide
        Hudson added a comment -

        FAILURE: Integrated in HBase-TRUNK #5341 (See https://builds.apache.org/job/HBase-TRUNK/5341/)
        HBASE-11579 CopyTable should check endtime value only if != 0 (Jean-Marc Spaggiari) (apurtell: rev 7b5a309697cd1fa249e2e6a002acff724c17b1b2)

        • hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
        Show
        Hudson added a comment - FAILURE: Integrated in HBase-TRUNK #5341 (See https://builds.apache.org/job/HBase-TRUNK/5341/ ) HBASE-11579 CopyTable should check endtime value only if != 0 (Jean-Marc Spaggiari) (apurtell: rev 7b5a309697cd1fa249e2e6a002acff724c17b1b2) hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in HBase-1.0 #69 (See https://builds.apache.org/job/HBase-1.0/69/)
        HBASE-11579 CopyTable should check endtime value only if != 0 (Jean-Marc Spaggiari) (apurtell: rev e742d88b42974d455839c58c7e604b2c2b99504c)

        • hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
        Show
        Hudson added a comment - SUCCESS: Integrated in HBase-1.0 #69 (See https://builds.apache.org/job/HBase-1.0/69/ ) HBASE-11579 CopyTable should check endtime value only if != 0 (Jean-Marc Spaggiari) (apurtell: rev e742d88b42974d455839c58c7e604b2c2b99504c) hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
        Hide
        Enis Soztutar added a comment -

        Closing this issue after 0.99.0 release.

        Show
        Enis Soztutar added a comment - Closing this issue after 0.99.0 release.
        Enis Soztutar made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Jean-Marc Spaggiari
            Reporter:
            Jean-Marc Spaggiari
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development