Revert "Provide getConfiguration method for Region and Store interface (#3671)"

This reverts commit 4f6e0cf601.
This commit is contained in:
meiyi 2021-09-22 11:08:51 +08:00
parent 4f6e0cf601
commit 2599bd8eab
5 changed files with 2 additions and 28 deletions

View File

@ -44,10 +44,10 @@ import org.apache.yetus.audience.InterfaceAudience;
* Wraps a Configuration to make it read-only.
*/
@InterfaceAudience.Private
public class ReadOnlyConfiguration extends Configuration {
class ReadOnlyConfiguration extends Configuration {
private final Configuration conf;
public ReadOnlyConfiguration(final Configuration conf) {
ReadOnlyConfiguration(final Configuration conf) {
this.conf = conf;
}

View File

@ -119,7 +119,6 @@ import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
import org.apache.hadoop.hbase.conf.ConfigurationManager;
import org.apache.hadoop.hbase.conf.PropagatingConfigurationObserver;
import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
import org.apache.hadoop.hbase.coprocessor.ReadOnlyConfiguration;
import org.apache.hadoop.hbase.errorhandling.ForeignExceptionSnare;
import org.apache.hadoop.hbase.exceptions.FailedSanityCheckException;
import org.apache.hadoop.hbase.exceptions.TimeoutIOException;
@ -1963,11 +1962,6 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
}
}
@Override
public Configuration getReadOnlyConfiguration() {
return new ReadOnlyConfiguration(this.conf);
}
private ThreadPoolExecutor getStoreOpenAndCloseThreadPool(
final String threadNamePrefix) {
int numStores = Math.max(1, this.htableDescriptor.getColumnFamilyCount());

View File

@ -69,7 +69,6 @@ import org.apache.hadoop.hbase.client.RegionInfo;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.conf.ConfigurationManager;
import org.apache.hadoop.hbase.conf.PropagatingConfigurationObserver;
import org.apache.hadoop.hbase.coprocessor.ReadOnlyConfiguration;
import org.apache.hadoop.hbase.io.HeapSize;
import org.apache.hadoop.hbase.io.compress.Compression;
import org.apache.hadoop.hbase.io.crypto.Encryption;
@ -2802,11 +2801,6 @@ public class HStore implements Store, HeapSize, StoreConfigInformation,
return mixedRowReadsCount.sum();
}
@Override
public Configuration getReadOnlyConfiguration() {
return new ReadOnlyConfiguration(this.conf);
}
void updateMetricsStore(boolean memstoreRead) {
if (memstoreRead) {
memstoreOnlyRowReadsCount.increment();

View File

@ -22,7 +22,6 @@ import java.util.Collection;
import java.util.List;
import java.util.Map;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.Cell;
import org.apache.hadoop.hbase.CellComparator;
import org.apache.hadoop.hbase.CompareOperator;
@ -598,10 +597,4 @@ public interface Region extends ConfigurationObserver {
* max wait time period.
*/
boolean waitForFlushes(long timeout);
/**
* @return a read only configuration of this region; throws {@link UnsupportedOperationException}
* if you try to set a configuration.
*/
Configuration getReadOnlyConfiguration();
}

View File

@ -22,7 +22,6 @@ import java.util.Collection;
import java.util.OptionalDouble;
import java.util.OptionalLong;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.hbase.CellComparator;
import org.apache.hadoop.hbase.HBaseInterfaceAudience;
@ -293,10 +292,4 @@ public interface Store {
* @return the number of read requests from the files under this store.
*/
long getMixedRowReadsCount();
/**
* @return a read only configuration of this store; throws {@link UnsupportedOperationException}
* if you try to set a configuration.
*/
Configuration getReadOnlyConfiguration();
}