Commit aa88d8ae authored by Manuel Wudka-Robles's avatar Manuel Wudka-Robles
Browse files

Examples allow specifying current cluster version

parent 0af418b0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ Toy example demonstrating how to change the ACLs. It always sets a hard-coded se
-------------------
Changes the cluster version and verifies that requests with the old cluster version get rejected. Example usage:

    ./setclusterversion -host 127.1 -port 8123 -new_cluster_version 99
    ./setclusterversion -host 127.1 -port 8123 -cluster_version 0 -new_cluster_version 99

`setpin` (see `src/setpin.cc`)
--------
+3 −1
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ DEFINE_uint64(port, 8123, "Kinetic Port");
DEFINE_uint64(timeout, 30, "Timeout");
DEFINE_uint64(user_id, 1, "Kinetic User ID");
DEFINE_string(hmac_key, "asdfasdf", "Kinetic User HMAC key");
DEFINE_int64(cluster_version, 0, "Kinetic Cluster Version");

bool parse_flags(int *argc,
        char*** argv,
@@ -50,6 +51,7 @@ bool parse_flags(int *argc,
        return false;
    }
    blocking_connection = std::make_shared<kinetic::BlockingKineticConnection>(nonblocking_connection, FLAGS_timeout);
    blocking_connection->SetClientClusterVersion(FLAGS_cluster_version);

    return true;
}