hadoop開發(fā)者第二期-大數(shù)據(jù)文檔資料_第1頁
hadoop開發(fā)者第二期-大數(shù)據(jù)文檔資料_第2頁
hadoop開發(fā)者第二期-大數(shù)據(jù)文檔資料_第3頁
hadoop開發(fā)者第二期-大數(shù)據(jù)文檔資料_第4頁
hadoop開發(fā)者第二期-大數(shù)據(jù)文檔資料_第5頁
已閱讀5頁,還剩117頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

開放Hadoop開發(fā)者的第二期繼續(xù)延續(xù)著分享、自由、開放這一開源社區(qū)Hadoop應(yīng)用一直是大家關(guān)注而又熱衷的話題,這一期里原本打算推出Hadoop與搜索引擎這一主題,但遺憾少,難以成刊,只好作罷。從稿件質(zhì)量看來,《Hado要一些更高水平的稿件,而不能僅僅局限于GettingStart的愛好者的廣泛參與,我們?cè)谄诖髱熂?jí)文章的出現(xiàn)。公司的“人才獵手”Syvia,得知到業(yè)界的很多著名IT公司近幾年都在本期執(zhí)行主編:Barry4 11、HiveSQL手冊(cè)翻譯 Hadoop資訊《Hadoop開發(fā)者》Hadoop業(yè)界資訊今年1月,InfoWorld授予ApachHadoop公司創(chuàng)造了使用商用硬件上數(shù)千兆數(shù)據(jù)來運(yùn)行大規(guī)模分析計(jì)算功能的可能性。有了Hadoop和開源NoSQL數(shù)據(jù)庫來大幅度減少數(shù)據(jù)處理時(shí)會(huì)被很多用戶用在開源代碼的研發(fā)上。雖然這還有一段適應(yīng)的過程,但行業(yè)中的很多用戶看2.網(wǎng)友觀點(diǎn):SQL和關(guān)系型數(shù)據(jù)庫它們并不適合云計(jì)算行的云計(jì)算重大會(huì)議之一。到目前為止,會(huì)議一個(gè)較大的議題是“不使用關(guān)系型數(shù)據(jù)庫來保持?jǐn)?shù)據(jù)庫上對(duì)大規(guī)模數(shù)據(jù)進(jìn)行操作是兵家大忌,因?yàn)樵谔幚頂?shù)據(jù)時(shí)S如果你覺得以前好像在哪里聽過這種說法,那么我告訴你其實(shí)你是對(duì)的。早在上世紀(jì)90Hadoop資訊《Hadoop開發(fā)者》點(diǎn)故障;出身于Facebook,天生為海量數(shù)據(jù)設(shè)計(jì);適用于大量分布式寫操作;依托于一個(gè)健他關(guān)系型數(shù)據(jù)庫加載數(shù)據(jù)的手段,這意味著那些潛在用戶可以考慮嘗試將其系統(tǒng)用于今天的MySQL不得不面臨許多問題,它在大型應(yīng)用領(lǐng)域的采用率較低,同時(shí)面臨4.互聯(lián)網(wǎng)兩巨頭PK“云計(jì)算”(聲明:以上文章均來自互聯(lián)網(wǎng),由Barry編輯)Nutch+Hadoop構(gòu)建商用分布式搜索引擎的問題探究(作者:Barry)個(gè)部分:一個(gè)分布式文件系統(tǒng)HDFS(HadoopDistributedF現(xiàn)。因此,Hadoop的目標(biāo)是為開發(fā)分布式應(yīng)用提供一個(gè)框架,而不是像OpenAFS,Coda那本文就作者在工作中如何改造Nutch以實(shí)現(xiàn)支持海量數(shù)據(jù)檢索2.Nutch工作原理解釋基于Nutch的分布式搜索引擎,其構(gòu)架可取循環(huán)重新開始。這個(gè)循環(huán)過程可以叫做“產(chǎn)生/([1]/new來Index拷貝出來就可以成為獨(dú)立的一個(gè)索引塊,這樣的索引塊在作為一個(gè)檢件系統(tǒng)中,而不是HDFS上,根據(jù)Nutch官方WIki的解釋認(rèn)為,是效率決定,不能將索引文3.利用Nutch構(gòu)建商用分布式搜索引擎存在的問題思考筆者測(cè)試的Nutch集群構(gòu)建的爬蟲方式,效率不高,爬取頁面的速Nutch的爬蟲提供兩種方式,一種是站內(nèi)爬蟲、一種是全網(wǎng)l放在每臺(tái)機(jī)器提供索引服務(wù)的Local的索引每塊放多大合適?如果是放幾塊如果上百GB的索引拷貝是非常耗時(shí)的!尤其是索引更4.基于Nutch+Hadoop構(gòu)建商用分布式檢索構(gòu)架問題及其關(guān)鍵點(diǎn)在前文中基本進(jìn)行了論述。其中設(shè)計(jì)的技術(shù)組件和程序流程見下圖所述,其中Heritrix直接寫外網(wǎng)路由器交換機(jī)B1 交換機(jī)C1交換機(jī)A1Web-1/WStore-1S-1 S-1Crawl-1/CStore-1Crawl-1/CStore-11US-3M-11US-3S-2Crawl-2/S-2Crawl-2/CStore-21U1Crawl-3/CStore-3S-3-Crawl-3/CStore-3S-3-Disk71U1US-3-Disk8M-1-S-3-Disk8Crawl-4/CStore-4Crawl-4/CStore-41US-4-Disk9S-1-Disk1US-4-Disk9爬蟲集群爬蟲集群S-4-Disk10S-1-S-4-Disk10S-2-Disk6S-2-S-2-Disk6索引構(gòu)建與分布集群支持自定義爬蟲的Nutchsegment文件存儲(chǔ)接口改寫作者:mingyuanEmail:cn.mingyuan@形式,以便利用Nutch的分布式索引構(gòu)建、檢索功能,從而可以實(shí)現(xiàn)Nutch使用的是Lucene的索引機(jī)制,關(guān)鍵數(shù)據(jù)存儲(chǔ)在segment中,其余的數(shù)據(jù)皆可從(1)CreateSegment(PatharcFjob.setInputFormat(ArcInputFormat.class);//指定輸入數(shù)據(jù)格式j(luò)ob.setMapperClass(ArcSegmentCreator.class);//MapFileOutputFormat.setOutputPath(job,newPath(segmentOutDir,segName));//輸出路徑j(luò)ob.setOutputFormat(FetcherOutputFormat.class);//輸出格式j(luò)ob.setOutputKeyClass(Text.class);//輸出的KeyClass看到,在map方法進(jìn)行一系列處理之后map過程并沒有結(jié)束而是交給output方法繼續(xù)執(zhí)行未output(output,segmentName,url,datum,null,null,CrawlDatum.STATUS_FETCH_RETRY)2修改程序?yàn)榉莔apreduce程序ArcSegmentCreator是針對(duì)已經(jīng)抓取的數(shù)據(jù)進(jìn)行批量處理的,不能滿足數(shù)據(jù)即時(shí)寫入的需在ArcSegmentCreator基礎(chǔ)上修改代碼比較簡(jiǎn)單,程序的輸入與輸出即可。流程大概是這樣的:數(shù)據(jù)首先輸入到map()中,然后由map()流向完成持久化操作,從而解決輸出問題。需要注意的是ArcSegmentCreator使用MapRedPathseqFilePath=nPathseqSortedFilePath=newPath(filePath,"data."-outFormat","org.apache.hadoop.mapred"-outValue",valueClass.getName(),seqFilePath.toStFileSystemfs=FileSystem.get(filePath.toUri(),conf);//將SequenceFile轉(zhuǎn)化為MapFileMapFile.fix(fs,contentPath,Text.clMapFile.fix(fs,fetchPath,Text.class,CrawlDatum.class,false,conf);MapFile.fix(fs,textPath,Text.MapFile.fix(fs,dataPath,Text.class,Parse4建立索引(2)根據(jù)segment生成linkdb:bin/nutchinNutch中mapreduce應(yīng)用的幾個(gè)特殊點(diǎn)author:皮冰鋒email:pi.bingfeng@1.SpeculativeExecution的job如爬蟲中為了保持爬蟲的禮節(jié)性,不能有多個(gè)機(jī)器同時(shí)去抓取一個(gè)站點(diǎn)。這時(shí)就可以設(shè)臵jobjob.setSpeculativeExecution(false);Job.setMapSpeculativeExecution(false);Job.setReduceSpeculativeExecution(false);定義輸出:FileOutputFormat.sNutch中Mapreduce應(yīng)用的幾個(gè)特殊點(diǎn)《Hadoop開發(fā)者》FetcherOutputFormat繼承了OutputFormat接口,實(shí)現(xiàn)了自定義的RecordWriter,接收在publicclassFetcherOutputFormatimplementsOutputFormat<Text,NutchWritable>{publicRecordWriter<Text,NutchWritablefinalFileSystemfs,finalJobConfjob,finalStringname,finalProgressableprogress)throwsIOException{//TODOsomething}RecordWriter是我們關(guān)注的重點(diǎn),在它的write函數(shù)中,成封裝之前的Content,CrawlDatum,ParseImpl對(duì)象publicvoidwrite(Textkey,NutchWritablevalue)throwsIOException{Writablew=value.get();if(winstanceofCrawlDatum)fetchOut.append(key,w);elseif(winstanceofContent)contentOut.append(key,w);elseif(winstanceofParse)}這種做法比較獨(dú)特,我很欣賞。如果想了解更多細(xì)節(jié),大家可以去仔細(xì)看看拿Indexer的DeleteDuplicates類來說,它需要讀取lupublicstaticclassInputFormatextendsFileInputFormat<Text,IndexDoc>{privatestaticfinallongINDEX_LENGTH=Integer.MAX_VALUE;/**Returneachindexasasplit.*/publicInputSplit[]getSplits(JobConfjob,intnumSplits)throwsIOException{FileStatus[]files=listStatus(job);for(inti=0;i<files.length;i++){FileStatuscur=files[i];splits[i]=newFileSplit(cur.getPath(),0,INDEX_LENGTH,(String[]}returnsplits;}publicclassDDRecordReaderimplementsRecordReader<Text,IndexDoc>{}InputSplit文件格式分析《Hadoop開發(fā)者》JavaRMI+Lucene構(gòu)建分布式檢索應(yīng)用初探(作者:Barry)packagermi.test;importjava.rmi.Remote;importjava.rmi.RemoteException;importjava.util.List;/**publicinterfaceSearchInterfextendsRemote{/**publicList<NewsSearchResult>queryList(String[]fileds,String[]keywords)throwsRemoteException;}2.服務(wù)器端得檢索業(yè)務(wù)實(shí)現(xiàn)類packagermi.test;/**importjava.io.IOException;importjava.rmi.RemoteException;importjava.util.ArrayList;importjava.util.List;publicclassSearchServiceextendsUnicastRemoteObjectimplementsSeprivatestaticfinallongserialVersionUID=-7810768762217713731L;//空的構(gòu)造函數(shù)publicSearchService()throwsRe//TODOAuto-generatedconstructorstub}publicList<NewsSearchResult>queryList(String[]fields,String[]keywords)//TODOAuto-generatedmethodstubInputSplit文件格式分析《Hadoop開發(fā)者》//采用布爾檢索//構(gòu)建檢索條件for(inti=0;i<fields.length;i++){}//初始化search//查詢//TODOAuto-generatedcatchblock//TODOAuto-generatedcatchblock}//讀取Hits包裝檢索結(jié)果ArrayList<NewsSearchReDocumentdoc=hits.doc(iStringpubtime=doc.get("pubtime");Stringtempid=doc.gnewsList.add(newNews}}}publicstaticvoidmain(String[]args){String[]fields=newString[]{"title","content"};List<NewsSearchResult>for(NewsSearchResultnewsSearc{System.out.println(newsSearchResSystem.out.println(newsSearchResult.getId());System.out.println("");}//TODOAuto-generatedcatchblock}}}3.注冊(cè)RMI應(yīng)用的服務(wù)器端程序InputSplit文件格式分析《Hadoop開發(fā)者》packagermi.test;/***importjavax.naming.Context;importjavax.naming.InitialContext;publicclassSimpleSearchServer{publicstaticvoidmain(String[]args){//實(shí)例化一個(gè)應(yīng)用//將應(yīng)用綁定到RMI的端口namingContext.rebind("rmi:SearchServicSystem.out.println("服務(wù)器注冊(cè)//TODOAuto-generatedcatchblock}}}4.Client端的檢索提交與實(shí)現(xiàn)packagermi.test;/**importjava.util.List;importjavax.naming.Context;importjavax.naming.InitialContext;importjavax.naming.NamingException;publicclassSimpleSearchClient{publicstaticvoidmain(String[]args){//聲明應(yīng)用的RMI服務(wù)//System.out.println("aaaaaaaa");//構(gòu)建檢索條件String[]fields=newString[]{"title","content"};List<NewsSearchResult>newsList=service1.quefor(NewsSearchResultnewsSe{System.out.println(newsSearchResult.getId());System.out.println(newsSearchResSystem.out.println("");{}}}catch(NamingExcept//TODOAuto-generatedcatchblock//TODOAuto-generatedcatchblockInputSplit文件格式分析《Hadoop開發(fā)者》}}}packagermi.test;importjava.io.Serializable;/**publicclassNewsSearchResultimplementsSerialprivatestaticfinallongserialVersionUID=-2685508592396115327L;privateStringid;//idprivateStringtitle;//標(biāo)題privateStringsite;//站點(diǎn)privateStringpubtime;//發(fā)布時(shí)間privateStringsourceurl;//來源URLprivateStringcontent;//內(nèi)容privateStringgenus;//分類號(hào)privateStringtempid;//分類號(hào)privateStringtype;//類型publicNewsSearchResult(){//TODOAuto-generatedconstructorstub}publicStringgetSourceurl(){}publicvoidsetSourceurl(Stringsourceurl){}}6.程序的結(jié)構(gòu)7.命令行下程序的運(yùn)行(一定要注意路徑)classpath=".;D:\project\distributedSearch\lib\lucene-core-2.3.jar"D:\project\distributedSearch\bin>startrmiregistryD:\project\distributedSearch\bin>startjavarmi.test.SimpleSearchServerD:\project\distributedSearch\bin>javarmi.tesInputSplit文件格式分析《Hadoop開發(fā)者》一對(duì)多的表關(guān)聯(lián)在Mapreduce中的應(yīng)用(續(xù))Author:皮冰鋒Email:pi.bingfeng@對(duì)一”的關(guān)系。但在很多情況下,我們需要處理“一對(duì)多”的關(guān)系,即同一系列的“tradeID”product1"trade1product2"trade2product3"trade3product1"pay1product2"pay2product2"pay4product3"pay3publicclassCommonReduceextendsMapReduceB一對(duì)多表關(guān)聯(lián)在MapReduce中的應(yīng)用《Hadoop開發(fā)者》publicvoidreduce(TexStringtradeID="";ArrayList<String>payIDlist=newArrayList<Striwhile(values.hasNext()){Stringvalue=values.next().tvalue.length());if(value.startsWith("supid")){//istradetradeID}elseif(value.startsWith("buyid")){payIDlist.add(subValue);}}for(StringpayID:payIDlist){}}問題分析:如果數(shù)據(jù)量較小,這種實(shí)現(xiàn)方式不會(huì)有問題;但如果數(shù)據(jù)量偏大,payIDlistpublicclassPreMapperextendsMapReduceBasepublicvoidmap(LongWritablekey,Textv//inputfilepathStringpath=((FileSplit)reporter.geif(line.length<2){//skipbadvalue}StringproductID=line[0Textkv=newText();if(path.indexOf("action")>=0){//tradetablekr.setID(0);//用于TextPair的排序kv.set(tradeID);//va}elseif(path.indexOf("alipay")>=0){//paytablekr.setID(1);//用于TextPair的排序StringpayID=line[1];kv.set(payID);//valueispayID}}privateStringtext;privateintid;publicTextPair(){}publicTextPair(Stringtext,intid){一對(duì)多表關(guān)聯(lián)在MapReduce中的應(yīng)用《Hadoop開發(fā)者》}publicvoidsetText(Stringtext){}publicvoidsetID(intid){}publicvoidreadFields(DataInputin)throwsIOException{}publicvoidwrite(DataOutputout)throwsIOException{out.writeUTF(text);out.writeInt(id);}publicintcompareTo(Objecto){//先比較text,在比較idif(!this.text.equals(that.text)){}}}}publicclassCommonReduceextendsMapReduceBStringtradeId=values.next().toString();/irstvalueistradeIDwhile(values.hasNext()){//nextispayIDStringpayID=values.next().toString();output.collect(new}}publicclassJoin{publicstaticvoidmain(String[]args)throwsIOException{System.exit(-1);}StringjoinTableDir=args[2];//定義Job//addinputpath:tradetable&&paytableFileInputFormat.addInputPath(conf,newPath(tradeFileInputFormat.addInputPath(conf,newPath(payTableconf.setInputFormat(TextInconf.setReducerClass(Commconf.setOutputFormat(Te//outputFileOutputFormat.setOutputPath(conf,newPath(joinTableDJobClient.runJob(conf);一對(duì)多表關(guān)聯(lián)在MapReduce中的應(yīng)用《Hadoop開發(fā)者》}publicstaticclassKeyPartitioner}publicvoidconfigure(JobConfjob){}}publicstaticclassFirstComparatorextendsWritpublicFirstComparator(){//registercomparatorsuper(TextPair.class,true);}}}trade1trade2trade2trade3InputSplit文件格式分析本文將詳細(xì)介紹InputSplit文件是如何產(chǎn)生的,以及它的二進(jìn)制格式,所研究的版本是2生成過程filename:Path:filename:Path:FileSystemInputFormatInputSplitJobSubmitter:Caller(Client):FSDataOutputStream1.3.writeSplitsFileHeader1.4.writeSplitsFileBodywriteSplits1.1.getSplits1.1.1.List<InputSplit>1.2.sortsortthesplitsintoorderbasedonsize,sothat1.3.writeSplitsFileHeader1.4.writeSplitsFileBodywriteSplits1.1.getSplits1.1.1.List<InputSplit>1.2.sortsortthesplitsintoorderbasedonsize,sothatthebiggestgofirst1.3.1.getFileSystem.fs1.3.2.create(fs,filename,FsPermission).FSDataOutputStream1.3.3.write(SPLIT_FILE_HEADER)1.3.4.write(CURRENT_SPLIT_FILE_VERSION)1.3.5.write(numberofsplits)<traverseallInputSplits1.4.1.write(splitClass)1.4.2.write(sizeofsplit)1.4.3.write(dataofsplit)1.4.4.write(numberoflocations)1.4.5.write(locations)一對(duì)多表關(guān)聯(lián)在MapReduce中的應(yīng)用《Hadoop開發(fā)者》310org.apache.hadoop.mapred.8定88HDFS在Web開發(fā)中的應(yīng)用《Hadoop開發(fā)者》HDFS在web開發(fā)中的應(yīng)用使用分布式文件系統(tǒng)正好滿足相冊(cè)的技術(shù)機(jī)構(gòu)。每個(gè)圖片一般經(jīng)過壓縮后最大幾M,每個(gè)圖ApacheServerApacheServerApacheServerApacheServerApacheServerApacheServerApacheServer瀏覽器ApacheServerDataNodeDataNodeDataNodeDataNodeDataNodeDataNodeDataNodeDataNodeDataNodeStringfiledisplay=(String)request.Pathpath=newPath(filedisplay);FileSystemfs=path.getFileSystem(conf);longlength=file.getLen();BlockLocation[]blkLocations=fs.getFileBlockLocations(file,0,length);privateString[]hosts;//hostnamesofdataprivateString[]names;//hostname:portNumberofdatanodesprivateString[]topologyPaths;//fullpathnameinnetworktopologyprivatelongoffset;//offsetoftheoftheblockinthefileprivatelonglength;2結(jié)構(gòu)流程瀏覽器瀏覽器6重定向1請(qǐng)求下載7請(qǐng)求 DownLoadAction2請(qǐng)求訪問DFSServerApacheDFSClientServletApacheServerDFSClient流8請(qǐng)求訪問DFSDataNodeDataNodeServletNameNode6重定向1請(qǐng)求下載7請(qǐng)求 DownLoadAction2請(qǐng)求訪問DFSServerApacheDFSClientServletApacheServerDFSClient流8請(qǐng)求訪問DFSDataNodeDataNodeServletNameNode12返回文件13返回?cái)?shù)據(jù)流HDFS在Web開發(fā)中的應(yīng)用《Hadoop開發(fā)者》Stringfiledisplay=(String)request.Pathpath=newPath(filedisplay);FileSystemfs=path.getFileSystem(conf);InputStreamins=fs.open(path);}outp.flush();}finally{}outp.close();}}Mapreduce中value集合的二次排序作者:皮冰鋒email:pi.bingfeng@str22,10str39privateStringtext;privateintvalue;publicTextInt(){}publicTextInt(Stringtext,intvalue){Mapreduce中value集合的二次排序《Hadoop開發(fā)者》}publicStringgetFirst(){}publicintgetSecond(){}publicvoidreadFields(DataInputin)throwsIOException{}publicvoidwrite(DataOutputout)throwsIOException{out.writeUTF(text);out.writeInt(value);}publicintcompareTo(Tex}}<key,value>對(duì),key,value都是Text類型。所publicvoidmap(Textkey,TextvaintintValue=Integer.TextIntti=newTextInt(key.toString(),intValue);output.collect(ti,}publicvoidreduce(TextIntkey,Iteratowhile(values.hasNext()){intvalue=values.ne}}publicTextIntComparator(){super(TextInt.class,true);//注冊(cè)comparator}TextInto1=(TextInt)a;TextInto2=(TextInt)b;if(!o1.getFirst().equals(o2.getFirst()}}}Mapreduce中value集合的二次排序《Hadoop開發(fā)者》}publicTextComparator(){}TextInto1=(TextInt)a;TextInto2=(TextInt)b;}}publicstaticclassPartitionByTextimplementsPartitioner<TextpublicintgetPartition(TextIntkey,IntWritablevalue,intnumPartitions){}publicvoidconfigure(JobConfjob){}}//……defineinput&output//定義Jobconf.setJobName("sortbyval//addinputpath:FileInputFormat.addInputPath(conf,newPathconf.setInputFormat(KeyValueTextIn//outputFileOutputFormat.setOutputPath(conf,newPath(output));JobClient.runJob(conf);通過上面的job執(zhí)行,在output的文件中,就能看到類似的輸出結(jié)果了:把相同string的int數(shù)據(jù)分發(fā)到同一個(gè)reducer,這就是PartitionByText的作用;其次,用publicstaticclassCombinedObjectimplementsWritablprivateClass<?extendMapreduce中value集合的二次排序《Hadoop開發(fā)者》privateWritableComparablefirst;publicCombinedObject(){}thrownewIllegalArgumentExcep}first=ReflectionUtils.newInstance(firstClass,conf);}publicCombinedObject(WritsetFirst(f);}publicvoidsetFirst(WritableComparablekey){this.first=key;}publicvoidsetSecond(WritableComparablevalue){}}publicvoidreadFields(DataInputin)throwsIOStringfirstClassName=in.readUTF(conf);first=ReflectionUtils.newInstance(firstClass,conf);second=ReflectionUtils.newfirst.readFields(in);}publicvoidwrite(DataOutputout)throwsIOException{first.write(out);}publicbooleanequals(Objecto){if(oinstanceofCombinedOb}returnfalse;}publicinthashCode(){returnfirst.hashCode();}publicintcompareTo(OMapreduce中value集合的二次排序《Hadoop開發(fā)者》}}在Writable接口的write(DataOutputout)及readFields(DataInputin)函數(shù)中,需要考慮publicKeyComparator(){}}}publicKeyValueComparator(){}if(!o1.first.equals(o2.first)){}}}}publicstaticclassKeyPartitionerimplementsPartitpublicintgetPartition(CombinedObjectkey,Writablevalue,intn}publicvoidconfigure(JobConfjob){}}具體的調(diào)用方式:job.setMapperClass(ContentMapper.class);job.setMapOutputKeyClass(CombinedObject.class);//sortvaluelistjob.setOutputKeyComparatorClass(KeyValjob.setOutputValueGroupingCompjob.setPartitionerClass(KeyPartitioner.class);job.setReducerClass(SameInfoReducer.class);HiveSQL手冊(cè)翻譯《Hadoop開發(fā)者》HiveSQL手冊(cè)翻譯作者:一見余姝丹(蘋果小巫女)1創(chuàng)建表和刪除表請(qǐng)使用“STOREDASSEQUENCEFILE”。如果打算在Hive表中存儲(chǔ)壓縮的數(shù)據(jù),請(qǐng)參考CompressedStorage?!癐NPHiveSQL手冊(cè)翻譯《Hadoop開發(fā)者》中生成架構(gòu)和用其它表的屬性來創(chuàng)建目標(biāo)表,例如SeCREATETABLEpage_view(vieCREATETABLEpage_view(viewTiCREATETABLEpage_view(viewTi好的了解數(shù)據(jù)結(jié)構(gòu),同時(shí)提高了效率。如果列是列表或地圖可以使用“MAPKEYS”和存儲(chǔ)格式來創(chuàng)建一個(gè)新的目標(biāo)表HiveSQL手冊(cè)翻譯《Hadoop開發(fā)者》2數(shù)據(jù)插入到追加表數(shù)據(jù)如何讀取。這意味著用戶必須注意正確插入數(shù)據(jù),即減少的數(shù)量等于增加的數(shù)量,并

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論