-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bench: intra- and inter-data center rename ops (#263)
* bench: intra- and inter-data center rename ops * optimize remote rename * sync code * fix typo * fix compile error
- Loading branch information
Showing
5 changed files
with
121 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import org.voltdb.*; | ||
|
||
// https://docs.voltdb.com/tutorial/Part5.php | ||
public class SetParents extends VoltProcedure { | ||
|
||
public final SQLStmt sql = new SQLStmt("UPDATE inodes SET parent = ? WHERE id = ?;"); | ||
|
||
public long run(final Long ids[], final long parent) throws VoltAbortException { | ||
if (int i = 0; i < ids.length; ++i) { | ||
voltQueueSQL(sql, parent, ids[i]); | ||
} | ||
voltExecuteSQL(); | ||
return 1; | ||
} | ||
} |