Skip to content

Commit

Permalink
Remove incorrect getReadTimeNanos() implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Feb 5, 2019
1 parent c3675ee commit c48c8b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
Expand Up @@ -75,8 +75,6 @@ public class AccumuloRecordCursor
private final AccumuloRowSerializer serializer;

private long bytesRead;
private long nanoStart;
private long nanoEnd;

public AccumuloRecordCursor(
AccumuloRowSerializer serializer,
Expand Down Expand Up @@ -147,7 +145,7 @@ public long getCompletedBytes()
@Override
public long getReadTimeNanos()
{
return nanoStart > 0L ? (nanoEnd == 0 ? System.nanoTime() : nanoEnd) - nanoStart : 0L;
return 0;
}

@Override
Expand All @@ -160,10 +158,6 @@ public Type getType(int field)
@Override
public boolean advanceNextPosition()
{
if (nanoStart == 0) {
nanoStart = System.nanoTime();
}

try {
if (iterator.hasNext()) {
serializer.reset();
Expand Down Expand Up @@ -270,7 +264,6 @@ else if (type instanceof VarcharType) {
public void close()
{
scanner.close();
nanoEnd = System.nanoTime();
}

/**
Expand Down
Expand Up @@ -37,8 +37,6 @@ public class KuduRecordCursor
protected RowResult currentRow;

private long totalBytes;
private long nanoStart;
private long nanoEnd;
private boolean started;

public KuduRecordCursor(KuduScanner scanner, List<Type> columnTypes)
Expand All @@ -65,7 +63,7 @@ public long getCompletedBytes()
@Override
public long getReadTimeNanos()
{
return nanoStart > 0L ? (nanoEnd == 0 ? System.nanoTime() : nanoEnd) - nanoStart : 0L;
return 0;
}

@Override
Expand All @@ -89,7 +87,6 @@ public boolean advanceNextPosition()

if (!started) {
started = true;
nanoStart = System.nanoTime();
}

if (needNextRows) {
Expand Down Expand Up @@ -186,7 +183,6 @@ public boolean isNull(int field)
@Override
public void close()
{
nanoEnd = System.nanoTime();
currentRow = null;
nextRows = null;
}
Expand Down

0 comments on commit c48c8b6

Please sign in to comment.