Skip to content

Commit

Permalink
fix: test -> parquet support musn't trigger when parquet not required
Browse files Browse the repository at this point in the history
  • Loading branch information
Nolife999 committed Sep 12, 2024
1 parent 0820e4a commit d6ed426
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ public void execute(SendResponse resp) throws ArcException {
}

// drop tables from the client that had been requested from a former call
this.clientDao.dropPendingClientObjects();
this.clientDao.dropPendingClientTables();

executeIfParquetDeclared(() -> this.clientDao.deletePendingClientParquet());

// create the table that will track the data table which has been built and retrieved
createTrackTable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ public void execute(SendResponse resp) throws ArcException {

if (this.clientDao.isWebServiceNotPending()) {
this.clientDao.dropTable(table);
this.clientDao.deleteParquet(table);

if (arcClientIdentifier.getFormat().isParquet())
this.clientDao.deleteParquet(table);

this.clientDao.deleteFromTrackTable(table.getTableName());

LoggerHelper.info(LOGGER, "Table " + table.getTableName() + " had been retrieved and dropped.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,29 +485,14 @@ private String regExpClientTable()
return client + "_([0123456789]{13,})_.*";
}


/**
* drop objects generated by a client for called
* @throws ArcException
*/
public void dropPendingClientObjects() throws ArcException
{
LoggerHelper.info(LOGGER, "Dropping all client objects for client : "+this.client);

// drop tables from the client that had been requested from a former call
dropPendingClientTables();

// drop parquet files that had been requested from a former call
deletePendingParquet();
}


/**
* drop tables on coordinator and executors if it exists
* @throws ArcException
*/
private void dropPendingClientTables() throws ArcException
public void dropPendingClientTables() throws ArcException
{
LoggerHelper.info(LOGGER, "Dropping all pending tables for client : "+this.client);

dropPendingClientTables(0);

int numberOfExecutorNods = ArcDatabase.numberOfExecutorNods();
Expand Down Expand Up @@ -665,8 +650,11 @@ public void deleteParquet(TableToRetrieve table) throws ArcException {
FileUtilsArc.deleteIfExists(new File(ParquetDao.exportTablePath(table,getParquetDirectory())));
}

private void deletePendingParquet() throws ArcException
public void deletePendingClientParquet() throws ArcException
{

LoggerHelper.info(LOGGER, "Delete all pending parquet files for client : "+this.client);

File parquetDirectory = new File(getParquetDirectory());

if (!parquetDirectory.exists())
Expand Down

0 comments on commit d6ed426

Please sign in to comment.