Skip to content

Commit

Permalink
Merge branch '1.6.0-SNAPSHOT'
Browse files Browse the repository at this point in the history
  • Loading branch information
keith-turner committed Apr 18, 2014
2 parents ca2d4eb + 0f3b4ca commit 5abb916
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Expand Up @@ -559,15 +559,15 @@ private void sendToServer(String location, TabletServerMutations<QCMutation> mut

SessionID sessionId = null;

try {

client = getClient(location);

try {
Map<TKeyExtent,List<TConditionalMutation>> tmutations = new HashMap<TKeyExtent,List<TConditionalMutation>>();

CompressedIterators compressedIters = new CompressedIterators();
convertMutations(mutations, cmidToCm, cmid, tmutations, compressedIters);

//getClient() call must come after converMutations in case it throws a TException
client = getClient(location);

List<TCMResult> tresults = null;
while (tresults == null) {
try {
Expand Down Expand Up @@ -615,7 +615,8 @@ private void sendToServer(String location, TabletServerMutations<QCMutation> mut
} catch (Exception e) {
queueException(location, cmidToCm, e);
} finally {
unreserveSessionID(location);
if(sessionId != null)
unreserveSessionID(location);
ThriftUtil.returnClient((TServiceClient) client);
}
}
Expand All @@ -637,7 +638,7 @@ private void invalidateSession(String location, TabletServerMutations<QCMutation
queueRetry(cmidToCm, location);
} else {
try {
invalidateSession(sessionId, location, mutations);
invalidateSession(sessionId, location);
for (CMK cmk : cmidToCm.values())
cmk.cm.queueResult(new Result(Status.UNKNOWN, cmk.cm, location));
} catch (Exception e2) {
Expand All @@ -652,15 +653,9 @@ private void invalidateSession(String location, TabletServerMutations<QCMutation
*
* If a conditional mutation is taking a long time to process, then this method will wait for it to finish... unless this exceeds timeout.
*/
private void invalidateSession(SessionID sessionId, String location, TabletServerMutations<QCMutation> mutations) throws AccumuloException,
private void invalidateSession(SessionID sessionId, String location) throws AccumuloException,
AccumuloSecurityException, TableNotFoundException {

ArrayList<QCMutation> mutList = new ArrayList<QCMutation>();

for (List<QCMutation> tml : mutations.getMutations().values()) {
mutList.addAll(tml);
}

long sleepTime = 50;

long startTime = System.currentTimeMillis();
Expand Down
Expand Up @@ -67,7 +67,12 @@ public void visit(State state, Environment env, Properties props) throws Excepti
m.put(cf, "seq", Utils.getSeq(0));

if (j % 1000 == 0 && j > 0) {
if (cw.write(m).getStatus() == Status.ACCEPTED)
Status status = cw.write(m).getStatus();

while(status == Status.UNKNOWN)
status = cw.write(m).getStatus();

if (status == Status.ACCEPTED)
acceptedCount++;
m = new ConditionalMutation(Utils.getBank(i));
}
Expand Down

0 comments on commit 5abb916

Please sign in to comment.