Recently, I am looking for an overall storage and analysis solution. We need to consider massive storage, analysis, and scalability. When I got to hadoop, I just started to position it to HDFS for storage. The more I see it, the more I get excited.
First, perform the HDFS operation test.CodeThe complete eclipse + Tomcat project uses the Tomcat plug-in and hadoop 0.20.0 for massive
Lzo
Lzo
No
No
Lzop
. Lzo
5
LZ4
???
??
??
???
???
6
Snappy
???
??
??
???
???
7
ZLIB
???
??
??
???
???
8
Zip
DEFLATE
Is
Yes, within the scope of the file
Zip
. zip
textfile
text files, not compressed
1
2
3
4
5
6 7 8
--Create a table formatted as a text
In Linux, you can view the file encoding format and file encoding conversion. if you need to operate files in windows in Linux, you may frequently encounter file encoding conversion problems. In Windows, the default file format is GBK (gb2312), while Linux is generally a UTF-8. The following describes how to view the
1 make sure that eclipse has installed the hadoop-eclipse-plugin-1.0.2.jar plug-in
2. Select MAP/reduce in eclipse
Right-click map/reduce locations and choose new hadoop locations.
Note:
The MAP/reduce port is the mapred-site.xml in the hadoop configuration file
The port of the DFS master is in the core-site.xml in the hadoop configuration file
After submission: The following results are displayed on th
First, overview:In a real-world production environment, you will typically encounter the need to pour logs from web servers such as Tomcat, Apache, etc. into HDFs for analysis. The way to configure this is to achieve the above requirements.Second, the configuration file:#agent1 nameagent1.sources=source1agent1.sinks=Sink1agent1.channels=channel1#spooling directory#set Source1agent1.sources.source1.type=Spoo
Label:The first is to install the MySQL database. Installation is complete using the sudo apt-get install mysql-server command. The table is then created and the data is inserted:Then download the Sqoop and the jar package that connects to the MySQL database. The next step is to install Sqoop. The first is to configure the sqoop-env.sh file:Then comment out the Config-sqoop file that does not need to be checked:The next step is to copy the Sqoop-1.4.4
size of a data Block, it does not occupy the space of the entire data Block.
Write1), the Client initiates a file write request to the NameNode.2) according to the file size and file block configuration, NameNode returns the information of the DataNode managed by the Client.30. The Client divides the file into multipl
applicable"); A } at } - - /** - * Check If Native-hadoop code is loaded for this platform. - * - * @return in * Else - */ to Public Static Booleanisnativecodeloaded () { + returnnativecodeloaded; -}As you can see, the Isnativecodeloaded method is to return an attribute value, so where does the problem occur?After parsing the static constructor of the Nativecodeloaded class, there is a "system.loadlibrary (" Hadoop ") method. Is this the method that caused it? By debu
#!/bin/bash ################## # @author: chichuduxing # @date: 20161011 ################## # #加载Hadoop环境变量 # #略过 function s Howhelp () {echo "###################################!!! Must input at least two params!!! ################################### "echo" #Usage: [sh ' basename $ ' origin|-o Hdfspath] Show info with filename ' s ascend ing order, Eg:sh ' basename $ Origin/home ' echo ' #Usage: [sh ' basename $ ' asc|-a Hdfspath] Show info with size ' s ASCE Nding order,eg:sh ' basename $ Asc/
Formats of executable files on Unix/Linux platforms
Author: Shi Cong 17:24:31 from: ibm dw China
This article discusses three main executable file formats in Unix/Linux:. out (compiler and editor output editor and link editor output), coff (Common Object File Format), ELF (executable and ing format executable and link
First, crontab-e Add output log*/1 * * * */qiwen_list/upload_to_hdfs.sh >/qiwen_list/mapred.log 2>1Second, check log found that Hadoop is not foundIii. specify Hadoop full path in the script#!/bin/sh#upload List to HDFsyesterday= ' Date--date= ' 1 day ago ' +%y%m%d 'Echo $yesterday/home/hadoop/bin/hadoop fs-put/qiwen_list/qiwen_${yesterday}.csv/qiwen_listExecute again, problem solved.Crontab in the shell every minute the HDFs
)) ) order_created.registertemptable ("t_order_created") order_picked.registertemptable ("t_order_picked") #手工设置Spark SQL task Count hivecontext.setconf ("spark.sql.shuffle.partitions","Ten") Hivecontext.sql ("Select A.order_no, A.create_date, b.picked_date from t_order_created a joins t_order_picked b on a.order_no = B.order_ No"). Collect.foreach (println)The results of the implementation are as follows:[10101043505096, the- to- on -: -:12.342+ on, the- to- on ,: in:12.342+ on][1070300726748
This article discusses three main executable file formats in UNIX/LINUX:. out (compiler and link editor output editor and link editor output), COFF (Common Object File Format), ELF (Executable and Linking Format Executable and link Format ). The first is a summary of the executable file format, and describes the ELF
I. BACKGROUND
Because of the development of Hadoop, there are times when you need to view the HDFs file system through the Web. If the development machine is a Linux system, then just change the/etc/hosts file, but in Windows, through the Web page to view, usually the error, that is, can not find the domain name. Therefore it is very inconvenient to bring.
Seco
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.