Search in sources :

Example 6 with SyncStatus

use of alluxio.grpc.table.SyncStatus in project alluxio by Alluxio.

the class TableIntegrationTest method attachIgnore.

@Test
public void attachIgnore() throws Exception {
    Map<String, String> options = new HashMap<>();
    options.put(CatalogProperty.DB_IGNORE_TABLES.getName(), TEST_TABLE_ERROR + ",other,");
    // expect no errors if the bad table is ignored
    SyncStatus status = sTableMaster.attachDatabase("hive", "thrift://" + sHmsAddress + ":" + sHmsPort, DB_NAME_ERRORS, DB_NAME_ERRORS, options, false);
    assertEquals(0, status.getTablesErrorsCount());
    assertEquals(1, status.getTablesIgnoredCount());
    // expect no errors on a sync, if the bad table is ignored
    status = sTableMaster.syncDatabase(DB_NAME_ERRORS);
    assertEquals(0, status.getTablesErrorsCount());
    assertEquals(1, status.getTablesIgnoredCount());
}
Also used : HashMap(java.util.HashMap) SyncStatus(alluxio.grpc.table.SyncStatus) BaseIntegrationTest(alluxio.testutils.BaseIntegrationTest) Test(org.junit.Test)

Aggregations

SyncStatus (alluxio.grpc.table.SyncStatus)6 IOException (java.io.IOException)3 NotFoundException (alluxio.exception.status.NotFoundException)2 BaseIntegrationTest (alluxio.testutils.BaseIntegrationTest)2 NoSuchElementException (java.util.NoSuchElementException)2 Test (org.junit.Test)2 Journal (alluxio.proto.journal.Journal)1 LockResource (alluxio.resource.LockResource)1 UdbTable (alluxio.table.common.udb.UdbTable)1 UnderDatabase (alluxio.table.common.udb.UnderDatabase)1 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 File (java.io.File)1 FileNotFoundException (java.io.FileNotFoundException)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Properties (java.util.Properties)1 Callable (java.util.concurrent.Callable)1 ExecutorService (java.util.concurrent.ExecutorService)1