Apache spark 火花设置在纱线中不起作用

Apache spark 火花设置在纱线中不起作用,apache-spark,yarn,Apache Spark,Yarn,我已经准备好了 spark.executor.extraJavaOptions to –XX:+UseG1GC spark.storage.memoryFraction to 0.3 我可以在环境页面中看到它们。但在executors页中,存储内存仍在分配默认数量。我没有看到在启动执行器时使用Java选项。我使用SparkConf.set()在应用程序中设置这些环境 Map params=newhashmap(); 参数put(“spark.kryoserializer.buffer”,

我已经准备好了

spark.executor.extraJavaOptions to –XX:+UseG1GC
spark.storage.memoryFraction    to 0.3
我可以在环境页面中看到它们。但在executors页中,存储内存仍在分配默认数量。我没有看到在启动执行器时使用Java选项。我使用SparkConf.set()在应用程序中设置这些环境

Map params=newhashmap();
参数put(“spark.kryoserializer.buffer”,“24m”);
参数put(“spark.kryoserializer.buffer.max”,“1g”);
参数put(“spark.kryo.registrationRequired”,“true”);
参数put(“火花、投机”、“虚假”);
参数put(“spark.rdd.compress”、“true”);
参数put(“火花存储记忆分离”,“0.3”);
参数put(“spark.executor.extraJavaOptions”,“-XX:+UseG1GC-XX:+g1summaryconmark-XX:InitiatingHeapOccupanceTypercent=35-XX:MaxGCPauseMillis=400-XX:ConcGCThread=20”);
SparkConf SparkConf=新的SparkConf().setAppName(“测试”);
Arrays.asList(
getSparkParams(),
ElasticSearchProvider.getSparkParams()
).stream()
.map(设置->设置.entrySet().stream())
.map(entry->sparkConf.set(entry.getKey(),entry.getValue())
.count())
.count();

如何启动纱线应用程序<代码>火花提交?使用
SparkConf.set
SparkContext
的行是什么?请把它们都贴到你的问题上。你用什么版本的Spark?谢谢你如何开始你在纱线方面的应用<代码>火花提交?使用
SparkConf.set
SparkContext
的行是什么?请把它们都贴到你的问题上。你用什么版本的Spark?谢谢
    Map<String, String> params = new HashMap<>();
    params.put("spark.kryoserializer.buffer", "24m");
    params.put("spark.kryoserializer.buffer.max", "1g");
    params.put("spark.kryo.registrationRequired", "true");
    params.put("spark.speculation", "false");
    params.put("spark.rdd.compress", "true");
    params.put("spark.storage.memoryFraction","0.3");
    params.put("spark.executor.extraJavaOptions","–XX:+UseG1GC -XX:+G1SummarizeConcMark -XX:InitiatingHeapOccupancyPercent=35 -XX:MaxGCPauseMillis=400 -XX:ConcGCThread=20");


    SparkConf sparkConf = new SparkConf().setAppName("Test");

    Arrays.asList(
            getSparkParams(),
            ElasticSearchProvider.getSparkParams()
    ).stream()
            .map(settings -> settings.entrySet().stream()
                    .map(entry -> sparkConf.set(entry.getKey(), entry.getValue()))
                    .count())
            .count();