private void setClusterSize ( String clusterName , int newSize ) throws InterruptedException { Preconditions . checkArgument ( newSize > 0 , "Cluster size must be > 0" ) ; logger . info ( "Updating cluster %s to size %d" , clusterName , newSize ) ; Operation operation = client . updateCluster ( Cluster . newBuilder ( ) . setName ( clusterName ) . setServeNodes ( newSize ) . build ( ) ) ; waitForOperation ( operation . getName ( ) , 60 ) ; logger . info ( "Done updating cluster %s." , clusterName ) ; }
Update a specific cluster s server node count to the number specified