|
@@ -179,7 +179,7 @@ public class FileSystemApplicationHistoryStore extends AbstractService
|
|
|
LOG.info("Completed reading history information of application " + appId);
|
|
|
return historyData;
|
|
|
} catch (IOException e) {
|
|
|
- LOG.error("Error when reading history file of application " + appId);
|
|
|
+ LOG.error("Error when reading history file of application " + appId, e);
|
|
|
throw e;
|
|
|
} finally {
|
|
|
hfReader.close();
|
|
@@ -296,7 +296,7 @@ public class FileSystemApplicationHistoryStore extends AbstractService
|
|
|
return historyData;
|
|
|
} catch (IOException e) {
|
|
|
LOG.error("Error when reading history file of application attempt"
|
|
|
- + appAttemptId);
|
|
|
+ + appAttemptId, e);
|
|
|
throw e;
|
|
|
} finally {
|
|
|
hfReader.close();
|
|
@@ -344,7 +344,7 @@ public class FileSystemApplicationHistoryStore extends AbstractService
|
|
|
+ containerId);
|
|
|
return historyData;
|
|
|
} catch (IOException e) {
|
|
|
- LOG.error("Error when reading history file of container " + containerId);
|
|
|
+ LOG.error("Error when reading history file of container " + containerId, e);
|
|
|
throw e;
|
|
|
} finally {
|
|
|
hfReader.close();
|
|
@@ -420,7 +420,7 @@ public class FileSystemApplicationHistoryStore extends AbstractService
|
|
|
+ appStart.getApplicationId());
|
|
|
} catch (IOException e) {
|
|
|
LOG.error("Error when openning history file of application "
|
|
|
- + appStart.getApplicationId());
|
|
|
+ + appStart.getApplicationId(), e);
|
|
|
throw e;
|
|
|
}
|
|
|
outstandingWriters.put(appStart.getApplicationId(), hfWriter);
|
|
@@ -437,7 +437,7 @@ public class FileSystemApplicationHistoryStore extends AbstractService
|
|
|
+ appStart.getApplicationId() + " is written");
|
|
|
} catch (IOException e) {
|
|
|
LOG.error("Error when writing start information of application "
|
|
|
- + appStart.getApplicationId());
|
|
|
+ + appStart.getApplicationId(), e);
|
|
|
throw e;
|
|
|
}
|
|
|
}
|
|
@@ -456,7 +456,7 @@ public class FileSystemApplicationHistoryStore extends AbstractService
|
|
|
+ appFinish.getApplicationId() + " is written");
|
|
|
} catch (IOException e) {
|
|
|
LOG.error("Error when writing finish information of application "
|
|
|
- + appFinish.getApplicationId());
|
|
|
+ + appFinish.getApplicationId(), e);
|
|
|
throw e;
|
|
|
} finally {
|
|
|
hfWriter.close();
|
|
@@ -480,7 +480,7 @@ public class FileSystemApplicationHistoryStore extends AbstractService
|
|
|
+ appAttemptStart.getApplicationAttemptId() + " is written");
|
|
|
} catch (IOException e) {
|
|
|
LOG.error("Error when writing start information of application attempt "
|
|
|
- + appAttemptStart.getApplicationAttemptId());
|
|
|
+ + appAttemptStart.getApplicationAttemptId(), e);
|
|
|
throw e;
|
|
|
}
|
|
|
}
|
|
@@ -501,7 +501,7 @@ public class FileSystemApplicationHistoryStore extends AbstractService
|
|
|
+ appAttemptFinish.getApplicationAttemptId() + " is written");
|
|
|
} catch (IOException e) {
|
|
|
LOG.error("Error when writing finish information of application attempt "
|
|
|
- + appAttemptFinish.getApplicationAttemptId());
|
|
|
+ + appAttemptFinish.getApplicationAttemptId(), e);
|
|
|
throw e;
|
|
|
}
|
|
|
}
|
|
@@ -521,7 +521,7 @@ public class FileSystemApplicationHistoryStore extends AbstractService
|
|
|
+ containerStart.getContainerId() + " is written");
|
|
|
} catch (IOException e) {
|
|
|
LOG.error("Error when writing start information of container "
|
|
|
- + containerStart.getContainerId());
|
|
|
+ + containerStart.getContainerId(), e);
|
|
|
throw e;
|
|
|
}
|
|
|
}
|
|
@@ -541,7 +541,7 @@ public class FileSystemApplicationHistoryStore extends AbstractService
|
|
|
+ containerFinish.getContainerId() + " is written");
|
|
|
} catch (IOException e) {
|
|
|
LOG.error("Error when writing finish information of container "
|
|
|
- + containerFinish.getContainerId());
|
|
|
+ + containerFinish.getContainerId(), e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -676,9 +676,10 @@ public class FileSystemApplicationHistoryStore extends AbstractService
|
|
|
|
|
|
private TFile.Reader reader;
|
|
|
private TFile.Reader.Scanner scanner;
|
|
|
+ FSDataInputStream fsdis;
|
|
|
|
|
|
public HistoryFileReader(Path historyFile) throws IOException {
|
|
|
- FSDataInputStream fsdis = fs.open(historyFile);
|
|
|
+ fsdis = fs.open(historyFile);
|
|
|
reader =
|
|
|
new TFile.Reader(fsdis, fs.getFileStatus(historyFile).getLen(),
|
|
|
getConfig());
|
|
@@ -707,7 +708,7 @@ public class FileSystemApplicationHistoryStore extends AbstractService
|
|
|
}
|
|
|
|
|
|
public void close() {
|
|
|
- IOUtils.cleanup(LOG, scanner, reader);
|
|
|
+ IOUtils.cleanup(LOG, scanner, reader, fsdis);
|
|
|
}
|
|
|
|
|
|
}
|