37
37
import com .ibm .cloud .iaesdk .ibm_analytics_engine_api .v3 .model .GetLogForwardingConfigOptions ;
38
38
import com .ibm .cloud .iaesdk .ibm_analytics_engine_api .v3 .model .GetLoggingConfigurationOptions ;
39
39
import com .ibm .cloud .iaesdk .ibm_analytics_engine_api .v3 .model .GetResourceConsumptionLimitsOptions ;
40
+ import com .ibm .cloud .iaesdk .ibm_analytics_engine_api .v3 .model .GetSparkHistoryServerOptions ;
40
41
import com .ibm .cloud .iaesdk .ibm_analytics_engine_api .v3 .model .Instance ;
41
42
import com .ibm .cloud .iaesdk .ibm_analytics_engine_api .v3 .model .InstanceGetStateResponse ;
42
43
import com .ibm .cloud .iaesdk .ibm_analytics_engine_api .v3 .model .InstanceHomeResponse ;
49
50
import com .ibm .cloud .iaesdk .ibm_analytics_engine_api .v3 .model .ResourceConsumptionLimitsResponse ;
50
51
import com .ibm .cloud .iaesdk .ibm_analytics_engine_api .v3 .model .Runtime ;
51
52
import com .ibm .cloud .iaesdk .ibm_analytics_engine_api .v3 .model .SetInstanceHomeOptions ;
53
+ import com .ibm .cloud .iaesdk .ibm_analytics_engine_api .v3 .model .SparkHistoryServerResponse ;
54
+ import com .ibm .cloud .iaesdk .ibm_analytics_engine_api .v3 .model .StartSparkHistoryServerOptions ;
55
+ import com .ibm .cloud .iaesdk .ibm_analytics_engine_api .v3 .model .StopSparkHistoryServerOptions ;
52
56
import com .ibm .cloud .iaesdk .ibm_analytics_engine_api .v3 .model .UpdateInstanceDefaultConfigsOptions ;
53
57
import com .ibm .cloud .sdk .core .http .RequestBuilder ;
54
58
import com .ibm .cloud .sdk .core .http .ResponseConverter ;
@@ -601,6 +605,7 @@ public ServiceCall<LogForwardingConfigResponse> getLogForwardingConfig(GetLogFor
601
605
* Enable or disable log forwarding.
602
606
*
603
607
* Enable or disable log forwarding from IBM Analytics Engine to IBM Log Analysis server.
608
+ * *Note:* Deprecated. Use the log forwarding config api instead.
604
609
*
605
610
* @param configurePlatformLoggingOptions the {@link ConfigurePlatformLoggingOptions} containing the options for the call
606
611
* @return a {@link ServiceCall} with a result of type {@link LoggingConfigurationResponse}
@@ -630,6 +635,7 @@ public ServiceCall<LoggingConfigurationResponse> configurePlatformLogging(Config
630
635
* Retrieve the logging configuration for a given instance id.
631
636
*
632
637
* Retrieve the logging configuration of a given Analytics Engine instance.
638
+ * *Note:* Deprecated. Use the log forwarding config api instead.
633
639
*
634
640
* @param getLoggingConfigurationOptions the {@link GetLoggingConfigurationOptions} containing the options for the call
635
641
* @return a {@link ServiceCall} with a result of type {@link LoggingConfigurationResponse}
@@ -650,4 +656,74 @@ public ServiceCall<LoggingConfigurationResponse> getLoggingConfiguration(GetLogg
650
656
return createServiceCall (builder .build (), responseConverter );
651
657
}
652
658
659
+ /**
660
+ * Start Spark history server.
661
+ *
662
+ * Start the Spark history server for the given Analytics Engine instance.
663
+ *
664
+ * @param startSparkHistoryServerOptions the {@link StartSparkHistoryServerOptions} containing the options for the call
665
+ * @return a {@link ServiceCall} with a result of type {@link SparkHistoryServerResponse}
666
+ */
667
+ public ServiceCall <SparkHistoryServerResponse > startSparkHistoryServer (StartSparkHistoryServerOptions startSparkHistoryServerOptions ) {
668
+ com .ibm .cloud .sdk .core .util .Validator .notNull (startSparkHistoryServerOptions ,
669
+ "startSparkHistoryServerOptions cannot be null" );
670
+ Map <String , String > pathParamsMap = new HashMap <String , String >();
671
+ pathParamsMap .put ("instance_id" , startSparkHistoryServerOptions .instanceId ());
672
+ RequestBuilder builder = RequestBuilder .post (RequestBuilder .resolveRequestUrl (getServiceUrl (), "/v3/analytics_engines/{instance_id}/spark_history_server" , pathParamsMap ));
673
+ Map <String , String > sdkHeaders = SdkCommon .getSdkHeaders ("ibm_analytics_engine_api" , "v3" , "startSparkHistoryServer" );
674
+ for (Entry <String , String > header : sdkHeaders .entrySet ()) {
675
+ builder .header (header .getKey (), header .getValue ());
676
+ }
677
+ builder .header ("Accept" , "application/json" );
678
+ ResponseConverter <SparkHistoryServerResponse > responseConverter =
679
+ ResponseConverterUtils .getValue (new com .google .gson .reflect .TypeToken <SparkHistoryServerResponse >() { }.getType ());
680
+ return createServiceCall (builder .build (), responseConverter );
681
+ }
682
+
683
+ /**
684
+ * Get Spark history server details.
685
+ *
686
+ * Get the details of the Spark history server of the given Analytics Engine instance.
687
+ *
688
+ * @param getSparkHistoryServerOptions the {@link GetSparkHistoryServerOptions} containing the options for the call
689
+ * @return a {@link ServiceCall} with a result of type {@link SparkHistoryServerResponse}
690
+ */
691
+ public ServiceCall <SparkHistoryServerResponse > getSparkHistoryServer (GetSparkHistoryServerOptions getSparkHistoryServerOptions ) {
692
+ com .ibm .cloud .sdk .core .util .Validator .notNull (getSparkHistoryServerOptions ,
693
+ "getSparkHistoryServerOptions cannot be null" );
694
+ Map <String , String > pathParamsMap = new HashMap <String , String >();
695
+ pathParamsMap .put ("instance_id" , getSparkHistoryServerOptions .instanceId ());
696
+ RequestBuilder builder = RequestBuilder .get (RequestBuilder .resolveRequestUrl (getServiceUrl (), "/v3/analytics_engines/{instance_id}/spark_history_server" , pathParamsMap ));
697
+ Map <String , String > sdkHeaders = SdkCommon .getSdkHeaders ("ibm_analytics_engine_api" , "v3" , "getSparkHistoryServer" );
698
+ for (Entry <String , String > header : sdkHeaders .entrySet ()) {
699
+ builder .header (header .getKey (), header .getValue ());
700
+ }
701
+ builder .header ("Accept" , "application/json" );
702
+ ResponseConverter <SparkHistoryServerResponse > responseConverter =
703
+ ResponseConverterUtils .getValue (new com .google .gson .reflect .TypeToken <SparkHistoryServerResponse >() { }.getType ());
704
+ return createServiceCall (builder .build (), responseConverter );
705
+ }
706
+
707
+ /**
708
+ * Stop Spark history server.
709
+ *
710
+ * Stop the Spark history server of the given Analytics Engine instance.
711
+ *
712
+ * @param stopSparkHistoryServerOptions the {@link StopSparkHistoryServerOptions} containing the options for the call
713
+ * @return a {@link ServiceCall} with a void result
714
+ */
715
+ public ServiceCall <Void > stopSparkHistoryServer (StopSparkHistoryServerOptions stopSparkHistoryServerOptions ) {
716
+ com .ibm .cloud .sdk .core .util .Validator .notNull (stopSparkHistoryServerOptions ,
717
+ "stopSparkHistoryServerOptions cannot be null" );
718
+ Map <String , String > pathParamsMap = new HashMap <String , String >();
719
+ pathParamsMap .put ("instance_id" , stopSparkHistoryServerOptions .instanceId ());
720
+ RequestBuilder builder = RequestBuilder .delete (RequestBuilder .resolveRequestUrl (getServiceUrl (), "/v3/analytics_engines/{instance_id}/spark_history_server" , pathParamsMap ));
721
+ Map <String , String > sdkHeaders = SdkCommon .getSdkHeaders ("ibm_analytics_engine_api" , "v3" , "stopSparkHistoryServer" );
722
+ for (Entry <String , String > header : sdkHeaders .entrySet ()) {
723
+ builder .header (header .getKey (), header .getValue ());
724
+ }
725
+ ResponseConverter <Void > responseConverter = ResponseConverterUtils .getVoid ();
726
+ return createServiceCall (builder .build (), responseConverter );
727
+ }
728
+
653
729
}
0 commit comments