Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions src/main/java/com/qubole/qds/sdk/java/api/ClusterApiV13.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/**
* Copyright 2014- Qubole Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubole.qds.sdk.java.api;

import com.qubole.qds.sdk.java.entities.ClusterStateV13;
import com.qubole.qds.sdk.java.entities.ClusterV13;
import com.qubole.qds.sdk.java.entities.ClustersV13;
import com.qubole.qds.sdk.java.entities.Message;

/**
* Corresponds to http://www.qubole.com/docs/documentation/cluster-api/
*/
public interface ClusterApiV13
{
/**
* Corresponds to http://www.qubole.com/docs/list-clusters/
*
* @return new builder
*/
public InvokableBuilder<ClustersV13> list();

/**
* Corresponds to http://www.qubole.com/docs/get-cluster-state/
*
* @param labelOrId the Cluster label/id
* @return new builder
*/
public InvokableBuilder<ClusterStateV13> state(String labelOrId);

/**
* Corresponds to http://www.qubole.com/docs/get-cluster-information/
*
* @param labelOrId the Cluster label/id
* @return new builder
*/
public InvokableBuilder<ClusterV13> information(String labelOrId);

/**
* Corresponds to http://www.qubole.com/docs/start-terminate-cluster/ for "start"
*
* @param labelOrId the Cluster label/id
* @return new builder
*/
public InvokableBuilder<Message> start(String labelOrId);

/**
* Corresponds to http://www.qubole.com/docs/start-terminate-cluster/ for "terminate"
*
* @param labelOrId the Cluster label/id
* @return new builder
*/
public InvokableBuilder<Message> terminate(String labelOrId);

/**
* Corresponds to http://www.qubole.com/docs/edit-cluster/
*
* @param labelOrId the Cluster label/id
* @param configBuilder config values - use {@link #clusterConfig()}
* @return new builder
*/
public InvokableBuilder<ClusterV13> edit(String labelOrId, ClusterConfigBuilderV13 configBuilder);

/**
* Corresponds to http://www.qubole.com/docs/create-new-cluster/
*
* @param configBuilder config values - use {@link #clusterConfig()}
* @return new builder
*/
public InvokableBuilder<ClusterV13> create(ClusterConfigBuilderV13 configBuilder);

/**
* Corresponds to http://www.qubole.com/docs/delete-cluster/
*
* @param labelOrId the Cluster label/id
* @return new builder
*/
public InvokableBuilder<Message> delete(String labelOrId);

/**
* Return a new cluster config builder. Can be used with
* apis such as {@link ClusterApi#edit(String, ClusterConfigBuilderV13)}
*
* @return builder
*/
public ClusterConfigBuilderV13 clusterConfig();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* Copyright 2014- Qubole Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubole.qds.sdk.java.api;

import java.util.List;

public interface ClusterConfigBuilderV13
{
public ClusterConfigBuilderV13 label(List<String> label);

public ClusterConfigBuilderV13 id(int id);

public ClusterConfigBuilderV13 spark_version(String spark_version);

public ClusterConfigBuilderV13 disallow_cluster_termination(boolean disallow_cluster_termination);

public ClusterConfigBuilderV13 enable_ganglia_monitoring(boolean enable_ganglia_monitoring);

public ClusterConfigBuilderV13 node_bootstrap_file(String node_bootstrap_file);

public ClusterConfigBuilderV13 state(String state);

public ClusterEc2ConfigBuilderV13 ec2_settings();

public ClusterNodeConfigurationBuilderV13 node_configuration();

public ClusterHadoopConfigurationBuilderV13 hadoop_settings();

public ClusterSecurityConfigBuilderV13 security_settings();

public ClusterPrestoConfigBuilderV13 presto_settings();
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@
public interface ClusterEc2ConfigBuilder
{
public ClusterConfigBuilder compute_secret_key(String compute_secret_key);

public ClusterConfigBuilder compute_validated(boolean compute_validated);

public ClusterConfigBuilder compute_access_key(String compute_access_key);

public ClusterConfigBuilder aws_region(String aws_region);

public ClusterConfigBuilder aws_preferred_availability_zone(String aws_preferred_availability_zone);

public ClusterConfigBuilder subnet_id(String subnet_id);

public ClusterConfigBuilder vpc_id(String vpc_id);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* Copyright 2014- Qubole Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubole.qds.sdk.java.api;

public interface ClusterEc2ConfigBuilderV13
{
public ClusterConfigBuilderV13 compute_secret_key(String compute_secret_key);

public ClusterConfigBuilderV13 compute_validated(boolean compute_validated);

public ClusterConfigBuilderV13 compute_access_key(String compute_access_key);

public ClusterConfigBuilderV13 aws_region(String aws_region);

public ClusterConfigBuilderV13 aws_preferred_availability_zone(String aws_preferred_availability_zone);

public ClusterConfigBuilderV13 subnet_id(String subnet_id);

public ClusterConfigBuilderV13 vpc_id(String vpc_id);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Copyright 2014- Qubole Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubole.qds.sdk.java.api;

public interface ClusterFairSchedulerConfigBuilderV13
{
public ClusterConfigBuilderV13 default_pool(String default_pool);

public ClusterConfigBuilderV13 fairscheduler_config_xml(String fairscheduler_config_xml);
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,20 @@
public interface ClusterHadoopConfigBuilder
{
public ClusterConfigBuilder master_instance_type(String master_instance_type);

public ClusterFairSchedulerConfigBuilder fairscheduler_settings();

public ClusterConfigBuilder max_nodes(int max_nodes);

public ClusterConfigBuilder slave_instance_type(String slave_instance_type);

public ClusterConfigBuilder slave_request_type(String slave_request_type);

public ClusterConfigBuilder use_hadoop2(boolean use_hadoop2);

public ClusterConfigBuilder initial_nodes(int initial_nodes);

public ClusterConfigBuilder custom_config(String custom_config);

public ClusterSpotInstanceConfigBuilder spot_instance_settings();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Copyright 2014- Qubole Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubole.qds.sdk.java.api;

public interface ClusterHadoopConfigurationBuilderV13
{
public ClusterConfigBuilderV13 use_hadoop2(boolean use_hadoop2);

public ClusterConfigBuilderV13 use_spark(boolean use_spark);

public ClusterConfigBuilderV13 use_hbase(boolean use_hbase);

public ClusterConfigBuilderV13 use_qubole_placement_policy(boolean use_qubole_placement_policy);

public ClusterConfigBuilderV13 custom_config(String custom_config);

public ClusterFairSchedulerConfigBuilderV13 fairscheduler_settings();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.qubole.qds.sdk.java.api;

import java.util.Map;

public interface ClusterNodeConfigurationBuilderV13
{
public ClusterConfigBuilderV13 master_instance_type(String master_instance_type);

public ClusterConfigBuilderV13 slave_instance_type(String slave_instance_type);

public ClusterConfigBuilderV13 initial_nodes(int initial_nodes);

public ClusterConfigBuilderV13 max_nodes(int max_nodes);

public ClusterConfigBuilderV13 slave_request_type(String slave_request_type);

public ClusterConfigBuilderV13 fallback_to_ondemand(boolean fallback_to_ondemand);

public ClusterConfigBuilderV13 ebs_volume_type(String ebs_volume_type);

public ClusterConfigBuilderV13 ebs_volume_size(String ebs_volume_size);

public ClusterConfigBuilderV13 ebs_volume_count(int ebs_volume_count);

public ClusterConfigBuilderV13 custom_ec2_tags(Map<String,String> custom_ec2_tags);

public ClusterSpotInstanceConfigBuilderV13 spot_instance_settings();

public ClusterStableSpotInstanceConfigBuilderV13 stable_spot_instance_settings();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Copyright 2014- Qubole Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubole.qds.sdk.java.api;

public interface ClusterPrestoConfigBuilderV13
{
public ClusterConfigBuilderV13 enable_presto(boolean enable_presto);

public ClusterConfigBuilderV13 custom_config(String custom_config);

public ClusterConfigBuilderV13 jvm_config(String jvm_config);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Copyright 2014- Qubole Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubole.qds.sdk.java.api;

public interface ClusterSecurityConfigBuilderV13
{
public ClusterConfigBuilderV13 encrypted_ephemerals(boolean encrypted_ephemerals);

public ClusterConfigBuilderV13 ssh_public_key(String ssh_public_key);

public ClusterConfigBuilderV13 persistent_security_group(String persistent_security_group);
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
public interface ClusterSpotInstanceConfigBuilder
{
public ClusterConfigBuilder maximum_bid_price_percentage(String maximum_bid_price_percentage);

public ClusterConfigBuilder timeout_for_request(int timeout_for_request);

public ClusterConfigBuilder maximum_spot_instance_percentage(int maximum_spot_instance_percentage);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Copyright 2014- Qubole Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubole.qds.sdk.java.api;

public interface ClusterSpotInstanceConfigBuilderV13
{
public ClusterConfigBuilderV13 maximum_bid_price_percentage(String maximum_bid_price_percentage);

public ClusterConfigBuilderV13 timeout_for_request(int timeout_for_request);

public ClusterConfigBuilderV13 maximum_spot_instance_percentage(int maximum_spot_instance_percentage);
}
Loading