@@ -124,7 +124,7 @@ public void createTable(
124124 if (isTransactionMetadataDecouplingEnabled (options )) {
125125 // For transaction metadata decoupling mode
126126
127- throwIfTransactionMetadataDecouplingNotSupportedStorage (namespace );
127+ throwIfTransactionMetadataDecouplingUnsupported (namespace );
128128
129129 String dataTableName = table + TRANSACTION_METADATA_DECOUPLING_DATA_TABLE_SUFFIX ;
130130 String txMetadataTableName = table + TRANSACTION_METADATA_DECOUPLING_METADATA_TABLE_SUFFIX ;
@@ -291,7 +291,7 @@ public void repairTable(
291291 String namespace , String table , TableMetadata metadata , Map <String , String > options )
292292 throws ExecutionException {
293293 checkNamespace (namespace );
294- throwIfTransactionMetadataDecouplingTable (namespace , table , "repairTable()" );
294+ throwIfTransactionMetadataDecouplingApplied (namespace , table , "repairTable()" );
295295
296296 admin .repairTable (namespace , table , buildTransactionTableMetadata (metadata ), options );
297297 }
@@ -307,7 +307,7 @@ public void addNewColumnToTable(
307307 String namespace , String table , String columnName , DataType columnType )
308308 throws ExecutionException {
309309 checkNamespace (namespace );
310- throwIfTransactionMetadataDecouplingTable (namespace , table , "addNewColumnToTable()" );
310+ throwIfTransactionMetadataDecouplingApplied (namespace , table , "addNewColumnToTable()" );
311311
312312 TableMetadata tableMetadata = getTableMetadata (namespace , table );
313313 if (tableMetadata == null ) {
@@ -324,7 +324,7 @@ public void addNewColumnToTable(
324324 public void dropColumnFromTable (String namespace , String table , String columnName )
325325 throws ExecutionException {
326326 checkNamespace (namespace );
327- throwIfTransactionMetadataDecouplingTable (namespace , table , "dropColumnFromTable()" );
327+ throwIfTransactionMetadataDecouplingApplied (namespace , table , "dropColumnFromTable()" );
328328
329329 TableMetadata tableMetadata = getTableMetadata (namespace , table );
330330 if (tableMetadata == null ) {
@@ -342,7 +342,7 @@ public void renameColumn(
342342 String namespace , String table , String oldColumnName , String newColumnName )
343343 throws ExecutionException {
344344 checkNamespace (namespace );
345- throwIfTransactionMetadataDecouplingTable (namespace , table , "renameColumn()" );
345+ throwIfTransactionMetadataDecouplingApplied (namespace , table , "renameColumn()" );
346346
347347 TableMetadata tableMetadata = getTableMetadata (namespace , table );
348348 if (tableMetadata == null ) {
@@ -366,7 +366,7 @@ public void alterColumnType(
366366 String namespace , String table , String columnName , DataType newColumnType )
367367 throws ExecutionException {
368368 checkNamespace (namespace );
369- throwIfTransactionMetadataDecouplingTable (namespace , table , "alterColumnType()" );
369+ throwIfTransactionMetadataDecouplingApplied (namespace , table , "alterColumnType()" );
370370
371371 TableMetadata tableMetadata = getTableMetadata (namespace , table );
372372 if (tableMetadata == null ) {
@@ -388,7 +388,7 @@ public void alterColumnType(
388388 public void renameTable (String namespace , String oldTableName , String newTableName )
389389 throws ExecutionException {
390390 checkNamespace (namespace );
391- throwIfTransactionMetadataDecouplingTable (namespace , oldTableName , "renameTable()" );
391+ throwIfTransactionMetadataDecouplingApplied (namespace , oldTableName , "renameTable()" );
392392
393393 admin .renameTable (namespace , oldTableName , newTableName );
394394 }
@@ -412,7 +412,7 @@ public void importTable(
412412 if (isTransactionMetadataDecouplingEnabled (options )) {
413413 // For transaction metadata decoupling mode
414414
415- throwIfTransactionMetadataDecouplingNotSupportedStorage (namespace );
415+ throwIfTransactionMetadataDecouplingUnsupported (namespace );
416416
417417 String importedTableName = table + TRANSACTION_METADATA_DECOUPLING_IMPORTED_TABLE_SUFFIX ;
418418 String txMetadataTableName = table + TRANSACTION_METADATA_DECOUPLING_METADATA_TABLE_SUFFIX ;
@@ -536,7 +536,7 @@ private boolean isTransactionMetadataDecouplingEnabled(Map<String, String> optio
536536 && options .get (TRANSACTION_METADATA_DECOUPLING ).equalsIgnoreCase ("true" );
537537 }
538538
539- private void throwIfTransactionMetadataDecouplingNotSupportedStorage (String namespace )
539+ private void throwIfTransactionMetadataDecouplingUnsupported (String namespace )
540540 throws ExecutionException {
541541 StorageInfo storageInfo = admin .getStorageInfo (namespace );
542542 if ((storageInfo .getMutationAtomicityUnit () != StorageInfo .MutationAtomicityUnit .STORAGE
@@ -552,12 +552,14 @@ private void throwIfTransactionMetadataDecouplingNotSupportedStorage(String name
552552 }
553553 }
554554
555- private void throwIfTransactionMetadataDecouplingTable (
555+ private void throwIfTransactionMetadataDecouplingApplied (
556556 String namespace , String table , String method ) throws ExecutionException {
557557 if (admin .tableExists (namespace , table )
558558 && admin .getVirtualTableInfo (namespace , table ).isPresent ()) {
559559 throw new UnsupportedOperationException (
560- "Currently, " + method + " is not supported for transaction metadata decoupling tables" );
560+ "Currently, "
561+ + method
562+ + " is not supported for tables that applies transaction metadata decoupling" );
561563 }
562564 }
563565}
0 commit comments