/** {@inheritDoc} */ @Override public boolean isSecurityEnabled() throws IOException { return mSystemTable.getSecurityVersion().compareTo(Versions.MIN_SECURITY_VERSION) >= 0; }
/** {@inheritDoc} */ @Override public boolean isSecurityEnabled() throws IOException { return mSystemTable.getSecurityVersion().compareTo(Versions.MIN_SECURITY_VERSION) >= 0; }
/** {@inheritDoc} */ @Override public void deleteTable(String tableName) throws IOException { final State state = mState.get(); Preconditions.checkState(state == State.OPEN, "Cannot delete table in Fiji instance %s in state %s.", this, state); if (mSystemVersion.compareTo(Versions.SYSTEM_2_0) < 0) { deleteTableSystem_1_0(tableName); } else if (mSystemVersion.compareTo(Versions.SYSTEM_2_0) == 0) { deleteTableSystem_2_0(tableName); } else { throw new InternalFijiError(String.format("Unknown System version %s.", mSystemVersion)); } }
final ProtocolVersion systemVersion = getSystemTable().getDataVersion(); if ((layoutVersion.compareTo(Versions.LAYOUT_VALIDATION_VERSION) >= 0) && (systemVersion.compareTo(Versions.MIN_SYS_VER_FOR_LAYOUT_VALIDATION) < 0)) { throw new InvalidLayoutException( String.format("Layout version: %s not supported by system version: %s",
/** {@inheritDoc} */ @Override public void uninstall( final FijiURI uri, final HBaseFactory hbaseFactory, final Configuration conf ) throws IOException { if (uri.getInstance() == null) { throw new FijiInvalidNameException(String.format( "Fiji URI '%s' does not specify a Fiji instance name", uri)); } final HBaseAdminFactory adminFactory = hbaseFactory.getHBaseAdminFactory(uri); final HTableInterfaceFactory htableFactory = hbaseFactory.getHTableInterfaceFactory(uri); // TODO: Factor this in HBaseFiji conf.set(HConstants.ZOOKEEPER_QUORUM, Joiner.on(",").join(uri.getZookeeperQuorumOrdered())); conf.setInt(HConstants.ZOOKEEPER_CLIENT_PORT, uri.getZookeeperClientPort()); LOG.info(String.format("Removing the fiji instance '%s'.", uri.getInstance())); final ProtocolVersion systemVersion = getSystemVersion(uri, conf, htableFactory); if (systemVersion.compareTo(Versions.SYSTEM_2_0) < 0) { uninstallSystem_1_0(uri, conf, adminFactory); } else if (systemVersion.compareTo(Versions.SYSTEM_2_0) == 0) { uninstallSystem_2_0(uri, conf, adminFactory); } else { throw new InternalFijiError(String.format("Unknown System version %s.", systemVersion)); } LOG.info("Removed fiji instance '{}'.", uri.getInstance()); }
final ProtocolVersion systemVersion = getSystemTable().getDataVersion(); if ((layoutVersion.compareTo(Versions.LAYOUT_VALIDATION_VERSION) >= 0) && (systemVersion.compareTo(Versions.MIN_SYS_VER_FOR_LAYOUT_VALIDATION) < 0)) { throw new InvalidLayoutException( String.format("Layout version: %s not supported by system version: %s",
} else { if (mSystemVersion.compareTo(Versions.SYSTEM_2_0) >= 0) { try {
if (mSystemVersion.compareTo(Versions.MIN_SYS_VER_FOR_LAYOUT_VALIDATION) >= 0) {
if (MAX_IMPORT_VER.compareTo(importVersion) < 0) { throw new InvalidTableImportDescriptorException("The maximum import version we support is " + MAX_IMPORT_VER + "; this import requires " + importVersion); } else if (MIN_IMPORT_VER.compareTo(importVersion) > 0) { throw new InvalidTableImportDescriptorException("The minimum import version we support is " + MIN_IMPORT_VER + "; this import requires " + importVersion);
if (mSystemVersion.compareTo(Versions.MIN_SYS_VER_FOR_LAYOUT_VALIDATION) >= 0) {
if (layoutVersion.compareTo(Versions.LAYOUT_VALIDATION_VERSION) < 0) { throw new InvalidLayoutException(String.format( "Cell type %s requires table layout version >= %s, " if (layoutVersion.compareTo(Versions.RAW_BYTES_CELL_ENCODING_VERSION) < 0) { throw new InvalidLayoutException(String.format( "Cell type %s requires table layout version >= %s, " if (layoutVersion.compareTo(Versions.PROTOBUF_CELL_ENCODING_VERSION) < 0) { throw new InvalidLayoutException(String.format( "Cell type %s requires table layout version >= %s, "
} else { if (mSystemVersion.compareTo(Versions.SYSTEM_2_0) >= 0) { try {
if (mSystemVersion.compareTo(Versions.SYSTEM_2_0) >= 0) {
if (Versions.MAX_LAYOUT_VERSION.compareTo(mLayoutVersion) < 0) { throw new InvalidLayoutException("The maximum layout version we support is " + Versions.MAX_LAYOUT_VERSION + "; this layout requires " + mLayoutVersion); } else if (Versions.MIN_LAYOUT_VERSION.compareTo(mLayoutVersion) > 0) { throw new InvalidLayoutException("The minimum layout version we support is " + Versions.MIN_LAYOUT_VERSION + "; this layout requires " + mLayoutVersion); if (Versions.BLOCK_SIZE_LAYOUT_VERSION.compareTo(mLayoutVersion) > 0) { if (mDesc.getMaxFilesize() != null) { if (Versions.CONFIGURE_COLUMN_NAME_TRANSLATION_VERSION.compareTo(mLayoutVersion) > 0) { if (mDesc.getColumnNameTranslator() != ColumnNameTranslator.SHORT) { throw new InvalidLayoutException( if (Versions.RKF2_LAYOUT_VERSION.compareTo(mLayoutVersion) > 0 && mDesc.getKeysFormat() instanceof RowKeyFormat2) { if (Versions.BLOCK_SIZE_LAYOUT_VERSION.compareTo(mLayoutVersion) > 0) { if (lgDesc.getBlockSize() != null) {
if (layoutVersion.compareTo(Versions.LAYOUT_VALIDATION_VERSION) < 0) {
if (mSystemVersion.compareTo(Versions.SYSTEM_2_0) >= 0) {
if (mSystemTable.getSecurityVersion().compareTo(Versions.MIN_SECURITY_VERSION) < 0) { mFiji.release(); throw new FijiSecurityException("Cannot create a FijiSecurityManager for security version "
throws IOException { final ProtocolVersion layoutVersion = ProtocolVersion.parse(tableLayoutDesc.getVersion()); if (Versions.LAYOUT_VALIDATION_VERSION.compareTo(layoutVersion) > 0) { throw new InvalidLayoutException("Schema validation is available from " + Versions.LAYOUT_VALIDATION_VERSION + " and up; this layout is " + layoutVersion);