/** * Gets the last known replication state of this db. This is * applicable only if it is the destination of a replication * and has had data replicated into it via imports previously. * Defaults to 0. */ public static long getLastReplicationId(HCatDatabase db){ Map<String, String> props = db.getProperties(); if (props != null){ if (props.containsKey(REPL_STATE_ID)){ return Long.parseLong(props.get(REPL_STATE_ID)); } } return 0l; // default is to return earliest possible state. }
assertTrue(testDb.getProperties().size() == 0); String warehouseDir = System .getProperty("test.warehouse.dir", "/user/hive/warehouse");
/** * Gets the last known replication state of this db. This is * applicable only if it is the destination of a replication * and has had data replicated into it via imports previously. * Defaults to 0. */ public static long getLastReplicationId(HCatDatabase db){ Map<String, String> props = db.getProperties(); if (props != null){ if (props.containsKey(REPL_STATE_ID)){ return Long.parseLong(props.get(REPL_STATE_ID)); } } return 0l; // default is to return earliest possible state. }
/** * Gets the last known replication state of this db. This is * applicable only if it is the destination of a replication * and has had data replicated into it via imports previously. * Defaults to 0. */ public static long getLastReplicationId(HCatDatabase db){ Map<String, String> props = db.getProperties(); if (props != null){ if (props.containsKey(REPL_STATE_ID)){ return Long.parseLong(props.get(REPL_STATE_ID)); } } return 0l; // default is to return earliest possible state. }
/** * Gets the last known replication state of this db. This is * applicable only if it is the destination of a replication * and has had data replicated into it via imports previously. * Defaults to 0. */ public static long getLastReplicationId(HCatDatabase db){ Map<String, String> props = db.getProperties(); if (props != null){ if (props.containsKey(REPL_STATE_ID)){ return Long.parseLong(props.get(REPL_STATE_ID)); } } return 0l; // default is to return earliest possible state. }