@InterfaceAudience.Private public class CloseChecker extends Object
Modifier and Type | Field and Description |
---|---|
private long |
bytesWrittenProgressForCloseCheck |
private int |
closeCheckSizeLimit |
private long |
closeCheckTimeLimit |
private long |
lastCloseCheckMillis |
static String |
SIZE_LIMIT_KEY |
static String |
TIME_LIMIT_KEY |
Constructor and Description |
---|
CloseChecker(org.apache.hadoop.conf.Configuration conf,
long currentTime) |
Modifier and Type | Method and Description |
---|---|
boolean |
isSizeLimit(Store store,
long bytesWritten)
Check periodically to see if a system stop is requested every written bytes reach size limit.
|
boolean |
isTimeLimit(Store store,
long now)
Check periodically to see if a system stop is requested every time.
|
public static final String SIZE_LIMIT_KEY
public static final String TIME_LIMIT_KEY
private final int closeCheckSizeLimit
private final long closeCheckTimeLimit
private long bytesWrittenProgressForCloseCheck
private long lastCloseCheckMillis
public CloseChecker(org.apache.hadoop.conf.Configuration conf, long currentTime)
public boolean isSizeLimit(Store store, long bytesWritten)
public boolean isTimeLimit(Store store, long now)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.