Skip to content

Commit 06dbebe

Browse files
committed
use IDSequence instead of UUID
1 parent c90985b commit 06dbebe

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/main/java/org/apache/sysds/runtime/instructions/ooc/ResettableStream.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@
2121

2222
import org.apache.sysds.runtime.controlprogram.caching.OOCEvictionManager;
2323
import org.apache.sysds.runtime.controlprogram.parfor.LocalTaskQueue;
24+
import org.apache.sysds.runtime.controlprogram.parfor.util.IDSequence;
2425
import org.apache.sysds.runtime.instructions.spark.data.IndexedMatrixValue;
2526

2627
import java.io.IOException;
2728
import 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

Comments
 (0)