org.apache.hadoop.mapred.Task.getFileSystemCounterNames()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(95)

本文整理了Java中org.apache.hadoop.mapred.Task.getFileSystemCounterNames()方法的一些代码示例,展示了Task.getFileSystemCounterNames()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getFileSystemCounterNames()方法的具体详情如下:
包路径:org.apache.hadoop.mapred.Task
类名称:Task
方法名:getFileSystemCounterNames

Task.getFileSystemCounterNames介绍

[英]Counters to measure the usage of the different file systems. Always return the String array with two elements. First one is the name of BYTES_READ counter and second one is of the BYTES_WRITTEN counter.
[中]计数器来测量不同文件系统的使用情况。始终返回包含两个元素的字符串数组。第一个是字节读取计数器的名称,第二个是字节写入计数器的名称。

代码示例

代码示例来源:origin: org.apache.hadoop/hadoop-mapred

FileSystemStatisticUpdater(String uriScheme, FileSystem.Statistics stats) {
 this.stats = stats;
 this.counterNames = getFileSystemCounterNames(uriScheme);
}

代码示例来源:origin: com.facebook.hadoop/hadoop-core

FileSystemStatisticUpdater(String uriScheme, FileSystem.Statistics stats) {
 this.stats = stats;
 this.counterNames = getFileSystemCounterNames(uriScheme);
}

代码示例来源:origin: org.apache.hadoop/hadoop-mapred-test

long hdfsRead = 
 counters.findCounter(Task.FILESYSTEM_COUNTER_GROUP, 
   Task.getFileSystemCounterNames("hdfs")[0]).getCounter();
long hdfsWrite = 
 counters.findCounter(Task.FILESYSTEM_COUNTER_GROUP, 
   Task.getFileSystemCounterNames("hdfs")[1]).getCounter();
long rawSplitBytesRead = 
 counters.findCounter(TaskCounter.SPLIT_RAW_BYTES).getCounter();

相关文章