Revert "Provide getConfiguration method for Region and Store interface (#3671)"
This reverts commit 4f6e0cf601
.
This commit is contained in:
parent
4f6e0cf601
commit
2599bd8eab
|
@ -44,10 +44,10 @@ import org.apache.yetus.audience.InterfaceAudience;
|
||||||
* Wraps a Configuration to make it read-only.
|
* Wraps a Configuration to make it read-only.
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Private
|
@InterfaceAudience.Private
|
||||||
public class ReadOnlyConfiguration extends Configuration {
|
class ReadOnlyConfiguration extends Configuration {
|
||||||
private final Configuration conf;
|
private final Configuration conf;
|
||||||
|
|
||||||
public ReadOnlyConfiguration(final Configuration conf) {
|
ReadOnlyConfiguration(final Configuration conf) {
|
||||||
this.conf = conf;
|
this.conf = conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,6 @@ import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
|
||||||
import org.apache.hadoop.hbase.conf.ConfigurationManager;
|
import org.apache.hadoop.hbase.conf.ConfigurationManager;
|
||||||
import org.apache.hadoop.hbase.conf.PropagatingConfigurationObserver;
|
import org.apache.hadoop.hbase.conf.PropagatingConfigurationObserver;
|
||||||
import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
|
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.errorhandling.ForeignExceptionSnare;
|
||||||
import org.apache.hadoop.hbase.exceptions.FailedSanityCheckException;
|
import org.apache.hadoop.hbase.exceptions.FailedSanityCheckException;
|
||||||
import org.apache.hadoop.hbase.exceptions.TimeoutIOException;
|
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(
|
private ThreadPoolExecutor getStoreOpenAndCloseThreadPool(
|
||||||
final String threadNamePrefix) {
|
final String threadNamePrefix) {
|
||||||
int numStores = Math.max(1, this.htableDescriptor.getColumnFamilyCount());
|
int numStores = Math.max(1, this.htableDescriptor.getColumnFamilyCount());
|
||||||
|
|
|
@ -69,7 +69,6 @@ import org.apache.hadoop.hbase.client.RegionInfo;
|
||||||
import org.apache.hadoop.hbase.client.Scan;
|
import org.apache.hadoop.hbase.client.Scan;
|
||||||
import org.apache.hadoop.hbase.conf.ConfigurationManager;
|
import org.apache.hadoop.hbase.conf.ConfigurationManager;
|
||||||
import org.apache.hadoop.hbase.conf.PropagatingConfigurationObserver;
|
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.HeapSize;
|
||||||
import org.apache.hadoop.hbase.io.compress.Compression;
|
import org.apache.hadoop.hbase.io.compress.Compression;
|
||||||
import org.apache.hadoop.hbase.io.crypto.Encryption;
|
import org.apache.hadoop.hbase.io.crypto.Encryption;
|
||||||
|
@ -2802,11 +2801,6 @@ public class HStore implements Store, HeapSize, StoreConfigInformation,
|
||||||
return mixedRowReadsCount.sum();
|
return mixedRowReadsCount.sum();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Configuration getReadOnlyConfiguration() {
|
|
||||||
return new ReadOnlyConfiguration(this.conf);
|
|
||||||
}
|
|
||||||
|
|
||||||
void updateMetricsStore(boolean memstoreRead) {
|
void updateMetricsStore(boolean memstoreRead) {
|
||||||
if (memstoreRead) {
|
if (memstoreRead) {
|
||||||
memstoreOnlyRowReadsCount.increment();
|
memstoreOnlyRowReadsCount.increment();
|
||||||
|
|
|
@ -22,7 +22,6 @@ import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.hadoop.conf.Configuration;
|
|
||||||
import org.apache.hadoop.hbase.Cell;
|
import org.apache.hadoop.hbase.Cell;
|
||||||
import org.apache.hadoop.hbase.CellComparator;
|
import org.apache.hadoop.hbase.CellComparator;
|
||||||
import org.apache.hadoop.hbase.CompareOperator;
|
import org.apache.hadoop.hbase.CompareOperator;
|
||||||
|
@ -598,10 +597,4 @@ public interface Region extends ConfigurationObserver {
|
||||||
* max wait time period.
|
* max wait time period.
|
||||||
*/
|
*/
|
||||||
boolean waitForFlushes(long timeout);
|
boolean waitForFlushes(long timeout);
|
||||||
|
|
||||||
/**
|
|
||||||
* @return a read only configuration of this region; throws {@link UnsupportedOperationException}
|
|
||||||
* if you try to set a configuration.
|
|
||||||
*/
|
|
||||||
Configuration getReadOnlyConfiguration();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,6 @@ import java.util.Collection;
|
||||||
import java.util.OptionalDouble;
|
import java.util.OptionalDouble;
|
||||||
import java.util.OptionalLong;
|
import java.util.OptionalLong;
|
||||||
|
|
||||||
import org.apache.hadoop.conf.Configuration;
|
|
||||||
import org.apache.hadoop.fs.FileSystem;
|
import org.apache.hadoop.fs.FileSystem;
|
||||||
import org.apache.hadoop.hbase.CellComparator;
|
import org.apache.hadoop.hbase.CellComparator;
|
||||||
import org.apache.hadoop.hbase.HBaseInterfaceAudience;
|
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.
|
* @return the number of read requests from the files under this store.
|
||||||
*/
|
*/
|
||||||
long getMixedRowReadsCount();
|
long getMixedRowReadsCount();
|
||||||
|
|
||||||
/**
|
|
||||||
* @return a read only configuration of this store; throws {@link UnsupportedOperationException}
|
|
||||||
* if you try to set a configuration.
|
|
||||||
*/
|
|
||||||
Configuration getReadOnlyConfiguration();
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue