[ 
https://issues.apache.org/jira/browse/HBASE-18775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16176986#comment-16176986
 ] 

stack commented on HBASE-18775:
-------------------------------

On the patch, I am unclear on why we need to have a 'global' qualifier. The 
HRegion#isReadOnly for read replicas is partial? On the replicas only?  The 
flag is set on a region only. By Read Replicas?

Can we not just have the below config be hbase.readonly

 public static final String GLOBAL_READ_ONLY_ENABLED = 
"hbase.global.readonly.enabled";

You'd set it to true to make an hbase process readonly.. why we have the 
'global' qualifier? If the master see the flag, it does master specfics to make 
the master read-only. If RS sees the flag it does similar.

The method checkModifiable should be checkReadOnly?

The boolean should be cached, set on construction so you don't have to 
synchronize?

+  public boolean isGlobalReadOnly() {
+    if (globalReadOnly == null) {
+      globalReadOnly = conf.getBoolean(HConstants.GLOBAL_READ_ONLY_ENABLED, 
false);
+    }
+    return globalReadOnly.booleanValue();

In HRegion, why we have isGlobalReadOnly when we have a isReadOnly?

Thanks Zach.



> Add a Global Read-Only property to turn off all writes for the cluster
> ----------------------------------------------------------------------
>
>                 Key: HBASE-18775
>                 URL: https://issues.apache.org/jira/browse/HBASE-18775
>             Project: HBase
>          Issue Type: Sub-task
>          Components: master, regionserver
>    Affects Versions: HBASE-18477
>            Reporter: Zach York
>            Assignee: Zach York
>         Attachments: HBASE-18775.HBASE-18477.001.patch, 
> HBASE-18775.HBASE-18477.002.patch, HBASE-18775.HBASE-18477.003.patch, 
> HBASE-18775.HBASE-18477.004.patch
>
>
> As part of HBASE-18477, we need a way to turn off all modification for a 
> cluster. This patch extends the read only mode used by replication to disable 
> all data and metadata operations.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to