public final class IgfsLogger extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DELIM_FIELD
Field delimiter.
|
static String |
DELIM_FIELD_VAL
Field values delimiter.
|
static String |
HDR
Pre-defined header string.
|
static int |
TYPE_CLOSE_IN
Close input stream.
|
static int |
TYPE_CLOSE_OUT
Close output stream.
|
static int |
TYPE_DELETE
Delete.
|
static int |
TYPE_DIR_LIST
Directory listing.
|
static int |
TYPE_DIR_MAKE
Directory creation.
|
static int |
TYPE_MARK
Mark.
|
static int |
TYPE_OPEN_IN
File open.
|
static int |
TYPE_OPEN_OUT
File create or append.
|
static int |
TYPE_RANDOM_READ
Random read.
|
static int |
TYPE_RENAME
Rename.
|
static int |
TYPE_RESET
Reset.
|
static int |
TYPE_SEEK
Seek.
|
static int |
TYPE_SKIP
Skip.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close logger.
|
static IgfsLogger |
disabledLogger()
Get disabled logger.
|
boolean |
isLogEnabled()
Check whether logging is enabled.
|
void |
logAppend(long streamId,
IgfsPath path,
int bufSize)
Log file append event.
|
void |
logCloseIn(long streamId,
long userTime,
long readTime,
long total)
Log input stream close event.
|
void |
logCloseOut(long streamId,
long userTime,
long writeTime,
long total)
Log output stream close event.
|
void |
logCreate(long streamId,
IgfsPath path,
boolean overwrite,
int bufSize,
int replication,
long blockSize)
Log file create event.
|
void |
logDelete(IgfsPath path,
boolean recursive)
Log delete event.
|
static IgfsLogger |
logger(String endpoint,
String igfsName,
String dir,
int batchSize)
Get logger instance for the given endpoint.
|
void |
logListDirectory(IgfsPath path,
String[] files)
Log directory listing event.
|
void |
logMakeDirectory(IgfsPath path)
Log directory creation event.
|
void |
logMark(long streamId,
long readLimit)
Log mark event.
|
void |
logOpen(long streamId,
IgfsPath path,
int bufSize,
long dataLen)
Log file open event.
|
void |
logRandomRead(long streamId,
long pos,
int readLen)
Log random read event.
|
void |
logRename(IgfsPath path,
IgfsPath destPath)
Log rename event.
|
void |
logReset(long streamId)
Log reset event.
|
void |
logSeek(long streamId,
long pos)
Log seek event.
|
void |
logSkip(long streamId,
long skipCnt)
Log skip event.
|
static long |
nextId()
Get next stream ID.
|
public static final String DELIM_FIELD
public static final String DELIM_FIELD_VAL
public static final String HDR
public static final int TYPE_OPEN_IN
public static final int TYPE_OPEN_OUT
public static final int TYPE_RANDOM_READ
public static final int TYPE_SEEK
public static final int TYPE_SKIP
public static final int TYPE_MARK
public static final int TYPE_RESET
public static final int TYPE_CLOSE_IN
public static final int TYPE_CLOSE_OUT
public static final int TYPE_DIR_MAKE
public static final int TYPE_DIR_LIST
public static final int TYPE_RENAME
public static final int TYPE_DELETE
public static long nextId()
public static IgfsLogger disabledLogger()
public static IgfsLogger logger(String endpoint, String igfsName, String dir, int batchSize)
endpoint
- Endpoint.igfsName
- IGFS name.dir
- Path.batchSize
- Batch size.public boolean isLogEnabled()
True
in case logging is enabled.public void logOpen(long streamId, IgfsPath path, int bufSize, long dataLen)
streamId
- Stream ID.path
- Path.bufSize
- Buffer size.dataLen
- Data length.public void logCreate(long streamId, IgfsPath path, boolean overwrite, int bufSize, int replication, long blockSize)
streamId
- Stream ID.path
- Path.overwrite
- Overwrite flag.bufSize
- Buffer size.replication
- Replication factor.blockSize
- Block size.public void logAppend(long streamId, IgfsPath path, int bufSize)
streamId
- Stream ID.path
- Path.bufSize
- Buffer size.public void logRandomRead(long streamId, long pos, int readLen)
streamId
- Stream ID.pos
- Position.readLen
- Read bytes count.public void logSeek(long streamId, long pos)
streamId
- Stream ID.pos
- Position.public void logSkip(long streamId, long skipCnt)
streamId
- Stream ID.skipCnt
- Skip bytes count.public void logMark(long streamId, long readLimit)
streamId
- Stream ID.readLimit
- Read limit.public void logReset(long streamId)
streamId
- Stream ID.public void logCloseIn(long streamId, long userTime, long readTime, long total)
streamId
- Stream ID.userTime
- User time.readTime
- Read time.total
- Total bytes read.public void logCloseOut(long streamId, long userTime, long writeTime, long total)
streamId
- Stream ID.userTime
- User time.writeTime
- Read time.total
- Total bytes read.public void logMakeDirectory(IgfsPath path)
path
- Path.public void logListDirectory(IgfsPath path, String[] files)
path
- Path.files
- Files.public void logRename(IgfsPath path, IgfsPath destPath)
path
- Path.destPath
- Destination path.public void logDelete(IgfsPath path, boolean recursive)
path
- Path.recursive
- Recursive flag.public void close()
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017