2121
2222import org .apache .sysds .runtime .controlprogram .caching .OOCEvictionManager ;
2323import org .apache .sysds .runtime .controlprogram .parfor .LocalTaskQueue ;
24+ import org .apache .sysds .runtime .controlprogram .parfor .util .IDSequence ;
2425import org .apache .sysds .runtime .instructions .spark .data .IndexedMatrixValue ;
2526
2627import java .io .IOException ;
2728import java .util .ArrayList ;
28- import java .util .UUID ;
29+ // import java.util.UUID;
2930
3031/**
3132 * A wrapper around LocalTaskQueue to consume the source stream and reset to
@@ -39,8 +40,9 @@ public class ResettableStream extends LocalTaskQueue<IndexedMatrixValue> {
3940 // original live stream
4041 private final LocalTaskQueue <IndexedMatrixValue > _source ;
4142
43+ private static final IDSequence _streamSeq = new IDSequence ();
4244 // stream identifier
43- private final String _streamId ;
45+ private final long _streamId ;
4446
4547 // list of block keys (only the keys)
4648 private final ArrayList <String > _blockKeys ;
@@ -53,9 +55,9 @@ public class ResettableStream extends LocalTaskQueue<IndexedMatrixValue> {
5355// private OOCEvictionManager _manager;
5456
5557 public ResettableStream (LocalTaskQueue <IndexedMatrixValue > source ) {
56- this (source , UUID . randomUUID (). toString ());
58+ this (source , _streamSeq . getNextID ());
5759 }
58- public ResettableStream (LocalTaskQueue <IndexedMatrixValue > source , String streamId ) {
60+ public ResettableStream (LocalTaskQueue <IndexedMatrixValue > source , long streamId ) {
5961 _source = source ;
6062 _streamId = streamId ;
6163 _blockKeys = new ArrayList <>();
0 commit comments