Hadoop FS: Use the widest range of surfaces to manipulate any file system.Hadoop DFS and HDFs DFS: can only operate on HDFs file system-related (including operations with local FS), which is already deprecated, typically using the latter.The following reference is from StackOverflowFollowing is the three commands which
Sudo addgroup hadoop # Add a hadoop GroupSudo usermod-a-g hadoop Larry # Add the current user to the hadoop GroupSudo gedit ETC/sudoers # Add the hadoop group to sudoerHadoop all = (all) All after root all = (all) All
Modify hadoop
Add a Hadoop group
sudo addgroup Hadoop
Add the current user Larry to the Hadoop groupsudo usermod-a-G Hadoop Larry
Add Hadoop Group to Sudoersudo gedit etc/sudoersHadoop all= (All) after Root all= (all)
Modify the permissions for the H
Hadoop FS: Use the widest range of surfaces to manipulate any file system.Hadoop DFS and HDFs DFS: can only operate on HDFs file system-related (including operations with local FS), which is already deprecated, typically using the latter.The following reference is from StackOverflowFollowing is the three commands which
From:http://www.2cto.com/database/201303/198460.htmlHadoop HDFs Common CommandsHadoop common commands:Hadoop FSView all commands supported by Hadoop HDFsHadoop fs–lslisting directory and file informationHadoop FS–LSRLoop lists directories, subdirectories, and file informationHadoop fs–put Test.txt/user/sunlightcsCopy the test.txt of the local file system to the/u
, soHDFs has a high degree of fault tolerance.3. High data throughput HDFs uses a "one-time write, multiple read" This simple data consistency model, in HDFS , once a file has been created, written, closed, generally do not need to modify, such a simple consistency model, to improve throughput.4. Streaming data access HDFS has a large scale of data processing,
Hadoop fs-mkdir/tmp/input new folder on HDFs
Hadoop fs-put input1.txt/tmp/input The local file input1.txt to the/tmp/input directory in HDFs
Hadoop fs-get input1.txt/tmp/input/input1.txt to pull HDFs files to localHadoop fs-ls/
Install times wrong: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (site) on project Hadoop-hdfs:an Ant B Uildexception has occured:input file/usr/local/hadoop-2.6.0-stable/hadoop-2.6.0-src/hadoop-hdfs-project/
"), also add our standard Spark classpath, built using compute-classpath.sh.
Classpath= ' $FWDIR/bin/compute-classpath.sh '
Classdata-path= "$SPARK _qiutest_jar: $CLASSPATH"
# find Java Binary
If [-N "${java_home}"]; Then
Runner= "${java_home}/bin/java"
Else
If [' command-v Java ']; Then
Runner= "Java"
Else
echo "Java_home is not set" >2
Exit 1
Fi
Fi
If ["$SPARK _print_launch_command" = = "1"]; Then
Echo-n "Spark Command:"
echo "$RUNNER"-CP "$CLASSPATH" "$@"
echo "=============================
, writing files, creating directories, deleting files, and listing all files in directories. The general syntax is: % hadoop FS-ls/, all of which start with hadoop FS and use-to introduce the operation to be performed, followed by specific parameters. For example, here-ls is equivalent to the LS-l command in Linux, followed by/is the root directory, which is to list all the files under the root directory. Y
now let's take a closer look at the FileSystem class for Hadoop. This class is used to interact with Hadoop's file system. While we are mainly targeting HDFS here, we should let our code use only abstract class filesystem so that our code can interact with any Hadoop file system. When we write the test code, we can test it with the local file system, use
Under the Cd/home/hadoop/hadoop-2.5.2/binPerformed by the./hdfs Namenode-formatError[Email protected] bin]$/hdfs Namenode–format16/07/11 09:21:21 INFO Namenode. Namenode:startup_msg:/************************************************************Startup_msg:starting NameNodeStartup_msg:host = node1/192.168.8.11Startup_msg
store, and does not have to worry about the storage of file metadata, because the block only stores data, the object metadata (such as permissions) is stored on an independent computer and operated independently. In addition, Block Storage facilitates fault tolerance. To ensure that data will not be lost when any storage node fails, data is generally backed up by block. Generally, blocks on one machine are backed up on the other two machines, that is, there are three copies in total. If the dat
Chapter 2 mapreduce IntroductionAn ideal part size is usually the size of an HDFS block. The execution node of the map task and the storage node of the input data are the same node, and the hadoop performance is optimal (Data Locality optimization, avoid data transmission over the network ).
Mapreduce Process summary: reads a row of data from a file, map function processing, Return key-value pairs; the sys
Overview
The filesystem (FS) Shell is invoked by bin/hadoop FS Scheme: // autority/path. For HDFS the scheme isHDFS, And for the local filesystem the scheme isFile. The scheme and authority are optional. If not specified, the default scheme specified in the configuration is used. an HDFS file or directory such/Parent/childCan be specifiedHDFS: // namenodehost/par
02_note_ Distributed File System HDFS principle and operation, HDFS API programming; 2.x under HDFS new features, high availability, federated, snapshotHDFS Basic Features/home/henry/app/hadoop-2.8.1/tmp/dfs/name/current-on namenodeCat./versionNamespaceid (spatial identification number, similar to cluster identificatio
Apache-->hadoop's official Website document Command learning:http://hadoop.apache.org/docs/r1.0.4/cn/hdfs_shell.html
FS Shell
The call file system (FS) shell command should use the bin/hadoop fs scheme://authority/path. For the HDFs file system, Scheme is HDFs, to the local file system, scheme is file. The scheme and authority parameters are optional,
to Use HDFS?
HDFS can be directly used after hadoop is installed. There are two methods:
One is imperative:
We know that there is a hadoop command in the bin directory of hadoop. This is actually a management command of hadoop. W
function is to periodically merge the namespace image file of the metadata node with the modified log to prevent the log file from being too large. This will be believed in the narrative below. The merged namespace image file is also saved from the metadata node, which can be recovered when the metadata node fails.
Basic file Commands
The HDFs File System command takes the form:
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.