Skip to content

Commit

Permalink
logging
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoika committed Jul 29, 2017
1 parent 1f200d2 commit 3774ffa
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void doArchive(String path, ItemCollection document) throws PluginExcepti
throw new PluginException(ArchivePlugin.class.getName(), ARCHIVE_TRANSACTION_ERROR,
"creating transaction file failed!");
}
logger.info("renamed successful");
logger.fine("renamed successful");

StringWriter writer = new StringWriter();

Expand Down Expand Up @@ -157,13 +157,13 @@ public void afterBegin() throws EJBException, RemoteException {
*/
@Override
public void afterCompletion(boolean committed) throws EJBException, RemoteException {
logger.info("after completion... committed=" + committed);
logger.fine("after completion... committed=" + committed);
HDFSClient hdfsClient = new HDFSClient();

// Rollback...
if (committed == false) {
// role back
logger.info("Rollback transaction...");
logger.fine("Rollback transaction...");
for (String path : transactionCache) {
int i = path.lastIndexOf("_");
String target = path.substring(0, i);
Expand All @@ -183,9 +183,9 @@ public void afterCompletion(boolean committed) throws EJBException, RemoteExcept
}
} else {
// commit ok - remove transaction files
logger.info("clean transactioncache...");
logger.fine("clean transactioncache...");
for (String path : transactionCache) {
logger.info("delete " + path);
logger.fine("delete " + path);
try {
hdfsClient.deleteData(path);
if (hdfsClient.getHadoopResponse().isError()) {
Expand All @@ -196,7 +196,7 @@ public void afterCompletion(boolean committed) throws EJBException, RemoteExcept
throw new EJBException(ARCHIVE_ROLBACK_ERROR + ":" + e.getMessage(), e);
}
}
logger.info("transaction completed");
logger.fine("transaction completed");

}

Expand Down

0 comments on commit 3774ffa

Please sign in to comment.