Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
None
-
None
-
Reviewed
Description
Caused by: org.apache.hadoop.hbase.ipc.RemoteWithExtrasException(java.io.IOException): java.io.IOException: Need clean namespaces or table-cfs config firstly when replicate_all flag is true at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:463) 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: org.apache.hadoop.hbase.replication.ReplicationException: Need clean namespaces or table-cfs config firstly when replicate_all flag is true at org.apache.hadoop.hbase.master.replication.ReplicationManager.checkPeerConfig(ReplicationManager.java:134) at org.apache.hadoop.hbase.master.replication.ReplicationManager.addReplicationPeer(ReplicationManager.java:74) at org.apache.hadoop.hbase.master.HMaster.addReplicationPeer(HMaster.java:3325) at org.apache.hadoop.hbase.master.MasterRpcServices.addReplicationPeer(MasterRpcServices.java:1891) at org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:404) ... 3 more
// setup the replication on the source if (!source.equals(sink)) { ReplicationAdmin replicationAdmin = new ReplicationAdmin(source.getConfiguration()); // remove any old replication peers for (String oldPeer : replicationAdmin.listPeerConfigs().keySet()) { replicationAdmin.removePeer(oldPeer); } // set the sink to be the target ReplicationPeerConfig peerConfig = new ReplicationPeerConfig(); peerConfig.setClusterKey(sink.toString()); // set the test table to be the table to replicate HashMap<TableName, ArrayList<String>> toReplicate = new HashMap<>(); toReplicate.put(tableName, new ArrayList<>(0)); replicationAdmin.addPeer("TestPeer", peerConfig, toReplicate);
It seems like some change in semantics of ReplicationPeerConfig weren't correctly updated after HBASE-16868 (or a related change maybe). IntegrationTestReplication is trying to replicate a single table but we get into a state where we actually construct a Config object that says "replicate all tables" and "replicate just this one table".
1. We should catch invalid config objects when we construct it via the builder
2. Some Builder interface methods are missing Javadoc
3. We should update IntegrationTestReplication to use the new API.
Attachments
Attachments
Issue Links
- relates to
-
HBASE-19738 Add client-side validation to ReplicationPeerConfigBuilder
- Open