Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/rescrv/HyperDex
Browse files Browse the repository at this point in the history
  • Loading branch information
neikos committed Jan 29, 2013
2 parents bd68400 + f1deb53 commit 1b6b8dc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 21 deletions.
1 change: 0 additions & 1 deletion daemon/replication_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ class replication_manager
bool m_need_retransmit;
std::list<std::pair<region_id, uint64_t> > m_lower_bounds;
bool m_need_pause;
bool m_paused;
bool m_paused_retransmitter;
bool m_paused_garbage_collector;
};
Expand Down
37 changes: 17 additions & 20 deletions ycsb/hyperclient/HyperClientYCSB.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,49 +113,46 @@ public int read(String table, String key, Set<String> fields, HashMap<String,Byt
*/
public int scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String,ByteIterator>> result)
{
/*
// XXX I'm going to be lazy and not support "fields" for now. Patches
// welcome.

if (!m_scannable)
{
return 1000;
return 1;
}

m_mat.reset(startkey);

if (!m_mat.matches())
{
return 1001;
return 2;
}

long base = Long.parseLong(m_mat.group(2));
long lower = base << 32;
long upper = (base + recordcount) << 32;

HyperVector res = new HyperVector();
ReturnCode ret = m_client.range_search(table, "recno", lower, upper, res);
HashMap<String,Object> values = new HashMap<String,Object>();
Vector<Long> vrange = new Vector<Long>(2);
vrange.add(lower);
vrange.add(upper);
values.put("recno", vrange);

for (int i = 0; i < m_retries && ret != ReturnCode.SUCCESS; ++i)
try
{
ret = m_client.range_search(table, "recno", lower, upper, res);
}
SearchBase s = m_client.search(table, values);

if (ret == ReturnCode.SUCCESS)
{
for (int i = 0; i < res.size(); ++i)
while (s.hasNext())
{
HyperMap e = HyperMap.dynamic_cast(res.get(i));
HashMap<String, ByteIterator> e2 = new HashMap<String, ByteIterator>();
convert_to_java(fields, e, e2);
result.add(e2);
s.next();
}

return 0;
}
return ret.swigValue();
*/
return 0;
catch(Exception e)
{
return 3;
}
}

/**
Expand Down

0 comments on commit 1b6b8dc

Please sign in to comment.