Created
July 25, 2012 18:42
-
-
Save shrijeet/3177808 to your computer and use it in GitHub Desktop.
Program to reproduce bug in asynchbase client when delete followed by put is performed on set of tables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.hbase.async.DeleteRequest; | |
import org.hbase.async.HBaseClient; | |
import org.hbase.async.PutRequest; | |
public class PutDeleteBug { | |
public static void main(String args[]) throws Exception { | |
final HBaseClient client = new HBaseClient("pww-30"); | |
for (int i = 0; i < 2; i++) { | |
PutRequest put; | |
if (i % 2 == 0) { | |
put = new PutRequest("t1", String.valueOf(i), "f", "q", "v"); | |
} else { | |
put = new PutRequest("t0", String.valueOf(i), "f", "q", "v"); | |
} | |
final DeleteRequest delete = new DeleteRequest(put.table(), put.key()); | |
client.delete(delete); | |
client.put(put); | |
} | |
client.shutdown().joinUninterruptibly(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment