hadoop
关于
1年前
更新
0
频次
25
题目数
分享
感谢您能抽出几分钟时间来参加本次答题,现在我们就马上开始吧!
Q1:A:大数据的定义是无法由现有软件工具提取,存储,搜索,共享,分析和处理的庞大而复杂的数据集。B:DT:数字处理技术,一种服务于公众并刺激生产力的技术。
Q2:以下哪个选项不是大数据的显著特征?
Q3:关于下面的说法,不正确的是
Q4:以下那个不是Hadoop可以运行的模式?
Q5:HBase依靠以下哪个框架存储底层数据?
Q6:以下哪个Hadoop shell命令用于改变文件的拥有者?
Q7:以下对Hadoop shell命令的描述,哪个是错误的?
Q8:在Hadoop的shell命令中,显示HDFS上/user/niit/data.txt文件内容的命令,正确的是?
Q9:以下哪个函数可以用于修改HDFS中的文件名?
Q10:以下哪个函数可以用于删除HDFS中的文件?
Q11:以下哪个不是Hadoop序列化的特点?
Q12:以下哪个选项是正确的?
Q13:以下哪个选项是错误的?
Q14:在NameNode的数据文件夹中,有几个特定文件名的文件,关于这几个文件的描述正确的是?A:fsimage:元数据镜像文件。存储某一时段NameNode内存元数据信息B:fstime:保存最近一次checkpoint的时间
Q15:15. 关于NameNode的说法,正确的是?A:提供真实文件数据的存储服务,DataNode启动时的上报自身存储的块信息B:Replication:多复本。默认是三个,可通过配置文件配置
Q16:关于ResourceManager的说法,正确的是?A:用户提交的每个应用程序均包含一个ApplicationMaster,主要功能与ResourceManager调度器协商以获取资源B:和资源管理器协商,以获取资源(Container)个,可通过配置文件配置
Q17:关于Container的说法,正确的是?A:Container 是YARN 中的资源抽象,它封装了某个DataNode节点上的资源,如有多少内存、多少个CPUB:ResourceManager以Container的形式来返回NodeManager申请的资源
Q18:关于NodeManager的说法,正确的是?A:它会定时地向 AM 汇报本节点上的资源使用情况和各个 Container 的运行状态B:它接收并处理来自 AM 的 Container 启动/停止等各种请求
Q19:public class FileDecompressor { public static void main(String[] args) throws Exception { String uri = args[0]; Configuration conf = new Configuration(); FileSystem fs = FileSystem.get(URI.create(uri), conf); Path inputPath = new Path(uri); ( ) if (codec == null) { System.err.println(No codec found for + uri); System.exit(1); } String outputUri = CompressionCodecFactory.removeSuffix(uri, codec.getDefaultExtension()); InputStream in = null; OutputStream out = null; try { in = codec.createInputStream(fs.open(inputPath)); out = fs.create(new Path(outputUri)); IOUtils.copyBytes(in, out, conf); } finally { IOUtils.closeStream(in); IOUtils.closeStream(out); } }}以上代码中缺少了创建解码对象codec的语句,下面哪个选项是正确的?
Q20:以下描述正确的是:(1)Map是映射,负责数据的过滤分发;Reduce是规约,负责数据的计算归并。(2)Reduce的数据来源于Map,Map的输出即是Reduce的输入,Reduce需要通过 Shuffle来获取数据。
Q21:请分析以下代码片段:public class WordCount { public static void main(String[] args) throws Exception { Configuration conf = new Configuration();① Job job = Job.getInstance(conf);② job.setJarByClass(WordCount);③ job.setMapperClass(TokenizerMapper.class);④ job.setReducerClass(IntSumReducer.class);…… System.exit(job.waitForCompletion(true) ? 0 : 1); } public static class TokenizerMapper extends MapperObject, Text, Text, IntWritable { …… } public static class IntSumReducer extends ReducerText, IntWritable, Text, IntWritable { …… }}语句①-④中有语法错误的是?
Q22:以下对RecordReader描述正确的是:(1) RecordReader的目的是把数据解析成记录,它把数据以键值对的形式传递给mapper。(2)通常情况下键是偏移量,值是这条记录的整个字节块。
Q23:public class MaxAndMinValue implements WritableComparableMaxAndMinValue {①private LongWritable min;private LongWritable max;private IntWritable total;public MaxAndMinValue() {② this.min=new LongWritable(0); this.max=new LongWritable(0); this.total=new IntWritable(0);}@Overridepublic void write(DataOutput out) throws IOException { min.write(out); max.write(out); total.write(out);}@Overridepublic void readFields(DataInput in) throws IOException { total.readFields(in);③ max.readFields(in); min.readFields(in);}@Overridepublic String toString() { return min.get()+\t+max.get()+\t+total.get();}@Overridepublic int compareTo(MaxAndMinValue o) {④ return 0;} }以上代码实现了Hadoop的自定义序列化,其中有一处错误,以下那个选项的描述是正确的:
Q24:class DistinctMapper extends MapperLongWritable, Text, Text, NullWritable {① @Override protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException { context.write(value, NullWritable.get()); }}class DistinctReducer extends ReducerText, NullWritable, Text, NullWritable {② @Override protected void reduce(Text key, IterableNullWritable values, Context context) throws IOException, InterruptedException { context.write(key, NullWritable.get()); }}public class DistinctDriver { public static void main(String[] args) throws IOException, ClassNotFoundException, InterruptedException { Configuration conf = new Configuration(); Job job = Job.getInstance(conf); job.setJarByClass(DistinctDriver.class); job.setMapperClass(DistinctMapper.class); job.setReducerClass(DistinctReducer.class); job.setMapOutputKeyClass(Text.class); job.setMapOutputValueClass(Text.class);③ job.setOutputKeyClass(Text.class); job.setOutputValueClass(NullWritable.class);④ FileInputFormat.addInputPath(job, new Path(args[0])); FileOutputFormat.setOutputPath(job, new Path(args[1])); System.exit(job.waitForCompletion(true) ? 0 : 1); }}以上代码实现了去重模式,其中有一处错误,以下那个选项的描述是正确的:
Q25:使用MR实现过滤模式时,针对以下的输入文件name,agezhangsan,23lisi,46wangwu,67zhaoliu,34张三想实现一个类似如下的sql的逻辑:select * from table where age 30请帮张三完成空白处的代码:static class filterMap extends MapperLongWritable, Text, NullWritable, Text{private String mapRegex=;Pattern pattern = Pattern.compile(mapRegex);@Overrideprotected void map(LongWritable key, Text value,Context context) throws IOException, InterruptedException {if(_____A_____){context.write(NullWritable.get(), ____B___);}}@Overrideprotected void setup(Context context) throws IOException, InterruptedException {mapRegex=context.getConfiguration().get(mapRegex); }
联系我们
问卷网公众号