use of com.microsoft.azure.hdinsight.sdk.rest.spark.job.Job in project azure-tools-for-java by Microsoft.
the class Executor method main.
public static void main(String[] args) throws Exception {
CredentialsProvider provider = new BasicCredentialsProvider();
provider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials("admin", "Pa$$w0rd1234"));
HttpClient client = HttpClients.custom().setDefaultCredentialsProvider(provider).build();
String id = "application_1491222722583_0007";
HttpResponse response = client.execute(new HttpGet("https://spark2withblob.azurehdinsight.net/sparkhistory/api/v1/applications/application_1491222722583_0008/1/jobs"));
String res = EntityUtils.toString(response.getEntity());
//List<Executor> response1 = ObjectConvertUtils.convertJsonToList(res, Executor.class).get();
List<Job> stages = ObjectConvertUtils.convertJsonToList(res, Job.class).get();
//Optional<Executor[]> v = ObjectConvertUtils.convertJsonToObject(res, Executor[].class);
int a = 1;
}
Aggregations