|
@@ -582,9 +582,9 @@ public class AggregatedLogFormat {
|
|
|
|
|
|
/**
|
|
/**
|
|
* Returns the owner of the application.
|
|
* Returns the owner of the application.
|
|
- *
|
|
|
|
|
|
+ *
|
|
* @return the application owner.
|
|
* @return the application owner.
|
|
- * @throws IOException
|
|
|
|
|
|
+ * @throws IOException if we can not get the application owner.
|
|
*/
|
|
*/
|
|
public String getApplicationOwner() throws IOException {
|
|
public String getApplicationOwner() throws IOException {
|
|
TFile.Reader.Scanner ownerScanner = null;
|
|
TFile.Reader.Scanner ownerScanner = null;
|
|
@@ -609,9 +609,9 @@ public class AggregatedLogFormat {
|
|
/**
|
|
/**
|
|
* Returns ACLs for the application. An empty map is returned if no ACLs are
|
|
* Returns ACLs for the application. An empty map is returned if no ACLs are
|
|
* found.
|
|
* found.
|
|
- *
|
|
|
|
|
|
+ *
|
|
* @return a map of the Application ACLs.
|
|
* @return a map of the Application ACLs.
|
|
- * @throws IOException
|
|
|
|
|
|
+ * @throws IOException if we can not get the application acls.
|
|
*/
|
|
*/
|
|
public Map<ApplicationAccessType, String> getApplicationAcls()
|
|
public Map<ApplicationAccessType, String> getApplicationAcls()
|
|
throws IOException {
|
|
throws IOException {
|
|
@@ -655,9 +655,10 @@ public class AggregatedLogFormat {
|
|
/**
|
|
/**
|
|
* Read the next key and return the value-stream.
|
|
* Read the next key and return the value-stream.
|
|
*
|
|
*
|
|
- * @param key
|
|
|
|
- * @return the valueStream if there are more keys or null otherwise.
|
|
|
|
- * @throws IOException
|
|
|
|
|
|
+ * @param key the log key
|
|
|
|
+ * @return the valueStream if there are more keys or null otherwise
|
|
|
|
+ * @throws IOException if we can not get the dataInputStream
|
|
|
|
+ * for the next key
|
|
*/
|
|
*/
|
|
public DataInputStream next(LogKey key) throws IOException {
|
|
public DataInputStream next(LogKey key) throws IOException {
|
|
if (!this.atBeginning) {
|
|
if (!this.atBeginning) {
|
|
@@ -682,10 +683,10 @@ public class AggregatedLogFormat {
|
|
* Get a ContainerLogsReader to read the logs for
|
|
* Get a ContainerLogsReader to read the logs for
|
|
* the specified container.
|
|
* the specified container.
|
|
*
|
|
*
|
|
- * @param containerId
|
|
|
|
|
|
+ * @param containerId the containerId
|
|
* @return object to read the container's logs or null if the
|
|
* @return object to read the container's logs or null if the
|
|
* logs could not be found
|
|
* logs could not be found
|
|
- * @throws IOException
|
|
|
|
|
|
+ * @throws IOException if we can not get the container log reader.
|
|
*/
|
|
*/
|
|
@Private
|
|
@Private
|
|
public ContainerLogsReader getContainerLogsReader(
|
|
public ContainerLogsReader getContainerLogsReader(
|
|
@@ -751,10 +752,10 @@ public class AggregatedLogFormat {
|
|
|
|
|
|
/**
|
|
/**
|
|
* Writes all logs for a single container to the provided writer.
|
|
* Writes all logs for a single container to the provided writer.
|
|
- * @param valueStream
|
|
|
|
- * @param writer
|
|
|
|
- * @param logUploadedTime
|
|
|
|
- * @throws IOException
|
|
|
|
|
|
+ * @param valueStream the valueStream
|
|
|
|
+ * @param writer the log writer
|
|
|
|
+ * @param logUploadedTime the time stamp
|
|
|
|
+ * @throws IOException if we can not read the container logs.
|
|
*/
|
|
*/
|
|
public static void readAcontainerLogs(DataInputStream valueStream,
|
|
public static void readAcontainerLogs(DataInputStream valueStream,
|
|
Writer writer, long logUploadedTime) throws IOException {
|
|
Writer writer, long logUploadedTime) throws IOException {
|
|
@@ -779,9 +780,9 @@ public class AggregatedLogFormat {
|
|
|
|
|
|
/**
|
|
/**
|
|
* Writes all logs for a single container to the provided writer.
|
|
* Writes all logs for a single container to the provided writer.
|
|
- * @param valueStream
|
|
|
|
- * @param writer
|
|
|
|
- * @throws IOException
|
|
|
|
|
|
+ * @param valueStream the value stream
|
|
|
|
+ * @param writer the log writer
|
|
|
|
+ * @throws IOException if we can not read the container logs.
|
|
*/
|
|
*/
|
|
public static void readAcontainerLogs(DataInputStream valueStream,
|
|
public static void readAcontainerLogs(DataInputStream valueStream,
|
|
Writer writer) throws IOException {
|
|
Writer writer) throws IOException {
|
|
@@ -848,10 +849,11 @@ public class AggregatedLogFormat {
|
|
* Keep calling this till you get a {@link EOFException} for getting logs of
|
|
* Keep calling this till you get a {@link EOFException} for getting logs of
|
|
* all types for a single container.
|
|
* all types for a single container.
|
|
*
|
|
*
|
|
- * @param valueStream
|
|
|
|
- * @param out
|
|
|
|
- * @param logUploadedTime
|
|
|
|
- * @throws IOException
|
|
|
|
|
|
+ * @param valueStream the value stream
|
|
|
|
+ * @param out the print stream
|
|
|
|
+ * @param logUploadedTime the time stamp
|
|
|
|
+ * @throws IOException if we can not read the container log by specifying
|
|
|
|
+ * the container log type.
|
|
*/
|
|
*/
|
|
public static void readAContainerLogsForALogType(
|
|
public static void readAContainerLogsForALogType(
|
|
DataInputStream valueStream, PrintStream out, long logUploadedTime)
|
|
DataInputStream valueStream, PrintStream out, long logUploadedTime)
|
|
@@ -863,11 +865,11 @@ public class AggregatedLogFormat {
|
|
* Keep calling this till you get a {@link EOFException} for getting logs of
|
|
* Keep calling this till you get a {@link EOFException} for getting logs of
|
|
* all types for a single container for the specific bytes.
|
|
* all types for a single container for the specific bytes.
|
|
*
|
|
*
|
|
- * @param valueStream
|
|
|
|
- * @param out
|
|
|
|
- * @param logUploadedTime
|
|
|
|
- * @param bytes
|
|
|
|
- * @throws IOException
|
|
|
|
|
|
+ * @param valueStream the value stream
|
|
|
|
+ * @param out the output print stream
|
|
|
|
+ * @param logUploadedTime the log upload time stamp
|
|
|
|
+ * @param bytes the output size of the log
|
|
|
|
+ * @throws IOException if we can not read the container log
|
|
*/
|
|
*/
|
|
public static void readAContainerLogsForALogType(
|
|
public static void readAContainerLogsForALogType(
|
|
DataInputStream valueStream, PrintStream out, long logUploadedTime,
|
|
DataInputStream valueStream, PrintStream out, long logUploadedTime,
|
|
@@ -879,9 +881,9 @@ public class AggregatedLogFormat {
|
|
* Keep calling this till you get a {@link EOFException} for getting logs of
|
|
* Keep calling this till you get a {@link EOFException} for getting logs of
|
|
* all types for a single container.
|
|
* all types for a single container.
|
|
*
|
|
*
|
|
- * @param valueStream
|
|
|
|
- * @param out
|
|
|
|
- * @throws IOException
|
|
|
|
|
|
+ * @param valueStream the value stream
|
|
|
|
+ * @param out the output print stream
|
|
|
|
+ * @throws IOException if we can not read the container log
|
|
*/
|
|
*/
|
|
public static void readAContainerLogsForALogType(
|
|
public static void readAContainerLogsForALogType(
|
|
DataInputStream valueStream, PrintStream out)
|
|
DataInputStream valueStream, PrintStream out)
|
|
@@ -892,11 +894,11 @@ public class AggregatedLogFormat {
|
|
/**
|
|
/**
|
|
* Keep calling this till you get a {@link EOFException} for getting logs of
|
|
* Keep calling this till you get a {@link EOFException} for getting logs of
|
|
* the specific types for a single container.
|
|
* the specific types for a single container.
|
|
- * @param valueStream
|
|
|
|
- * @param out
|
|
|
|
- * @param logUploadedTime
|
|
|
|
- * @param logType
|
|
|
|
- * @throws IOException
|
|
|
|
|
|
+ * @param valueStream the value stream
|
|
|
|
+ * @param out the output print stream
|
|
|
|
+ * @param logUploadedTime the log uploaded time stamp
|
|
|
|
+ * @param logType the given log type
|
|
|
|
+ * @throws IOException if we can not read the container logs
|
|
*/
|
|
*/
|
|
public static int readContainerLogsForALogType(
|
|
public static int readContainerLogsForALogType(
|
|
DataInputStream valueStream, PrintStream out, long logUploadedTime,
|
|
DataInputStream valueStream, PrintStream out, long logUploadedTime,
|
|
@@ -908,11 +910,11 @@ public class AggregatedLogFormat {
|
|
/**
|
|
/**
|
|
* Keep calling this till you get a {@link EOFException} for getting logs of
|
|
* Keep calling this till you get a {@link EOFException} for getting logs of
|
|
* the specific types for a single container.
|
|
* the specific types for a single container.
|
|
- * @param valueStream
|
|
|
|
- * @param out
|
|
|
|
- * @param logUploadedTime
|
|
|
|
- * @param logType
|
|
|
|
- * @throws IOException
|
|
|
|
|
|
+ * @param valueStream the value stream
|
|
|
|
+ * @param out the output print stream
|
|
|
|
+ * @param logUploadedTime the log uploaded time stamp
|
|
|
|
+ * @param logType the given log type
|
|
|
|
+ * @throws IOException if we can not read the container logs
|
|
*/
|
|
*/
|
|
public static int readContainerLogsForALogType(
|
|
public static int readContainerLogsForALogType(
|
|
DataInputStream valueStream, PrintStream out, long logUploadedTime,
|
|
DataInputStream valueStream, PrintStream out, long logUploadedTime,
|