Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Commit

Permalink
fix compile problems caused by merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Maysam Yabandeh committed May 17, 2012
1 parent 39a1128 commit 9edb62c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
10 changes: 10 additions & 0 deletions pom.xml
Expand Up @@ -86,6 +86,16 @@
<argLine>-Djava.library.path=${basedir}/src/main/native</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<additionalClasspathElements>
<additionalClasspathElement>${basedir}/conf</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/yahoo/omid/client/TransactionalTable.java
Expand Up @@ -229,8 +229,7 @@ public void put(TransactionState transactionState, Put put) throws IOException,
}

// should add the table as well
transactionState.addWrittenRow(new RowKeyFamily(put.getRow(), getTableName(), put.getFamilyMap()));
transactionState.addRow(new RowKeyFamily(tsput.getRow(), getTableName(), tsput.getFamilyMap()));
transactionState.addWrittenRow(new RowKeyFamily(tsput.getRow(), getTableName(), tsput.getFamilyMap()));

put(tsput);
}
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/com/yahoo/omid/tso/TSOHandler.java
Expand Up @@ -253,7 +253,6 @@ public void handle(TimestampRequest msg, ChannelHandlerContext ctx) {
*/
public void handle(CommitRequest msg, ChannelHandlerContext ctx) {
CommitResponse reply = new CommitResponse(msg.startTimestamp);
ByteArrayOutputStream baos = sharedState.baos;
DataOutputStream toWAL = sharedState.toWAL;
reply.committed = true;
//HashSet<Integer> lockedSet = new HashSet();
Expand Down Expand Up @@ -424,7 +423,7 @@ public void handle(CommitRequest msg, ChannelHandlerContext ctx) {
LOG.debug("Going to add record of size " + sharedState.baos.size());
}
//sharedState.lh.asyncAddEntry(baos.toByteArray(), this, sharedState.nextBatch);
sharedState.addRecord(baos.toByteArray(), new AddRecordCallback() {
sharedState.addRecord(sharedState.baos.toByteArray(), new AddRecordCallback() {
@Override
public void addRecordComplete(int rc, Object ctx) {
if (rc != Code.OK) {
Expand Down Expand Up @@ -552,7 +551,7 @@ public void flush() {
if(LOG.isDebugEnabled()){
LOG.debug("Adding record, size " + sharedState.baos.size());
}
sharedState.addRecord(baos.toByteArray(), new AddRecordCallback() {
sharedState.addRecord(sharedState.baos.toByteArray(), new AddRecordCallback() {
@Override
public void addRecordComplete(int rc, Object ctx) {
if (rc != Code.OK) {
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/com/yahoo/omid/tso/TSOState.java
Expand Up @@ -128,6 +128,9 @@ protected TimestampOracle getSO(){
*
* @param startTimestamp
*/
protected long processCommit(long startTimestamp, long commitTimestamp){
return processCommit(startTimestamp, commitTimestamp, largestDeletedTimestamp);
}
protected long processCommit(long startTimestamp, long commitTimestamp, long newmax){
newmax = hashmap.setCommitted(startTimestamp, commitTimestamp, newmax);
return newmax;
Expand Down Expand Up @@ -195,8 +198,9 @@ void stop(){

public TSOState(StateLogger logger, TimestampOracle timestampOracle) {
this.timestampOracle = timestampOracle;
this.largestDeletedTimestamp = this.previousLargestDeletedTimestamp = this.timestampOracle.get();
this.largestDeletedTimestamp = this.timestampOracle.get();
this.uncommited = new Uncommited(largestDeletedTimestamp);
this.elders = new Elders();
this.logger = logger;
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/yahoo/omid/tso/TestTimestamps.java
Expand Up @@ -36,4 +36,4 @@ public void testGetTimestamp() throws Exception {
assertTrue(tr2.timestamp > tr1.timestamp);
}

}
}

0 comments on commit 9edb62c

Please sign in to comment.