Skip to content

Commit

Permalink
Drop unnecessary useIndex flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ghelmling committed Jan 29, 2010
1 parent 34d816f commit 59808c2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
2 changes: 1 addition & 1 deletion src/java/meetup/beeno/Query.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public T executeSingle() throws HBaseException {

protected QueryStrategy getStrategy(FilterList baseFilter) {
QueryStrategy strat = null;
if (this.opts.shouldUseIndex() && !this.indexCriteria.isEmpty())
if (!this.indexCriteria.isEmpty())
strat = new ScanByIndex(this.entityInfo, this.opts, this.indexCriteria, baseFilter);
else
strat = new ScanNoIndex(this.entityInfo, this.opts, baseFilter);
Expand Down
12 changes: 0 additions & 12 deletions src/java/meetup/beeno/QueryOpts.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ public class QueryOpts implements Externalizable {
private byte[] startKey = null;
private Long startTime = null;
private int pageSize = DEFAULT_PAGE_SIZE;
private boolean useIndex = true;

public QueryOpts() {}

public QueryOpts(QueryOpts toCopy) {
this.startKey = toCopy.startKey;
this.pageSize = toCopy.pageSize;
this.startTime = toCopy.startTime;
this.useIndex = toCopy.useIndex;
}

public byte[] getStartKey() { return this.startKey; }
Expand All @@ -41,14 +39,6 @@ public void setStartKey(byte[] key) {
this.startKey = key;
}

public boolean shouldUseIndex() {
return useIndex;
}

public void setUseIndex( boolean useIndex ) {
this.useIndex = useIndex;
}

public Long getStartTime() { return this.startTime; }
public void setStartTime(Long time) { this.startTime = time; }

Expand All @@ -68,7 +58,6 @@ public void readExternal( ObjectInput in ) throws IOException,
}
startTime = IOUtil.readLong(in);
pageSize = in.readInt();
useIndex = in.readBoolean();
}

@Override
Expand All @@ -80,7 +69,6 @@ public void writeExternal( ObjectOutput out ) throws IOException {
}
IOUtil.writeNullable(out, this.startTime);
out.writeInt(this.pageSize);
out.writeBoolean(this.useIndex);
}

}

0 comments on commit 59808c2

Please sign in to comment.