For text traces the end of a trace is indicated by a NULL_LOCATION.
The NULL_LOCATION has a null pointer for the location info object
(=TmfLongLocation). In an experiment some traces are finished being
read before other traces. When a checkpoint needs to be created
with a NULL_LOCATION for some of the traces an NullPointerExeption
is generated when serializing a checkpoint to the persistent index.
Change-Id: I16aa3afd1d7ab633b53916f7f3a01aefa9094560
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/22846
Tested-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
IP-Clean: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
*/
public class CustomTxtTrace extends TmfTrace implements ITmfEventParser, ITmfPersistentlyIndexable {
- private static final TmfLongLocation NULL_LOCATION = new TmfLongLocation((Long) null);
+ private static final TmfLongLocation NULL_LOCATION = new TmfLongLocation(-1L);
private static final int DEFAULT_CACHE_SIZE = 100;
private static final int MAX_LINES = 100;
private static final int MAX_CONFIDENCE = 100;
*/
public class CustomXmlTrace extends TmfTrace implements ITmfEventParser, ITmfPersistentlyIndexable {
- private static final TmfLongLocation NULL_LOCATION = new TmfLongLocation((Long) null);
+ private static final TmfLongLocation NULL_LOCATION = new TmfLongLocation(-1L);
private static final int DEFAULT_CACHE_SIZE = 100;
private static final int MAX_LINES = 100;
private static final int CONFIDENCE = 100;
*/
public abstract class TextTrace<T extends TmfEvent> extends TmfTrace implements ITmfEventParser, ITmfPersistentlyIndexable {
- private static final TmfLongLocation NULL_LOCATION = new TmfLongLocation((Long) null);
+ private static final TmfLongLocation NULL_LOCATION = new TmfLongLocation(-1L);
private static final int MAX_LINES = 100;
private static final int MAX_CONFIDENCE = 100;