Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-20703

When quota feature is off shell should give a nice message

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.0
    • Fix Version/s: None
    • Component/s: shell, Usability
    • Labels:

      Description

      When quota is off the shell gives a error that requires knowledge of our implementation details to understand:

      2.2.1 :001 > list_snapshot_sizes
      SNAPSHOT                                             SIZE                                                                                                                                                   
      
      ERROR: Unknown table hbase:quota!
      
      For usage try 'help "list_snapshot_sizes"'
      
      Took 1.6285 seconds                                                                                                                                                                                    
      2.2.1 :002 > list_quota_snapshots
       TABLE USAGE LIMIT IN_VIOLATION POLICY
      
      ERROR: Unknown table hbase:quota!
      
      For usage try 'help "list_quota_snapshots"'
      
      Took 0.0371 seconds                
      

      Or it just doesn't mention that quotas can't exist:

      2.2.1 :003 > list_quotas
      OWNER                                                QUOTAS                                                                                                                                                 
      0 row(s)
      Took 0.0475 seconds                                                                                                                                          
      2.2.1 :004 > list_quota_table_sizes
      TABLE                                                SIZE                                                                                                                                                   
      0 row(s)
      Took 0.1221 seconds                                                          
      

      set quota gives a better pointer that the problem is the feature is off:

      2.2.1 :005 > set_quota USER => 'busbey', GLOBAL_BYPASS => true
      
      ERROR: org.apache.hadoop.hbase.DoNotRetryIOException: java.lang.UnsupportedOperationException: quota support disabled
      	at org.apache.hadoop.hbase.quotas.MasterQuotaManager.checkQuotaSupport(MasterQuotaManager.java:442)
      	at org.apache.hadoop.hbase.quotas.MasterQuotaManager.setQuota(MasterQuotaManager.java:124)
      	at org.apache.hadoop.hbase.master.MasterRpcServices.setQuota(MasterRpcServices.java:1555)
      	at org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java)
      	at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409)
      	at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130)
      	at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324)
      	at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304)
      Caused by: java.lang.UnsupportedOperationException: quota support disabled
      	... 8 more
      
      For usage try 'help "set_quota"'
      

      Instead we should give a nice message, like you get if visibility labels is off:

      
      2.2.1 :06 > list_labels
      
      ERROR: DISABLED: Visibility labels feature is not available
      
      For usage try 'help "list_labels"'
      
      Took 0.0426 seconds                                                
      

        Attachments

        1. HBASE-20703.master.007.patch
          7 kB
          Xu Cang
        2. HBASE-20703.master.006.patch
          7 kB
          Xu Cang
        3. HBASE-20703.master.005.patch
          7 kB
          Xu Cang
        4. HBASE-20703.master.004.patch
          7 kB
          Xu Cang
        5. HBASE-20703.master.001.patch
          1 kB
          Xu Cang

          Activity

            People

            • Assignee:
              xucang Xu Cang
              Reporter:
              busbey Sean Busbey
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: