You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by "jerqi (via GitHub)" <gi...@apache.org> on 2023/05/09 01:50:30 UTC
[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #856: [#855] improvement: support Tez write OrderedPartitionedKVOutput
jerqi commented on code in PR #856:
URL: https://github.com/apache/incubator-uniffle/pull/856#discussion_r1188035413
##########
client-tez/pom.xml:
##########
@@ -1,86 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You 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.
- -->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>uniffle-parent</artifactId>
<groupId>org.apache.uniffle</groupId>
- <version>0.8.0-SNAPSHOT</version>
+ <version>0.7.0</version>
Review Comment:
Could you correct the version?
##########
client-tez/pom.xml:
##########
@@ -176,4 +181,4 @@
</plugin>
</plugins>
</build>
-</project>
+</project>
Review Comment:
Could you add a new line? There is a warning.
##########
client-tez/org/apache/tez/runtime/library/common/sort/impl/RssTezSpillRecord.java:
##########
@@ -0,0 +1,66 @@
+package org.apache.tez.runtime.library.common.sort.impl;
+
+import java.io.IOException;
+import java.util.zip.Checksum;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+
+
+public class RssTezSpillRecord extends TezSpillRecord {
+ private int numPartitions;
+ private int[] numRecordsPerPartition;
+
+ public RssTezSpillRecord(int numPartitions) {
+ super(numPartitions);
+ this.numPartitions = numPartitions;
+ }
+
+ public RssTezSpillRecord(int numPartitions, int[] numRecordsPerPartition) {
+ super(numPartitions);
+ this.numPartitions = numPartitions;
+ this.numRecordsPerPartition = numRecordsPerPartition;
+ }
+
+
+ public RssTezSpillRecord(Path indexFileName, Configuration job) throws IOException {
+ super(indexFileName, job);
+ }
+
+ public RssTezSpillRecord(Path indexFileName, Configuration job, String expectedIndexOwner) throws IOException {
+ super(indexFileName, job, expectedIndexOwner);
+ }
+
+ public RssTezSpillRecord(Path indexFileName, Configuration job, Checksum crc, String expectedIndexOwner)
+ throws IOException {
+ super(indexFileName, job, crc, expectedIndexOwner);
+ }
+
+ @Override
+ public int size() {
+ return numPartitions;
+ }
+
+ @Override
+ public RssTezIndexRecord getIndex(int i) {
+ int records = numRecordsPerPartition[i];
+ RssTezIndexRecord rssTezIndexRecord = new RssTezIndexRecord();
+ rssTezIndexRecord.setData(!(records == 0));
+ return rssTezIndexRecord;
+ }
+
+
+ class RssTezIndexRecord extends TezIndexRecord {
+ private boolean flag;
+
+ private void setData(boolean flag) {
Review Comment:
Could you have a better name? `setFlag` seems more better.
##########
patch/tez/tez-0.9.1_configurable_edge_info_support.patch:
##########
@@ -0,0 +1,532 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+
+
+diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/RssShuffleFactory.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/RssShuffleFactory.java
Review Comment:
Why do we have this patch in this pr?
##########
client-tez/org/apache/tez/runtime/library/common/sort/impl/RssTezSpillRecord.java:
##########
@@ -0,0 +1,66 @@
+package org.apache.tez.runtime.library.common.sort.impl;
+
+import java.io.IOException;
+import java.util.zip.Checksum;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+
+
+public class RssTezSpillRecord extends TezSpillRecord {
+ private int numPartitions;
+ private int[] numRecordsPerPartition;
+
+ public RssTezSpillRecord(int numPartitions) {
+ super(numPartitions);
+ this.numPartitions = numPartitions;
+ }
+
+ public RssTezSpillRecord(int numPartitions, int[] numRecordsPerPartition) {
+ super(numPartitions);
+ this.numPartitions = numPartitions;
+ this.numRecordsPerPartition = numRecordsPerPartition;
+ }
+
+
+ public RssTezSpillRecord(Path indexFileName, Configuration job) throws IOException {
+ super(indexFileName, job);
+ }
+
+ public RssTezSpillRecord(Path indexFileName, Configuration job, String expectedIndexOwner) throws IOException {
+ super(indexFileName, job, expectedIndexOwner);
+ }
+
+ public RssTezSpillRecord(Path indexFileName, Configuration job, Checksum crc, String expectedIndexOwner)
+ throws IOException {
+ super(indexFileName, job, crc, expectedIndexOwner);
+ }
+
+ @Override
+ public int size() {
+ return numPartitions;
+ }
+
+ @Override
+ public RssTezIndexRecord getIndex(int i) {
+ int records = numRecordsPerPartition[i];
+ RssTezIndexRecord rssTezIndexRecord = new RssTezIndexRecord();
+ rssTezIndexRecord.setData(!(records == 0));
+ return rssTezIndexRecord;
+ }
+
+
+ class RssTezIndexRecord extends TezIndexRecord {
+ private boolean flag;
+
+ private void setData(boolean flag) {
+ this.flag = flag;
+ }
+
+ @Override
+ public boolean hasData() {
+ return flag;
+ }
+ }
+
+}
Review Comment:
Could you add a new line?
##########
client-tez/org/apache/tez/runtime/library/common/sort/impl/RssSorter.java:
##########
@@ -0,0 +1,196 @@
+package org.apache.tez.runtime.library.common.sort.impl;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import com.google.common.collect.Sets;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.yarn.api.ApplicationConstants;
+import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
+import org.apache.hadoop.yarn.api.records.ApplicationId;
+import org.apache.hadoop.yarn.api.records.ContainerId;
+import org.apache.hadoop.yarn.util.ConverterUtils;
+import org.apache.tez.common.RssTezConfig;
+import org.apache.tez.common.RssTezUtils;
+import org.apache.tez.dag.records.TezTaskAttemptID;
+import org.apache.tez.runtime.api.Event;
+import org.apache.tez.runtime.api.OutputContext;
+import org.apache.tez.runtime.library.common.sort.buffer.SortWriteBufferManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.uniffle.common.ShuffleServerInfo;
+import org.apache.uniffle.common.config.RssConf;
+import org.apache.uniffle.common.exception.RssException;
+import org.apache.uniffle.common.util.ByteUnit;
+import org.apache.uniffle.storage.util.StorageType;
+
+
+
+
+/**{@link RssSorter} is an {@link ExternalSorter}
+ * @author bin3.zhang
+ */
+public class RssSorter extends ExternalSorter {
+
+ private static final Logger LOG = LoggerFactory.getLogger(RssSorter.class);
+ private SortWriteBufferManager bufferManager;
+ private Set<Long> successBlockIds = Sets.newConcurrentHashSet();
+ private Set<Long> failedBlockIds = Sets.newConcurrentHashSet();
+ private Map<Integer, List<ShuffleServerInfo>> partitionToServers;
+
+ private int[] numRecordsPerPartition;
+
+ /**
+ * Initialization
+ */
+ public RssSorter(TezTaskAttemptID tezTaskAttemptID,OutputContext outputContext,
+ Configuration conf, int numMaps, int numOutputs, long initialMemoryAvailable,
+ TezTaskAttemptID tezTaskAttemptId,
+ int shuffleId,
+ Map<Integer, List<ShuffleServerInfo>> partitionToServers) throws IOException {
+ super(outputContext, conf, numOutputs, initialMemoryAvailable);
+ this.partitionToServers = partitionToServers;
+ ApplicationId applicationId = outputContext.getApplicationId();
+
+ LOG.info("tezTaskAttemptId is {}",tezTaskAttemptId);
+
+ this.numRecordsPerPartition = new int[numOutputs];
+
+ long sortmb = conf.getLong(RssTezConfig.RSS_RUNTIME_IO_SORT_MB, RssTezConfig.RSS_DEFAULT_RUNTIME_IO_SORT_MB);
+ LOG.info("conf.sortmb is {}", sortmb);
+ sortmb = this.availableMemoryMb;
+ LOG.info("sortmb, availableMemoryMb is {}, {}", sortmb, availableMemoryMb);
+ if ((sortmb & 0x7FF) != sortmb) {
+ throw new IOException(
+ "Invalid \"" + RssTezConfig.RSS_RUNTIME_IO_SORT_MB + "\": " + sortmb);
+ }
+ double sortThreshold = conf.getDouble(RssTezConfig.RSS_CLIENT_SORT_MEMORY_USE_THRESHOLD,
+ RssTezConfig.RSS_CLIENT_DEFAULT_SORT_MEMORY_USE_THRESHOLD);
+ long taskAttemptId = RssTezUtils.convertTaskAttemptIdToLong(tezTaskAttemptId, 1);
+ long maxSegmentSize = conf.getLong(RssTezConfig.RSS_CLIENT_MAX_BUFFER_SIZE,
+ RssTezConfig.RSS_CLIENT_DEFAULT_MAX_BUFFER_SIZE);
+ long maxBufferSize = conf.getLong(RssTezConfig.RSS_WRITER_BUFFER_SIZE, RssTezConfig.RSS_DEFAULT_WRITER_BUFFER_SIZE);
+ double memoryThreshold = conf.getDouble(RssTezConfig.RSS_CLIENT_MEMORY_THRESHOLD,
+ RssTezConfig.RSS_CLIENT_DEFAULT_MEMORY_THRESHOLD);
+ double sendThreshold = conf.getDouble(RssTezConfig.RSS_CLIENT_SEND_THRESHOLD,
+ RssTezConfig.RSS_CLIENT_DEFAULT_SEND_THRESHOLD);
+ int batch = conf.getInt(RssTezConfig.RSS_CLIENT_BATCH_TRIGGER_NUM,
+ RssTezConfig.RSS_CLIENT_DEFAULT_BATCH_TRIGGER_NUM);
+ String storageType = conf.get(RssTezConfig.RSS_STORAGE_TYPE, RssTezConfig.RSS_DEFAULT_STORAGE_TYPE);
+ if (StringUtils.isEmpty(storageType)) {
+ throw new RssException("storage type mustn't be empty");
+ }
+ long sendCheckInterval = conf.getLong(RssTezConfig.RSS_CLIENT_SEND_CHECK_INTERVAL_MS,
+ RssTezConfig.RSS_CLIENT_DEFAULT_SEND_CHECK_INTERVAL_MS);
+ long sendCheckTimeout = conf.getLong(RssTezConfig.RSS_CLIENT_SEND_CHECK_TIMEOUT_MS,
+ RssTezConfig.RSS_CLIENT_DEFAULT_SEND_CHECK_TIMEOUT_MS);
+ int bitmapSplitNum = conf.getInt(RssTezConfig.RSS_CLIENT_BITMAP_NUM, RssTezConfig.RSS_CLIENT_DEFAULT_BITMAP_NUM);
+
+ if (conf.get(RssTezConfig.HIVE_TEZ_LOG_LEVEL, RssTezConfig.DEFAULT_HIVE_TEZ_LOG_LEVEL)
+ .equalsIgnoreCase(RssTezConfig.DEBUG_HIVE_TEZ_LOG_LEVEL)) {
+ LOG.info("sortmb is {}", sortmb);
+ LOG.info("sortThreshold is {}", sortThreshold);
+ LOG.info("taskAttemptId is {}", taskAttemptId);
+ LOG.info("maxSegmentSize is {}", maxSegmentSize);
+ LOG.info("maxBufferSize is {}", maxBufferSize);
+ LOG.info("memoryThreshold is {}", memoryThreshold);
+ LOG.info("sendThreshold is {}", sendThreshold);
+ LOG.info("batch is {}", batch);
+ LOG.info("storageType is {}", storageType);
+ LOG.info("sendCheckInterval is {}", sendCheckInterval);
+ LOG.info("sendCheckTimeout is {}", sendCheckTimeout);
+ LOG.info("bitmapSplitNum is {}", bitmapSplitNum);
+ }
+
+
+ String containerIdStr =
+ System.getenv(ApplicationConstants.Environment.CONTAINER_ID.name());
+ ContainerId containerId = ConverterUtils.toContainerId(containerIdStr);
+ ApplicationAttemptId applicationAttemptId =
+ containerId.getApplicationAttemptId();
+ LOG.info("containerIdStr is {}", containerIdStr);
+ LOG.info("containerId is {}", containerId);
+ LOG.info("applicationAttemptId is {}", applicationAttemptId.toString());
+
+
+ bufferManager = new SortWriteBufferManager(
+ tezTaskAttemptID,
+ (long)(ByteUnit.MiB.toBytes(sortmb) * sortThreshold),
+ applicationAttemptId.toString(),
+ taskAttemptId,
+ successBlockIds,
+ failedBlockIds,
+ RssTezUtils.createShuffleClient(conf),
+ comparator,
+ maxSegmentSize,
+ keySerializer,
+ valSerializer,
+ maxBufferSize,
+ memoryThreshold,
+ sendThreshold,
+ batch,
+ new RssConf(),
+ partitionToServers,
+ numMaps,
+ isMemoryShuffleEnabled(storageType),
+ sendCheckInterval,
+ sendCheckTimeout,
+ bitmapSplitNum,
+ shuffleId);
+ LOG.info("Initialized SortWriteBufferManager.");
+ }
+
+ @Override
+ public void flush() throws IOException {
+ bufferManager.waitSendFinished();
+ }
+
+ @Override
+ public final List<Event> close() throws IOException {
+ super.close();
+ bufferManager.freeAllResources();
+ return Collections.emptyList();
+ }
+
+ @Override
+ public void write(Object key, Object value) throws IOException {
+ try {
+ collect(key, value, partitioner.getPartition(key, value, partitions));
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ synchronized void collect(Object key, Object value, final int partition) throws IOException, InterruptedException {
+ if (key.getClass() != keyClass) {
+ throw new IOException("Type mismatch in key from map: expected "
+ + keyClass.getName() + ", received "
+ + key.getClass().getName());
+ }
+ if (value.getClass() != valClass) {
+ throw new IOException("Type mismatch in value from map: expected "
+ + valClass.getName() + ", received "
+ + value.getClass().getName());
+ }
+ if (partition < 0 || partition >= partitions) {
+ throw new IOException("Illegal partition for " + key + " ("
+ + partition + ")");
+ }
+
+ bufferManager.addRecord(partition, key, value);
+ numRecordsPerPartition[partition]++;
+ }
+
+ public int[] getNumRecordsPerPartition() {
+ return numRecordsPerPartition;
+ }
+
+ private boolean isMemoryShuffleEnabled(String storageType) {
Review Comment:
This method should be moved to common package to let every framework can use it.
##########
client-tez/org/apache/tez/runtime/library/common/sort/impl/RssSorter.java:
##########
@@ -0,0 +1,196 @@
+package org.apache.tez.runtime.library.common.sort.impl;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import com.google.common.collect.Sets;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.yarn.api.ApplicationConstants;
+import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
+import org.apache.hadoop.yarn.api.records.ApplicationId;
+import org.apache.hadoop.yarn.api.records.ContainerId;
+import org.apache.hadoop.yarn.util.ConverterUtils;
+import org.apache.tez.common.RssTezConfig;
+import org.apache.tez.common.RssTezUtils;
+import org.apache.tez.dag.records.TezTaskAttemptID;
+import org.apache.tez.runtime.api.Event;
+import org.apache.tez.runtime.api.OutputContext;
+import org.apache.tez.runtime.library.common.sort.buffer.SortWriteBufferManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.uniffle.common.ShuffleServerInfo;
+import org.apache.uniffle.common.config.RssConf;
+import org.apache.uniffle.common.exception.RssException;
+import org.apache.uniffle.common.util.ByteUnit;
+import org.apache.uniffle.storage.util.StorageType;
+
+
+
+
+/**{@link RssSorter} is an {@link ExternalSorter}
+ * @author bin3.zhang
+ */
+public class RssSorter extends ExternalSorter {
+
+ private static final Logger LOG = LoggerFactory.getLogger(RssSorter.class);
+ private SortWriteBufferManager bufferManager;
+ private Set<Long> successBlockIds = Sets.newConcurrentHashSet();
+ private Set<Long> failedBlockIds = Sets.newConcurrentHashSet();
+ private Map<Integer, List<ShuffleServerInfo>> partitionToServers;
+
+ private int[] numRecordsPerPartition;
+
+ /**
+ * Initialization
+ */
+ public RssSorter(TezTaskAttemptID tezTaskAttemptID,OutputContext outputContext,
+ Configuration conf, int numMaps, int numOutputs, long initialMemoryAvailable,
+ TezTaskAttemptID tezTaskAttemptId,
+ int shuffleId,
+ Map<Integer, List<ShuffleServerInfo>> partitionToServers) throws IOException {
+ super(outputContext, conf, numOutputs, initialMemoryAvailable);
+ this.partitionToServers = partitionToServers;
+ ApplicationId applicationId = outputContext.getApplicationId();
+
+ LOG.info("tezTaskAttemptId is {}",tezTaskAttemptId);
+
+ this.numRecordsPerPartition = new int[numOutputs];
+
+ long sortmb = conf.getLong(RssTezConfig.RSS_RUNTIME_IO_SORT_MB, RssTezConfig.RSS_DEFAULT_RUNTIME_IO_SORT_MB);
+ LOG.info("conf.sortmb is {}", sortmb);
+ sortmb = this.availableMemoryMb;
+ LOG.info("sortmb, availableMemoryMb is {}, {}", sortmb, availableMemoryMb);
+ if ((sortmb & 0x7FF) != sortmb) {
+ throw new IOException(
+ "Invalid \"" + RssTezConfig.RSS_RUNTIME_IO_SORT_MB + "\": " + sortmb);
+ }
+ double sortThreshold = conf.getDouble(RssTezConfig.RSS_CLIENT_SORT_MEMORY_USE_THRESHOLD,
+ RssTezConfig.RSS_CLIENT_DEFAULT_SORT_MEMORY_USE_THRESHOLD);
+ long taskAttemptId = RssTezUtils.convertTaskAttemptIdToLong(tezTaskAttemptId, 1);
+ long maxSegmentSize = conf.getLong(RssTezConfig.RSS_CLIENT_MAX_BUFFER_SIZE,
+ RssTezConfig.RSS_CLIENT_DEFAULT_MAX_BUFFER_SIZE);
+ long maxBufferSize = conf.getLong(RssTezConfig.RSS_WRITER_BUFFER_SIZE, RssTezConfig.RSS_DEFAULT_WRITER_BUFFER_SIZE);
+ double memoryThreshold = conf.getDouble(RssTezConfig.RSS_CLIENT_MEMORY_THRESHOLD,
+ RssTezConfig.RSS_CLIENT_DEFAULT_MEMORY_THRESHOLD);
+ double sendThreshold = conf.getDouble(RssTezConfig.RSS_CLIENT_SEND_THRESHOLD,
+ RssTezConfig.RSS_CLIENT_DEFAULT_SEND_THRESHOLD);
+ int batch = conf.getInt(RssTezConfig.RSS_CLIENT_BATCH_TRIGGER_NUM,
+ RssTezConfig.RSS_CLIENT_DEFAULT_BATCH_TRIGGER_NUM);
+ String storageType = conf.get(RssTezConfig.RSS_STORAGE_TYPE, RssTezConfig.RSS_DEFAULT_STORAGE_TYPE);
+ if (StringUtils.isEmpty(storageType)) {
+ throw new RssException("storage type mustn't be empty");
+ }
+ long sendCheckInterval = conf.getLong(RssTezConfig.RSS_CLIENT_SEND_CHECK_INTERVAL_MS,
+ RssTezConfig.RSS_CLIENT_DEFAULT_SEND_CHECK_INTERVAL_MS);
+ long sendCheckTimeout = conf.getLong(RssTezConfig.RSS_CLIENT_SEND_CHECK_TIMEOUT_MS,
+ RssTezConfig.RSS_CLIENT_DEFAULT_SEND_CHECK_TIMEOUT_MS);
+ int bitmapSplitNum = conf.getInt(RssTezConfig.RSS_CLIENT_BITMAP_NUM, RssTezConfig.RSS_CLIENT_DEFAULT_BITMAP_NUM);
+
+ if (conf.get(RssTezConfig.HIVE_TEZ_LOG_LEVEL, RssTezConfig.DEFAULT_HIVE_TEZ_LOG_LEVEL)
+ .equalsIgnoreCase(RssTezConfig.DEBUG_HIVE_TEZ_LOG_LEVEL)) {
+ LOG.info("sortmb is {}", sortmb);
+ LOG.info("sortThreshold is {}", sortThreshold);
+ LOG.info("taskAttemptId is {}", taskAttemptId);
+ LOG.info("maxSegmentSize is {}", maxSegmentSize);
+ LOG.info("maxBufferSize is {}", maxBufferSize);
+ LOG.info("memoryThreshold is {}", memoryThreshold);
+ LOG.info("sendThreshold is {}", sendThreshold);
+ LOG.info("batch is {}", batch);
+ LOG.info("storageType is {}", storageType);
+ LOG.info("sendCheckInterval is {}", sendCheckInterval);
+ LOG.info("sendCheckTimeout is {}", sendCheckTimeout);
+ LOG.info("bitmapSplitNum is {}", bitmapSplitNum);
+ }
+
+
+ String containerIdStr =
+ System.getenv(ApplicationConstants.Environment.CONTAINER_ID.name());
+ ContainerId containerId = ConverterUtils.toContainerId(containerIdStr);
+ ApplicationAttemptId applicationAttemptId =
+ containerId.getApplicationAttemptId();
+ LOG.info("containerIdStr is {}", containerIdStr);
+ LOG.info("containerId is {}", containerId);
+ LOG.info("applicationAttemptId is {}", applicationAttemptId.toString());
+
+
+ bufferManager = new SortWriteBufferManager(
+ tezTaskAttemptID,
+ (long)(ByteUnit.MiB.toBytes(sortmb) * sortThreshold),
+ applicationAttemptId.toString(),
+ taskAttemptId,
+ successBlockIds,
+ failedBlockIds,
+ RssTezUtils.createShuffleClient(conf),
+ comparator,
+ maxSegmentSize,
+ keySerializer,
+ valSerializer,
+ maxBufferSize,
+ memoryThreshold,
+ sendThreshold,
+ batch,
+ new RssConf(),
+ partitionToServers,
+ numMaps,
+ isMemoryShuffleEnabled(storageType),
+ sendCheckInterval,
+ sendCheckTimeout,
+ bitmapSplitNum,
+ shuffleId);
+ LOG.info("Initialized SortWriteBufferManager.");
+ }
+
+ @Override
+ public void flush() throws IOException {
+ bufferManager.waitSendFinished();
+ }
+
+ @Override
+ public final List<Event> close() throws IOException {
+ super.close();
+ bufferManager.freeAllResources();
+ return Collections.emptyList();
+ }
+
+ @Override
+ public void write(Object key, Object value) throws IOException {
+ try {
+ collect(key, value, partitioner.getPartition(key, value, partitions));
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
Review Comment:
Could we use `RssException` instead of `RuntimeException`?
##########
client-tez/org/apache/tez/runtime/library/common/sort/impl/RssSorter.java:
##########
@@ -0,0 +1,196 @@
+package org.apache.tez.runtime.library.common.sort.impl;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import com.google.common.collect.Sets;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.yarn.api.ApplicationConstants;
+import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
+import org.apache.hadoop.yarn.api.records.ApplicationId;
+import org.apache.hadoop.yarn.api.records.ContainerId;
+import org.apache.hadoop.yarn.util.ConverterUtils;
+import org.apache.tez.common.RssTezConfig;
+import org.apache.tez.common.RssTezUtils;
+import org.apache.tez.dag.records.TezTaskAttemptID;
+import org.apache.tez.runtime.api.Event;
+import org.apache.tez.runtime.api.OutputContext;
+import org.apache.tez.runtime.library.common.sort.buffer.SortWriteBufferManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.uniffle.common.ShuffleServerInfo;
+import org.apache.uniffle.common.config.RssConf;
+import org.apache.uniffle.common.exception.RssException;
+import org.apache.uniffle.common.util.ByteUnit;
+import org.apache.uniffle.storage.util.StorageType;
+
+
+
+
+/**{@link RssSorter} is an {@link ExternalSorter}
+ * @author bin3.zhang
+ */
+public class RssSorter extends ExternalSorter {
+
+ private static final Logger LOG = LoggerFactory.getLogger(RssSorter.class);
+ private SortWriteBufferManager bufferManager;
+ private Set<Long> successBlockIds = Sets.newConcurrentHashSet();
+ private Set<Long> failedBlockIds = Sets.newConcurrentHashSet();
+ private Map<Integer, List<ShuffleServerInfo>> partitionToServers;
+
+ private int[] numRecordsPerPartition;
+
+ /**
+ * Initialization
+ */
+ public RssSorter(TezTaskAttemptID tezTaskAttemptID,OutputContext outputContext,
+ Configuration conf, int numMaps, int numOutputs, long initialMemoryAvailable,
+ TezTaskAttemptID tezTaskAttemptId,
+ int shuffleId,
+ Map<Integer, List<ShuffleServerInfo>> partitionToServers) throws IOException {
+ super(outputContext, conf, numOutputs, initialMemoryAvailable);
+ this.partitionToServers = partitionToServers;
+ ApplicationId applicationId = outputContext.getApplicationId();
+
+ LOG.info("tezTaskAttemptId is {}",tezTaskAttemptId);
+
+ this.numRecordsPerPartition = new int[numOutputs];
+
+ long sortmb = conf.getLong(RssTezConfig.RSS_RUNTIME_IO_SORT_MB, RssTezConfig.RSS_DEFAULT_RUNTIME_IO_SORT_MB);
+ LOG.info("conf.sortmb is {}", sortmb);
+ sortmb = this.availableMemoryMb;
+ LOG.info("sortmb, availableMemoryMb is {}, {}", sortmb, availableMemoryMb);
+ if ((sortmb & 0x7FF) != sortmb) {
+ throw new IOException(
+ "Invalid \"" + RssTezConfig.RSS_RUNTIME_IO_SORT_MB + "\": " + sortmb);
+ }
+ double sortThreshold = conf.getDouble(RssTezConfig.RSS_CLIENT_SORT_MEMORY_USE_THRESHOLD,
+ RssTezConfig.RSS_CLIENT_DEFAULT_SORT_MEMORY_USE_THRESHOLD);
+ long taskAttemptId = RssTezUtils.convertTaskAttemptIdToLong(tezTaskAttemptId, 1);
+ long maxSegmentSize = conf.getLong(RssTezConfig.RSS_CLIENT_MAX_BUFFER_SIZE,
+ RssTezConfig.RSS_CLIENT_DEFAULT_MAX_BUFFER_SIZE);
+ long maxBufferSize = conf.getLong(RssTezConfig.RSS_WRITER_BUFFER_SIZE, RssTezConfig.RSS_DEFAULT_WRITER_BUFFER_SIZE);
+ double memoryThreshold = conf.getDouble(RssTezConfig.RSS_CLIENT_MEMORY_THRESHOLD,
+ RssTezConfig.RSS_CLIENT_DEFAULT_MEMORY_THRESHOLD);
+ double sendThreshold = conf.getDouble(RssTezConfig.RSS_CLIENT_SEND_THRESHOLD,
+ RssTezConfig.RSS_CLIENT_DEFAULT_SEND_THRESHOLD);
+ int batch = conf.getInt(RssTezConfig.RSS_CLIENT_BATCH_TRIGGER_NUM,
+ RssTezConfig.RSS_CLIENT_DEFAULT_BATCH_TRIGGER_NUM);
+ String storageType = conf.get(RssTezConfig.RSS_STORAGE_TYPE, RssTezConfig.RSS_DEFAULT_STORAGE_TYPE);
+ if (StringUtils.isEmpty(storageType)) {
+ throw new RssException("storage type mustn't be empty");
+ }
+ long sendCheckInterval = conf.getLong(RssTezConfig.RSS_CLIENT_SEND_CHECK_INTERVAL_MS,
+ RssTezConfig.RSS_CLIENT_DEFAULT_SEND_CHECK_INTERVAL_MS);
+ long sendCheckTimeout = conf.getLong(RssTezConfig.RSS_CLIENT_SEND_CHECK_TIMEOUT_MS,
+ RssTezConfig.RSS_CLIENT_DEFAULT_SEND_CHECK_TIMEOUT_MS);
+ int bitmapSplitNum = conf.getInt(RssTezConfig.RSS_CLIENT_BITMAP_NUM, RssTezConfig.RSS_CLIENT_DEFAULT_BITMAP_NUM);
+
+ if (conf.get(RssTezConfig.HIVE_TEZ_LOG_LEVEL, RssTezConfig.DEFAULT_HIVE_TEZ_LOG_LEVEL)
+ .equalsIgnoreCase(RssTezConfig.DEBUG_HIVE_TEZ_LOG_LEVEL)) {
+ LOG.info("sortmb is {}", sortmb);
+ LOG.info("sortThreshold is {}", sortThreshold);
+ LOG.info("taskAttemptId is {}", taskAttemptId);
+ LOG.info("maxSegmentSize is {}", maxSegmentSize);
+ LOG.info("maxBufferSize is {}", maxBufferSize);
+ LOG.info("memoryThreshold is {}", memoryThreshold);
+ LOG.info("sendThreshold is {}", sendThreshold);
+ LOG.info("batch is {}", batch);
+ LOG.info("storageType is {}", storageType);
+ LOG.info("sendCheckInterval is {}", sendCheckInterval);
+ LOG.info("sendCheckTimeout is {}", sendCheckTimeout);
+ LOG.info("bitmapSplitNum is {}", bitmapSplitNum);
+ }
+
+
+ String containerIdStr =
+ System.getenv(ApplicationConstants.Environment.CONTAINER_ID.name());
+ ContainerId containerId = ConverterUtils.toContainerId(containerIdStr);
+ ApplicationAttemptId applicationAttemptId =
+ containerId.getApplicationAttemptId();
+ LOG.info("containerIdStr is {}", containerIdStr);
+ LOG.info("containerId is {}", containerId);
+ LOG.info("applicationAttemptId is {}", applicationAttemptId.toString());
+
+
+ bufferManager = new SortWriteBufferManager(
+ tezTaskAttemptID,
+ (long)(ByteUnit.MiB.toBytes(sortmb) * sortThreshold),
+ applicationAttemptId.toString(),
+ taskAttemptId,
+ successBlockIds,
+ failedBlockIds,
+ RssTezUtils.createShuffleClient(conf),
+ comparator,
+ maxSegmentSize,
+ keySerializer,
+ valSerializer,
+ maxBufferSize,
+ memoryThreshold,
+ sendThreshold,
+ batch,
+ new RssConf(),
+ partitionToServers,
+ numMaps,
+ isMemoryShuffleEnabled(storageType),
+ sendCheckInterval,
+ sendCheckTimeout,
+ bitmapSplitNum,
+ shuffleId);
+ LOG.info("Initialized SortWriteBufferManager.");
+ }
+
+ @Override
+ public void flush() throws IOException {
+ bufferManager.waitSendFinished();
+ }
+
+ @Override
+ public final List<Event> close() throws IOException {
+ super.close();
+ bufferManager.freeAllResources();
+ return Collections.emptyList();
+ }
+
+ @Override
+ public void write(Object key, Object value) throws IOException {
+ try {
+ collect(key, value, partitioner.getPartition(key, value, partitions));
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ synchronized void collect(Object key, Object value, final int partition) throws IOException, InterruptedException {
+ if (key.getClass() != keyClass) {
+ throw new IOException("Type mismatch in key from map: expected "
+ + keyClass.getName() + ", received "
+ + key.getClass().getName());
+ }
+ if (value.getClass() != valClass) {
+ throw new IOException("Type mismatch in value from map: expected "
+ + valClass.getName() + ", received "
+ + value.getClass().getName());
+ }
+ if (partition < 0 || partition >= partitions) {
+ throw new IOException("Illegal partition for " + key + " ("
+ + partition + ")");
+ }
+
+ bufferManager.addRecord(partition, key, value);
+ numRecordsPerPartition[partition]++;
+ }
+
+ public int[] getNumRecordsPerPartition() {
+ return numRecordsPerPartition;
+ }
+
+ private boolean isMemoryShuffleEnabled(String storageType) {
+ return StorageType.withMemory(StorageType.valueOf(storageType));
+ }
+}
Review Comment:
Could you add a new line?
##########
client-tez/org/apache/tez/runtime/library/output/RssOrderedPartitionedKVOutput.java:
##########
@@ -0,0 +1,310 @@
+package org.apache.tez.runtime.library.output;
+
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.net.InetSocketAddress;
+import java.security.PrivilegedExceptionAction;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.zip.Deflater;
+
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Lists;
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceAudience.Public;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.ipc.RPC;
+import org.apache.hadoop.mapred.JobConf;
+import org.apache.hadoop.net.NetUtils;
+import org.apache.hadoop.security.UserGroupInformation;
+import org.apache.hadoop.yarn.api.records.ApplicationId;
+import org.apache.tez.common.GetShuffleServerRequest;
+import org.apache.tez.common.GetShuffleServerResponse;
+import org.apache.tez.common.RssTezConfig;
+import org.apache.tez.common.RssTezUtils;
+import org.apache.tez.common.TezCommonUtils;
+import org.apache.tez.common.TezRemoteShuffleUmbilicalProtocol;
+import org.apache.tez.common.TezUtils;
+import org.apache.tez.dag.api.TezConfiguration;
+import org.apache.tez.dag.records.TezDAGID;
+import org.apache.tez.dag.records.TezTaskAttemptID;
+import org.apache.tez.dag.records.TezVertexID;
+import org.apache.tez.runtime.api.AbstractLogicalOutput;
+import org.apache.tez.runtime.api.Event;
+import org.apache.tez.runtime.api.OutputContext;
+import org.apache.tez.runtime.api.Writer;
+import org.apache.tez.runtime.library.api.KeyValuesWriter;
+import org.apache.tez.runtime.library.api.TezRuntimeConfiguration;
+import org.apache.tez.runtime.library.common.MemoryUpdateCallbackHandler;
+import org.apache.tez.runtime.library.common.shuffle.ShuffleUtils;
+import org.apache.tez.runtime.library.common.sort.impl.ExternalSorter;
+import org.apache.tez.runtime.library.common.sort.impl.RssSorter;
+import org.apache.tez.runtime.library.common.sort.impl.RssTezSpillRecord;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.uniffle.common.ShuffleServerInfo;
+
+import static org.apache.tez.common.RssTezUtils.HOST_NAME;
+import static org.apache.tez.common.RssTezUtils.uniformPartitionHostInfo;
+
+
+/**
+ * {@link RssOrderedPartitionedKVOutput} is an {@link AbstractLogicalOutput} which
+ * support remote shuffle.
+ *
+ */
+@Public
+public class RssOrderedPartitionedKVOutput extends AbstractLogicalOutput {
+ private static final Logger LOG = LoggerFactory.getLogger(RssOrderedPartitionedKVOutput.class);
+ protected ExternalSorter sorter;
+ protected Configuration conf;
+ protected MemoryUpdateCallbackHandler memoryUpdateCallbackHandler;
+ private long startTime;
+ private long endTime;
+ private final AtomicBoolean isStarted = new AtomicBoolean(false);
+ private final Deflater deflater;
+ private Map<Integer, List<ShuffleServerInfo>> partitionToServers;
+ private int mapNum;
+ private int numOutputs;
+ private TezTaskAttemptID taskAttemptId;
+ private ApplicationId applicationId;
+ private boolean sendEmptyPartitionDetails;
+ private OutputContext outputContext;
+ private String host;
+ private int port;
+ private String taskVertexName;
+ private String destinationVertexName;
+ private int shuffleId;
+
+
+ public RssOrderedPartitionedKVOutput(OutputContext outputContext, int numPhysicalOutputs) {
+ super(outputContext, numPhysicalOutputs);
+ this.outputContext = outputContext;
+ this.deflater = TezCommonUtils.newBestCompressionDeflater();
+ this.numOutputs = getNumPhysicalOutputs();
+ this.mapNum = outputContext.getVertexParallelism();
+ this.applicationId = outputContext.getApplicationId();
+ this.taskAttemptId = TezTaskAttemptID.fromString(
+ RssTezUtils.uniqueIdentifierToAttemptId(outputContext.getUniqueIdentifier()));
+ this.taskVertexName = outputContext.getTaskVertexName();
+ this.destinationVertexName = outputContext.getDestinationVertexName();
+ LOG.info("taskAttemptId is {}", taskAttemptId.toString());
+ LOG.info("taskVertexName is {}", taskVertexName);
+ LOG.info("destinationVertexName is {}", destinationVertexName);
+ LOG.info("Initialized RssOrderedPartitionedKVOutput.");
+ }
+
+ private void getRssConf() {
+ try {
+ JobConf conf = new JobConf(RssTezConfig.RSS_CONF_FILE);
+ this.host = conf.get(RssTezConfig.RSS_AM_SHUFFLE_MANAGER_ADDRESS, "null host");
+ this.port = conf.getInt(RssTezConfig.RSS_AM_SHUFFLE_MANAGER_PORT, -1);
+
+ LOG.info("Got RssConf am info : host is {}, port is {}", host, port);
+ } catch (Exception e) {
+ LOG.warn("debugRssConf error: ", e);
+ }
+ }
+
+ @Override
+ public List<Event> initialize() throws Exception {
+ this.startTime = System.nanoTime();
+ this.conf = TezUtils.createConfFromUserPayload(getContext().getUserPayload());
+ this.memoryUpdateCallbackHandler = new MemoryUpdateCallbackHandler();
+
+ long memRequestSize = RssTezUtils.getInitialMemoryRequirement(conf, getContext().getTotalMemoryAvailableToTask());
+ LOG.info("memRequestSize is {}", memRequestSize);
+ getContext().requestInitialMemory(memRequestSize, memoryUpdateCallbackHandler);
+ LOG.info("Got initialMemory.");
+
+ getRssConf();
+
+ this.sendEmptyPartitionDetails = conf.getBoolean(
+ TezRuntimeConfiguration.TEZ_RUNTIME_EMPTY_PARTITION_INFO_VIA_EVENTS_ENABLED,
+ TezRuntimeConfiguration.TEZ_RUNTIME_EMPTY_PARTITION_INFO_VIA_EVENTS_ENABLED_DEFAULT);
+
+ final InetSocketAddress address = NetUtils.createSocketAddrForHost(host, port);
+
+ UserGroupInformation taskOwner = UserGroupInformation.createRemoteUser(this.applicationId.toString());
+
+ TezVertexID tezVertexID = taskAttemptId.getTaskID().getVertexID();
+ TezDAGID tezDAGID = tezVertexID.getDAGId();
+ this.shuffleId = RssTezUtils.computeShuffleId(tezDAGID.getId(), this.taskVertexName, this.destinationVertexName);
+ LOG.info("Generate shuffleId is {}", shuffleId);
+
+ TezRemoteShuffleUmbilicalProtocol umbilical = taskOwner
+ .doAs(new PrivilegedExceptionAction<TezRemoteShuffleUmbilicalProtocol>() {
+ @Override
+ public TezRemoteShuffleUmbilicalProtocol run() throws Exception {
+ return RPC.getProxy(TezRemoteShuffleUmbilicalProtocol.class,
+ TezRemoteShuffleUmbilicalProtocol.versionID,
+ address, conf);
+ }
+ });
+
+ GetShuffleServerRequest request = new GetShuffleServerRequest(this.taskAttemptId, this.mapNum,
+ this.numOutputs, this.shuffleId);
+ LOG.info("RequestInfo taskAttemptId is {}, mapNum is {}, numOutputs is {}",
+ taskAttemptId.toString(), mapNum, numOutputs);
+ GetShuffleServerResponse response = umbilical.getShuffleAssignments(request);
+ this.partitionToServers = response.getShuffleAssignmentsInfoWritable()
+ .getShuffleAssignmentsInfo()
+ .getPartitionToServers();
+
+ LOG.info("Got response from am.");
+
+ LOG.info("Got the original host : {}", this.outputContext.getExecutionContext().getHostName());
+
+ String uniformPartitionHostInfo = uniformPartitionHostInfo(partitionToServers);
+
+ modifyHost(this.destinationVertexName, uniformPartitionHostInfo);
+
+ LOG.info("Set the rss worker host : {}", uniformPartitionHostInfo);
+
+ return Collections.emptyList();
+ }
+
+ public String modifyHost(String vertexName, String uniformPartitionHostInfo)
+ throws NoSuchFieldException, IllegalAccessException {
+ synchronized (outputContext.getExecutionContext()) {
+ LOG.info("Got host info is {}", uniformPartitionHostInfo);
+ assert uniformPartitionHostInfo != null;
+ Field field = outputContext.getExecutionContext().getClass().getDeclaredField(HOST_NAME);
+ String lastHostName = outputContext.getExecutionContext().getHostName();
+ String appendHostName = vertexName + "=" + uniformPartitionHostInfo;
+ String modifyHostName = lastHostName + ";" + appendHostName;
+ LOG.info("lastHostName is {}, appendHostName is {}, modifyHostName is {}",
+ lastHostName, appendHostName, modifyHostName);
+ field.setAccessible(true);
+ field.set(this.outputContext.getExecutionContext(), modifyHostName);
+ field.setAccessible(false);
+ return outputContext.getExecutionContext().getHostName();
+ }
+ }
+
+ @Override
+ public void handleEvents(List<Event> list) {
+ // Not expecting any events.
+ }
+
+ @Override
+ public List<Event> close() throws Exception {
+ List<Event> returnEvents = Lists.newLinkedList();
+ if (sorter != null) {
+ sorter.flush();
+ returnEvents.addAll(sorter.close());
+ this.endTime = System.nanoTime();
+ returnEvents.addAll(generateEvents());
+ sorter = null;
+ } else {
+ LOG.warn(getContext().getDestinationVertexName()
+ + ": Attempting to close output {} of type {} before it was started. Generating empty events",
+ getContext().getDestinationVertexName(), this.getClass().getSimpleName());
+ returnEvents = generateEmptyEvents();
+ }
+ LOG.info("RssOrderedPartitionedKVOutput close.");
+ return returnEvents;
+ }
+
+ @Override
+ public void start() throws Exception {
+ if (!isStarted.get()) {
+ memoryUpdateCallbackHandler.validateUpdateReceived();
+ sorter = new RssSorter(taskAttemptId, getContext(), conf, mapNum, numOutputs,
+ memoryUpdateCallbackHandler.getMemoryAssigned(), taskAttemptId, shuffleId,
+ partitionToServers);
+ LOG.info("Initialized RssSorter.");
+ isStarted.set(true);
+ }
+ }
+
+ @Override
+ public Writer getWriter() throws IOException {
+ Preconditions.checkState(isStarted.get(), "Cannot get writer before starting the Output");
+
+ return new KeyValuesWriter() {
+ @Override
+ public void write(Object key, Iterable<Object> values) throws IOException {
+ sorter.write(key, values);
+ }
+
+ @Override
+ public void write(Object key, Object value) throws IOException {
+ sorter.write(key, value);
+ }
+ };
+ }
+
+ private List<Event> generateEvents() throws IOException {
+ List<Event> eventList = Lists.newLinkedList();
+ boolean isLastEvent = true;
+
+ String auxiliaryService = conf.get(TezConfiguration.TEZ_AM_SHUFFLE_AUXILIARY_SERVICE_ID,
+ TezConfiguration.TEZ_AM_SHUFFLE_AUXILIARY_SERVICE_ID_DEFAULT);
+
+ int[] numRecordsPerPartition = ((RssSorter) sorter).getNumRecordsPerPartition();
+ RssTezSpillRecord rssTezSpillRecord = new RssTezSpillRecord(numOutputs, numRecordsPerPartition);
+
+ LOG.info("RssTezSpillRecord is initialized");
+
+ ShuffleUtils.generateEventOnSpill(eventList, true, isLastEvent,
+ getContext(), 0, rssTezSpillRecord,
+ getNumPhysicalOutputs(), sendEmptyPartitionDetails, getContext().getUniqueIdentifier(),
+ sorter.getPartitionStats(), sorter.reportDetailedPartitionStats(), auxiliaryService, deflater);
+ LOG.info("Generate events.");
+
+ return eventList;
+ }
+
+ private List<Event> generateEmptyEvents() throws IOException {
+ List<Event> eventList = Lists.newArrayList();
+ ShuffleUtils.generateEventsForNonStartedOutput(eventList,
+ getNumPhysicalOutputs(),
+ getContext(),
+ true,
+ true,
+ deflater);
+ LOG.info("Generate empty events.");
+ return eventList;
+ }
+
+ private static final Set<String> confKeys = new HashSet<String>();
+
+ static {
+ confKeys.add(TezRuntimeConfiguration.TEZ_RUNTIME_IFILE_READAHEAD);
+ confKeys.add(TezRuntimeConfiguration.TEZ_RUNTIME_IFILE_READAHEAD_BYTES);
+ confKeys.add(TezRuntimeConfiguration.TEZ_RUNTIME_IO_FILE_BUFFER_SIZE);
+ confKeys.add(TezRuntimeConfiguration.TEZ_RUNTIME_INDEX_CACHE_MEMORY_LIMIT_BYTES);
+ confKeys.add(TezRuntimeConfiguration.TEZ_RUNTIME_UNORDERED_OUTPUT_BUFFER_SIZE_MB);
+ confKeys.add(TezRuntimeConfiguration.TEZ_RUNTIME_UNORDERED_OUTPUT_MAX_PER_BUFFER_SIZE_BYTES);
+ confKeys.add(TezRuntimeConfiguration.TEZ_RUNTIME_PARTITIONER_CLASS);
+ confKeys.add(TezRuntimeConfiguration.TEZ_RUNTIME_KEY_CLASS);
+ confKeys.add(TezRuntimeConfiguration.TEZ_RUNTIME_VALUE_CLASS);
+ confKeys.add(TezRuntimeConfiguration.TEZ_RUNTIME_COMPRESS);
+ confKeys.add(TezRuntimeConfiguration.TEZ_RUNTIME_COMPRESS_CODEC);
+ confKeys.add(TezRuntimeConfiguration.TEZ_RUNTIME_EMPTY_PARTITION_INFO_VIA_EVENTS_ENABLED);
+ confKeys.add(TezRuntimeConfiguration.TEZ_RUNTIME_CONVERT_USER_PAYLOAD_TO_HISTORY_TEXT);
+ confKeys.add(TezRuntimeConfiguration.TEZ_RUNTIME_PIPELINED_SHUFFLE_ENABLED);
+ confKeys.add(TezRuntimeConfiguration.TEZ_RUNTIME_ENABLE_FINAL_MERGE_IN_OUTPUT);
+ confKeys.add(TezConfiguration.TEZ_COUNTERS_MAX);
+ confKeys.add(TezConfiguration.TEZ_COUNTERS_GROUP_NAME_MAX_LENGTH);
+ confKeys.add(TezConfiguration.TEZ_COUNTERS_COUNTER_NAME_MAX_LENGTH);
+ confKeys.add(TezConfiguration.TEZ_COUNTERS_MAX_GROUPS);
+ confKeys.add(TezRuntimeConfiguration.TEZ_RUNTIME_CLEANUP_FILES_ON_INTERRUPT);
+ confKeys.add(TezRuntimeConfiguration.TEZ_RUNTIME_REPORT_PARTITION_STATS);
+ confKeys.add(TezConfiguration.TEZ_AM_SHUFFLE_AUXILIARY_SERVICE_ID);
+ confKeys.add(
+ TezRuntimeConfiguration.TEZ_RUNTIME_UNORDERED_PARTITIONED_KVWRITER_BUFFER_MERGE_PERCENT);
+ }
+
+ @InterfaceAudience.Private
+ public static Set<String> getConfigurationKeySet() {
+ return Collections.unmodifiableSet(confKeys);
+ }
+
+}
Review Comment:
There is a warning, could you add a new line?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org