Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-1083

Update TestHDFSCLI to not to expect exception class name in the error messages

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: test
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      With the change from HADOOP-6686, the error messages from FsShell no longer includes redundant exception name. TestHDFSCLI needs to be updated to not to expect the exception name in command output.

      1. HDFS-1083.patch
        4 kB
        Suresh Srinivas
      2. ASF.LICENSE.NOT.GRANTED--HDFS-1083.1.patch
        6 kB
        Suresh Srinivas

        Issue Links

          Activity

          Hide
          Doug Cutting added a comment -

          In my patch for HDFS-1076 I removed unwrapped exception names from a few more tests, in particular:

          • saveNamespace: java.io.IOException
          • setQuota: org.apache.hadoop.hdfs.server.namenode.SafeModeException:
          • clrQuota: org.apache.hadoop.hdfs.server.namenode.SafeModeException:
          • setSpaceQuota: org.apache.hadoop.hdfs.server.namenode.SafeModeException:
          • clrSpaceQuota: org.apache.hadoop.hdfs.server.namenode.SafeModeException:

          Is there a reason you're leaving those in this patch?

          Show
          Doug Cutting added a comment - In my patch for HDFS-1076 I removed unwrapped exception names from a few more tests, in particular: saveNamespace: java.io.IOException setQuota: org.apache.hadoop.hdfs.server.namenode.SafeModeException: clrQuota: org.apache.hadoop.hdfs.server.namenode.SafeModeException: setSpaceQuota: org.apache.hadoop.hdfs.server.namenode.SafeModeException: clrSpaceQuota: org.apache.hadoop.hdfs.server.namenode.SafeModeException: Is there a reason you're leaving those in this patch?
          Hide
          Suresh Srinivas added a comment -

          I removed the exception name for failed tests from TestHDFSCLI. I think in the above tests, RemoteException is being thrown and the exception is not unwrapped when thrown to the client. I will have to make the above changes as part of HDFS-1079 where I have updated for all the method calls, the right list of expected exception to unwrap.

          Show
          Suresh Srinivas added a comment - I removed the exception name for failed tests from TestHDFSCLI. I think in the above tests, RemoteException is being thrown and the exception is not unwrapped when thrown to the client. I will have to make the above changes as part of HDFS-1079 where I have updated for all the method calls, the right list of expected exception to unwrap.
          Hide
          Doug Cutting added a comment -

          Hmm. Shouldn't both a RemoteException or the proper exception cause the same message to be printed? I think maybe we still need to change FsShell so that it doesn't handle RemoteException differently than other IOExceptions. Then you won't need to update these tests again when fixing HDFS-1079.

          Show
          Doug Cutting added a comment - Hmm. Shouldn't both a RemoteException or the proper exception cause the same message to be printed? I think maybe we still need to change FsShell so that it doesn't handle RemoteException differently than other IOExceptions. Then you won't need to update these tests again when fixing HDFS-1079 .
          Hide
          Suresh Srinivas added a comment -

          Doug, sorry I had not attached the latest patch. Here it is; all the exception names are removed and TestHDFSCLI no longer expects it.

          Show
          Suresh Srinivas added a comment - Doug, sorry I had not attached the latest patch. Here it is; all the exception names are removed and TestHDFSCLI no longer expects it.
          Hide
          Doug Cutting added a comment -

          +1 This looks good. Thanks, Suresh!

          Show
          Doug Cutting added a comment - +1 This looks good. Thanks, Suresh!
          Hide
          Suresh Srinivas added a comment -

          This change cannot be tested until change from HADOOP-6563 is available. I have locally tested this change. I committed the patch.

          Show
          Suresh Srinivas added a comment - This change cannot be tested until change from HADOOP-6563 is available. I have locally tested this change. I committed the patch.

            People

            • Assignee:
              Suresh Srinivas
              Reporter:
              Suresh Srinivas
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development