/** * Represents the maximum size of the memstore after which the contents of * the memstore are flushed to the filesystem. This defaults to a size of 64 * MB. * * @param memstoreFlushSize memory cache flush size for each hregion * @return the modifyable TD */ public ModifyableTableDescriptor setMemStoreFlushSize(long memstoreFlushSize) { return setValue(MEMSTORE_FLUSHSIZE_KEY, Long.toString(memstoreFlushSize)); }
/** * Setting the target region count of table normalization . * @param regionCount the target region count. * @return the modifyable TD */ public ModifyableTableDescriptor setNormalizerTargetRegionCount(final int regionCount) { return setValue(NORMALIZER_TARGET_REGION_COUNT_KEY, Integer.toString(regionCount)); }
/** * Setting the table normalization enable flag. * * @param isEnable True if enable normalization. * @return the modifyable TD */ public ModifyableTableDescriptor setNormalizationEnabled(final boolean isEnable) { return setValue(NORMALIZATION_ENABLED_KEY, Boolean.toString(isEnable)); }
private ModifyableTableDescriptor setValue(final Bytes key, final String value) { return setValue(key, toBytesOrNull(value, Bytes::toBytes)); }
public TableDescriptorBuilder setValue(final Bytes key, final Bytes value) { desc.setValue(key, value); return this; }
public TableDescriptorBuilder setValue(final String key, final String value) { desc.setValue(key, value); return this; }
/** * Sets the number of replicas per region. * * @param regionReplication the replication factor per region * @return the modifyable TD */ public ModifyableTableDescriptor setRegionReplication(int regionReplication) { return setValue(REGION_REPLICATION_KEY, Integer.toString(regionReplication)); }
/** * Sets the {@link Durability} setting for the table. This defaults to * Durability.USE_DEFAULT. * * @param durability enum value * @return the modifyable TD */ public ModifyableTableDescriptor setDurability(Durability durability) { return setValue(DURABILITY_KEY, durability.name()); }
/** * This sets the class associated with the flush policy which determines * determines the stores need to be flushed when flushing a region. The * class used by default is defined in * org.apache.hadoop.hbase.regionserver.FlushPolicy. * * @param clazz the class name * @return the modifyable TD */ public ModifyableTableDescriptor setFlushPolicyClassName(String clazz) { return setValue(FLUSH_POLICY_KEY, clazz); }
/** * This sets the class associated with the region split policy which * determines when a region split should occur. The class used by default is * defined in org.apache.hadoop.hbase.regionserver.RegionSplitPolicy * * @param clazz the class name * @return the modifyable TD */ public ModifyableTableDescriptor setRegionSplitPolicyClassName(String clazz) { return setValue(SPLIT_POLICY_KEY, clazz); }
/** * Setting the target region size of table normalization. * @param regionSize the target region size. * @return the modifyable TD */ public ModifyableTableDescriptor setNormalizerTargetRegionSize(final long regionSize) { return setValue(NORMALIZER_TARGET_REGION_SIZE_KEY, Long.toString(regionSize)); }
/** * Remove metadata represented by the key from the {@link #values} map * * @param key Key whose key and value we're to remove from TableDescriptor * parameters. * @return the modifyable TD */ public ModifyableTableDescriptor removeValue(Bytes key) { return setValue(key, (Bytes) null); }
/** * Setter for storing a configuration setting in map. * @param key Config key. Same as XML config key e.g. hbase.something.or.other. * @param value String value. If null, removes the setting. */ public HTableDescriptor setConfiguration(String key, String value) { getDelegateeForModification().setValue(key, value); return this; }
/** * Setter for storing metadata as a (key, value) pair in map * * @param key The key. * @param value The value. If null, removes the setting. */ public HTableDescriptor setValue(byte[] key, byte[] value) { getDelegateeForModification().setValue(key, value); return this; }
/** * Setting the table as read only sets all the columns in the table as read * only. By default all tables are modifiable, but if the readOnly flag is * set to true then the contents of the table can only be read but not * modified. * * @param readOnly True if all of the columns in the table should be read * only. * @return the modifyable TD */ public ModifyableTableDescriptor setReadOnly(final boolean readOnly) { return setValue(READONLY_KEY, Boolean.toString(readOnly)); }
public TableDescriptorBuilder setValue(final byte[] key, final byte[] value) { desc.setValue(key, value); return this; }
public ModifyableTableDescriptor setValue(String key, String value) { return setValue(toBytesOrNull(key, Bytes::toBytes), toBytesOrNull(value, Bytes::toBytes)); }
/** * Setter for storing metadata as a (key, value) pair in {@link #values} map * * @param key The key. * @param value The value. If null, removes the setting. * @return the modifyable TD * @see #values */ public ModifyableTableDescriptor setValue(byte[] key, byte[] value) { return setValue(toBytesOrNull(key, v -> v), toBytesOrNull(value, v -> v)); }
/** * Setter for storing metadata as a (key, value) pair in map * * @param key The key. * @param value The value. If null, removes the setting. */ public HTableDescriptor setValue(String key, String value) { getDelegateeForModification().setValue(key, value); return this; }
/** * Setting the table compaction enable flag. * * @param isEnable True if enable compaction. * @return the modifyable TD */ public ModifyableTableDescriptor setCompactionEnabled(final boolean isEnable) { return setValue(COMPACTION_ENABLED_KEY, Boolean.toString(isEnable)); }