!1333 Memory Connector: add more debug information to the data spill process
Merge pull request !1333 from peiwangdb/debug-spill
This commit is contained in:
commit
b68a4f4fa0
|
|
@ -159,6 +159,7 @@ public class MemoryTableManager
|
|||
|
||||
public void finishUpdatingTable(long id)
|
||||
{
|
||||
LOG.info("Finishing updating table. %d logicalParts in the table to be finished up.", tables.get(id).getLogicalPartCount());
|
||||
tables.get(id).finishCreation(() -> {
|
||||
// this should only be called once entire table has been processed
|
||||
if (tables.containsKey(id) && tables.get(id).allProcessed() && !tables.get(id).isSpilled()) {
|
||||
|
|
@ -409,6 +410,7 @@ public class MemoryTableManager
|
|||
catch (Exception e) {
|
||||
// if spilling failed mark it back to spilled
|
||||
table.setState(Table.TableState.COMMITTED);
|
||||
LOG.debug("[Spill] Table " + id + " Failed.");
|
||||
}
|
||||
long dur = System.currentTimeMillis() - start;
|
||||
LOG.debug("[Spill] Table " + id + " has been serialized to disk. Time elapsed: " + dur + "ms");
|
||||
|
|
|
|||
|
|
@ -248,6 +248,7 @@ public class Table
|
|||
public void finishCreation(Runnable cleanup)
|
||||
{
|
||||
tableState = TableState.COMMITTED;
|
||||
LOG.info("Finishing table creation. %d logicalParts to be processed", logicalParts.size());
|
||||
|
||||
List<Future<?>> futuresList = new ArrayList<>(logicalParts.size());
|
||||
for (int i = 0; i < logicalParts.size(); i++) {
|
||||
|
|
@ -257,6 +258,7 @@ public class Table
|
|||
}
|
||||
|
||||
int finalI = i;
|
||||
LOG.info("Started to process Table %d :: logicalPart %d", id, finalI + 1);
|
||||
Runnable runnable = () -> {
|
||||
LOG.info("Processing Table %d :: logicalPart %d", id, finalI + 1);
|
||||
try {
|
||||
|
|
@ -267,6 +269,7 @@ public class Table
|
|||
// 2. manager handles memory release
|
||||
// only once all LPs are processed this cleanup will be called by the last LP
|
||||
if (allProcessed()) {
|
||||
LOG.info("All the LogicalParts are successfully processed.");
|
||||
cleanup.run();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue