Codota Logo
ClusterOperationRequest
Code IndexAdd Codota to your IDE (free)

How to use
ClusterOperationRequest
in
co.cask.coopr.http.request

Best Java code snippets using co.cask.coopr.http.request.ClusterOperationRequest (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: caskdata/coopr

 @Override
 public ClusterOperationRequest deserialize(JsonElement json, Type type, JsonDeserializationContext context)
  throws JsonParseException {
  JsonObject jsonObj = json.getAsJsonObject();

  Map<String, Object> providerFields =
   context.deserialize(jsonObj.get("providerFields"), new TypeToken<Map<String, Object>>() { }.getType());
  return new ClusterOperationRequest(providerFields);
 }
}
origin: caskdata/coopr

@Override
public boolean equals(Object o) {
 if (this == o) {
  return true;
 }
 if (o == null || getClass() != o.getClass()) {
  return false;
 }
 ClusterConfigureRequest that = (ClusterConfigureRequest) o;
 return super.equals(that) &&
  Objects.equal(restart, that.restart) &&
  Objects.equal(config, that.config);
}
origin: caskdata/coopr

@Override
public int hashCode() {
 return Objects.hashCode(super.hashCode(), name, description, clusterTemplate, numMachines, provider,
             services, hardwaretype, imagetype, initialLeaseDuration, dnsSuffix, config);
}
origin: caskdata/coopr

String clusterId = cluster.getId();
Map<String, Object> providerFields = request == null ?
 Maps.<String, Object>newHashMap() : request.getProviderFields();
origin: caskdata/coopr

 private void expireClusters(long currentTime) {
  try {
   LOG.debug("Expiring clusters older than {}", currentTime);

   Set<Cluster> clusters = clusterStore.getExpiringClusters(currentTime);

   if (clusters.isEmpty()) {
    LOG.debug("Got 0 clusters to be expired for time {}", currentTime);
    return;
   }

   LOG.debug("Got {} possible clusters to expire for time {}", clusters.size(), currentTime);

   for (Cluster cluster : clusters) {
    // mod check done here instead of db to avoid full table scan.
    if (Long.valueOf(cluster.getId()) % incrementBy == myMod) {
     LOG.debug("Deleting cluster {} with expire time {}", cluster.getId(), cluster.getExpireTime());
     clusterService.requestClusterDelete(cluster.getId(), cluster.getAccount(), new ClusterOperationRequest(null));
    }
   }
  } catch (Throwable e) {
   LOG.error("Got exception: ", e);
  }
 }
}
origin: caskdata/coopr

 @Override
 public int hashCode() {
  return Objects.hashCode(super.hashCode(), restart, config);
 }
}
origin: caskdata/coopr

@Override
public boolean equals(Object o) {
 if (this == o) {
  return true;
 }
 if (o == null || getClass() != o.getClass()) {
  return false;
 }
 ClusterCreateRequest other = (ClusterCreateRequest) o;
 return super.equals(other) &&
  Objects.equal(name, other.name) &&
  Objects.equal(description, other.description) &&
  Objects.equal(clusterTemplate, other.clusterTemplate) &&
  Objects.equal(numMachines, other.numMachines) &&
  Objects.equal(provider, other.provider) &&
  Objects.equal(services, other.services) &&
  Objects.equal(hardwaretype, other.hardwaretype) &&
  Objects.equal(imagetype, other.imagetype) &&
  Objects.equal(initialLeaseDuration, other.initialLeaseDuration) &&
  Objects.equal(dnsSuffix, other.dnsSuffix) &&
  Objects.equal(config, other.config);
}
origin: caskdata/coopr

@Test
public void testSensitiveUserFields() throws Exception {
 Map<String, Object> sensitiveFields = Maps.newHashMap();
 sensitiveFields.put("key", "keycontents");
 AddServicesRequest addRequest = new AddServicesRequest(sensitiveFields, ImmutableSet.of(service2.getName()));
 ClusterOperationRequest opRequest = new ClusterOperationRequest(sensitiveFields);
 Cluster cluster = createActiveCluster();
 clusterService.requestAddServices(cluster.getId(), account, addRequest);
 testSensitiveFieldsAdded(cluster, sensitiveFields);
 clusterStore.deleteCluster(cluster.getId());
 cluster = createActiveCluster();
 clusterService.requestClusterDelete(cluster.getId(), account, opRequest);
 testSensitiveFieldsAdded(cluster, sensitiveFields);
 clusterStore.deleteCluster(cluster.getId());
 cluster = createActiveCluster();
 clusterService.requestServiceRuntimeAction(cluster.getId(), account, ClusterAction.RESTART_SERVICES,
                       service1.getName(), opRequest);
 testSensitiveFieldsAdded(cluster, sensitiveFields);
 clusterStore.deleteCluster(cluster.getId());
}
co.cask.coopr.http.requestClusterOperationRequest

Javadoc

Request to perform some cluster operation that needs to communicate with a provider. These requests may include provider fields for things like credentials that may be needed to access cluster nodes, or things of that nature.

Most used methods

  • <init>
  • equals
  • getProviderFields
    Get an immutable copy of the provider fields.
  • hashCode

Popular in Java

  • Updating database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • putExtra (Intent)
  • requestLocationUpdates (LocationManager)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • JCheckBox (javax.swing)
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now