kgeisz opened a new pull request, #6931:
URL: https://github.com/apache/hbase/pull/6931

   https://issues.apache.org/jira/browse/HBASE-29236
   
   This pull request makes the `hbase.global.readonly.enabled` config variable 
dynamically configurable.  This variable is used with the ReadOnlyController 
coprocessor.  In order to make this class dynamically configurable, we have it 
implement the ConfigurationObserver interface.  We also need to register this 
observer with the ConfigurationManager.  Since the ReadOnlyController is used 
with both the master(s) and region server(s), the ReadOnlyController is 
registered to both HMaster and HRegionServer's ConfigurationManager.  Also, 
since the ReadOnlyController is a coprocessor, we need to use the 
CoprocessorHost in order to get the coprocessor and register it with the 
ConfigurationManager.
   
   `hbase.global.readonly.enabled` can be configured dynamically in the 
following way:
   
   1. Add `hbase.global.readonly.enabled` to hbase-site.xml:
   
   ```
   <property>
     <name>hbase.global.readonly.enabled</name>
     <value>false</value>
   </property>
   ```
   
   2. Add the ReadOnlyController coprocessor to the master and region server by 
adding the following to hbase-site.xml:
   
   ```
   <property>
     <name>hbase.coprocessor.master.classes</name>
     <value>org.apache.hadoop.hbase.security.access.ReadOnlyController</value>
   </property>
   <property>
     <name>hbase.coprocessor.regionserver.classes</name>
     <value>org.apache.hadoop.hbase.security.access.ReadOnlyController</value>
   </property>
   ```
   
   3. Start HBase
   4. Change `hbase.global.readonly.enabled` from `false` to `true` in 
hbase-site.xml and save the file.
   5. In the HBase shell, run `update_all_config`.
   6. You should see the following log message (once for master and once for 
region server):
   
   ```
   2025-04-23T15:23:59,008 INFO  
[RpcServer.priority.RWQ.Fifo.read.handler=3,queue=1,port=16000] 
access.ReadOnlyController: Config hbase.global.readonly.enabled has been 
dynamically changed to true
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to