Hi Gene,I tried both of version : Alluxio-1.1.0 and Alluxio-1.2.0-RC1Both of versions can do these :userceph@hadoop:~/alluxio-1.2.0-RC1$ ./bin/alluxio fs ls / 24.00B 07-12-2016 23:44:06:961 Directory /default_tests_files2.00B 07-13-2016 00:55:24:781 Directory /wordcount1.00B 07-13-2016 01:51:17:432 Directory /s3userceph@hadoop:~/alluxio-1.2.0-RC1$userceph@hadoop:~/alluxio-1.2.0-RC1$ ./bin/alluxio fs copyFromLocal LICENSE /LICENSECopied LICENSE to /LICENSEuserceph@hadoop:~/alluxio-1.2.0-RC1$I tried two ways to mounted s3./bin/alluxio fs mkdir /s3/data./bin/alluxio fs chown -R userceph /s3/dataFirst way mounted:./bin/alluxio fs mount "alluxio://192.168.244.146:19998/s3/data/" "s3n://192.168.244.141:7480/my-new-bucket/"the output : Mount point alluxio://192.168.244.146:19998/s3/data already exists (What does this mean? it's already exists, this is first time execution)Execute:hadoop jar hadoop/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.0.jar wordcount -libjars alluxio-1.2.0-RC1/core/client/target/alluxio-core-client-1.2.0-RC1-jar-with-dependencies.jar alluxio://192.168.244.146:19998/wordcount/myfile alluxio://192.168.244.146:19998/s3/data/resultOutput: The output can be printed on alluxio, but I print out in my bucket there is empty.and I tried to unmouted:./bin/alluxio fs unmount "alluxio://192.168.244.146:19998/s3/data/"and then do the second waySecond way mounted:./bin/alluxio fs mount "alluxio://192.168.244.146:19998/s3/data/" "s3n://my-new-bucket/"it the same way with first one step anymorethe result was the same, in my bucket is emptyany help...
Gene Pang於 2016年7月13日星期三 UTC+8上午12時30分38秒寫道:
Hello Gene,I tried to use alluxio IP be:alluxio://192.168.244.146:19998/wordcount/myfilealluxio://192.168.244.146:19998/my-new-bucket/testThere was no error, myfile was proceed by hadoop environment and the result it put out in the alluxio environment
my-new-bucket NOT_PERSISTED NO 07-14-2016 13:15:04:217 07-14-2016 13:15:04:217
test NOT_PERSISTED NO 07-14-2016 13:15:04:217 07-14-2016 13:15:19:560
_SUCCESS 0.00B 512.00MB 100% NOT_PERSISTED NO 07-14-2016 13:15:19:560 07-14-2016 13:15:19:588 part-r-00000 3408.00B 512.00MB 100% NOT_PERSISTED NO 07-14-2016 13:15:18:718 07-14-2016 13:15:18:887
But, in my Ceph Bucket, I didn't see any file. The bucket is empty. It was stored in Alluxio environment only.For alluxio-env.sh configuration :ALLUXIO_MASTER_HOSTNAME=${ALLUXIO_MASTER_HOSTNAME:-"localhost"}ALLUXIO_WORKER_MEMORY_SIZE=${ALLUXIO_WORKER_MEMORY_SIZE:-"1322MB"}ALLUXIO_RAM_FOLDER=${ALLUXIO_RAM_FOLDER:-"/mnt/ramdisk"}ALLUXIO_UNDERFS_ADDRESS=s3n://my-new-bucket/test/#ALLUXIO_UNDERFS_ADDRESS=${ALLUXIO_UNDERFS_ADDRESS:-"${ALLUXIO_HOME}/underFSStorage/"}export ALLUXIO_WORKER_MEMORY_SIZE=${ALLUXIO_WORKER_MEMORY_SIZE:-1GB}export ALLUXIO_JAVA_OPTS+="-Dlog4j.configuration=file:${CONF_DIR}/log4j.properties-Dalluxio.worker.tieredstore.levels=1-Dalluxio.worker.tieredstore.level0.alias=MEM-Dalluxio.worker.tieredstore.level0.dirs.path=${ALLUXIO_RAM_FOLDER}-Dalluxio.worker.tieredstore.level0.dirs.quota=${ALLUXIO_WORKER_MEMORY_SIZE}-Dalluxio.underfs.address=${ALLUXIO_UNDERFS_ADDRESS}-Dalluxio.worker.memory.size=${ALLUXIO_WORKER_MEMORY_SIZE}-Dalluxio.master.hostname=${ALLUXIO_MASTER_ADDRESS}-Dorg.apache.jasper.compiler.disablejsr199=true-Djava.net.preferIPv4Stack=true-Dfs.s3n.awsAccessKeyId=QINHSA7JD2MBEKN97F4A-Dfs.s3n.awsSecretAccessKey=mbjd9H80AokLYFP2Yx44K64Jgy5JdXZIlrWRrcPn-Dalluxio.underfs.s3.disable.dns.buckets=true-Dalluxio.underfs.s3.endpoint=mon1-Dalluxio.underfs.s3.proxy.https.only=false-Dalluxio.underfs.s3.endpoint.http.port=7480"export ALLUXIO_MASTER_JAVA_OPTS="${ALLUXIO_JAVA_OPTS}"export ALLUXIO_WORKER_JAVA_OPTS="${ALLUXIO_JAVA_OPTS}"Why Alluxio couldn't automatic interactive with Ceph S3 API? The bucket is empty.But I have try to run alluxio runTests the default_test_files could transfer to Ceph S3 API, this one only for testing..
Gene Pang於 2016年7月14日星期四 UTC+8上午3時40分37秒寫道:
# Hostname of the master.
export ALLUXIO_MASTER_HOSTNAME=test01
# Address of the under filesystem address. (Default: ${ALLUXIO_HOME}/underFSStorage)
export ALLUXIO_UNDERFS_ADDRESS=s3n://testBucket/testDirectory/
# How much memory to use per worker. (Default: 1GB)
export ALLUXIO_WORKER_MEMORY_SIZE=22GB
export ALLUXIO_JAVA_OPTS="$ALLUXIO_JAVA_OPTS -Dalluxio.user.file.readtype.default=CACHE_PROMOTE -Dalluxio.user.file.writetype.default=CACHE_THROUGH -Dalluxio.user.file.write.location.policy.class=alluxio.client.file.policy.RoundRobinPolicy -Dalluxio.user.file.cache.partially.read.block=true -Dalluxio.user.block.size.bytes.default=32MB -Dalluxio.underfs.address=${ALLUXIO_UNDERFS_ADDRESS} -Dfs.s3n.awsAccessKeyId=Q0LOTBB9XV1TAJHUD85Z -Dfs.s3n.awsSecretAccessKey=OI7G1BO7kOAejGhTa9KEC1HuuIUc4xxg0PXQf9RR -Dalluxio.underfs.s3.disable.dns.buckets=true -Dalluxio.underfs.s3.endpoint=http://174.125.203.103 -Dalluxio.underfs.s3.proxy.https.only=false -Dalluxio.underfs.s3.endpoint.http.port=9000"
export ALLUXIO_MASTER_JAVA_OPTS="${ALLUXIO_JAVA_OPTS}"
export ALLUXIO_WORKER_JAVA_OPTS="${ALLUXIO_JAVA_OPTS}"
export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_71
runTest Basic CACHE_PROMOTE CACHE_THROUGH
2016-09-23 18:06:14,997 ERROR type (S3UnderFileSystem.java:mkdirsInternal) - Failed to create directory: s3n://testBucket/testDirectory
alluxio.org.jets3t.service.S3ServiceException: Request Error: java.net.UnknownHostException: http PUT '//74.125.203.103:9000/testBucket/testDirectory_%24folder%24'
at alluxio.org.jets3t.service.S3Service.putObject(S3Service.java:2123)
at alluxio.underfs.s3.S3UnderFileSystem.mkdirsInternal(S3UnderFileSystem.java:651)
at alluxio.underfs.s3.S3UnderFileSystem.mkdirs(S3UnderFileSystem.java:309)
at alluxio.underfs.s3.S3UnderFileSystem.mkdirs(S3UnderFileSystem.java:282)
at alluxio.underfs.s3.S3UnderFileSystem.mkdirs(S3UnderFileSystem.java:313)
at alluxio.underfs.s3.S3UnderFileSystem.mkdirs(S3UnderFileSystem.java:282)
at alluxio.underfs.s3.S3UnderFileSystem.create(S3UnderFileSystem.java:169)
at alluxio.client.file.FileOutStream.<init>(FileOutStream.java:124)
at alluxio.client.file.BaseFileSystem.createFile(BaseFileSystem.java:102)
at alluxio.examples.BasicOperations.writeFile(BasicOperations.java:85)
at alluxio.examples.BasicOperations.call(BasicOperations.java:72)
at alluxio.examples.BasicOperations.call(BasicOperations.java:42)
at alluxio.cli.CliUtils.runExample(CliUtils.java:51)
at alluxio.cli.TestRunner.runTest(TestRunner.java:148)
at alluxio.cli.TestRunner.runTests(TestRunner.java:121)
at alluxio.cli.TestRunner.main(TestRunner.java:98)
Caused by: java.net.UnknownHostException: http
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:286)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
at org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory$1.doit(ControllerThreadSocketFactory.java:91)
at org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory$SocketTask.run(ControllerThreadSocketFactory.java:158)
at java.lang.Thread.run(Thread.java:745)
2016-09-23 18:06:15,002 ERROR type (CliUtils.java:runExample) - Exception running test: alluxio.examples.BasicOperations@130d63be
java.lang.NullPointerException
at alluxio.client.file.FileOutStream.write(FileOutStream.java:303)
at alluxio.client.file.FileOutStream.write(FileOutStream.java:270)
at alluxio.examples.BasicOperations.writeFile(BasicOperations.java:86)
at alluxio.examples.BasicOperations.call(BasicOperations.java:72)
at alluxio.examples.BasicOperations.call(BasicOperations.java:42)
at alluxio.cli.CliUtils.runExample(CliUtils.java:51)
at alluxio.cli.TestRunner.runTest(TestRunner.java:148)
at alluxio.cli.TestRunner.runTests(TestRunner.java:121)
at alluxio.cli.TestRunner.main(TestRunner.java:98)
Failed the test!
2016-09-23 17:39:54,567 INFO logger.type (AbstractMaster.java:start) - BlockMaster: Starting leader master.
2016-09-23 17:39:54,568 INFO logger.type (JournalWriter.java:completeAllLogs) - Marking all logs as complete.
2016-09-23 17:39:54,570 INFO logger.type (AbstractMaster.java:start) - BlockMaster: journal checkpoint does not exist, nothing to process.
2016-09-23 17:39:54,570 INFO logger.type (JournalWriter.java:getCheckpointOutputStream) - Creating tmp checkpoint file: /userap/alluxio-1.2.0/journal/BlockMaster/checkpoint.data.tmp
2016-09-23 17:39:54,570 INFO logger.type (JournalWriter.java:getCheckpointOutputStream) - Latest journal sequence number: 0 Next journal sequence number: 1
2016-09-23 17:39:54,610 INFO logger.type (JournalWriter.java:close) - Successfully created tmp checkpoint file: /userap/alluxio-1.2.0/journal/BlockMaster/checkpoint.data.tmp
2016-09-23 17:39:54,610 INFO logger.type (JournalWriter.java:close) - Renamed checkpoint file /userap/alluxio-1.2.0/journal/BlockMaster/checkpoint.data.tmp to /userap/alluxio-1.2.0/journal/BlockMaster/checkpoint.data
2016-09-23 17:39:54,610 INFO logger.type (JournalWriter.java:deleteCompletedLogs) - Deleting all completed log files...
2016-09-23 17:39:54,610 INFO logger.type (JournalWriter.java:deleteCompletedLogs) - Finished deleting all completed log files.
2016-09-23 17:39:54,616 INFO logger.type (JournalWriter.java:openCurrentLog) - Opened current log file: /userap/alluxio-1.2.0/journal/BlockMaster/log.out
2016-09-23 17:39:54,619 INFO logger.type (MountTable.java:add) - Mounting s3n://testBucket/testDirectory at /
2016-09-23 17:39:54,619 INFO logger.type (AbstractMaster.java:start) - FileSystemMaster: Starting leader master.
2016-09-23 17:39:54,620 INFO logger.type (JournalWriter.java:completeAllLogs) - Marking all logs as complete.
2016-09-23 17:39:54,620 INFO logger.type (AbstractMaster.java:start) - FileSystemMaster: journal checkpoint does not exist, nothing to process.
2016-09-23 17:39:54,620 INFO logger.type (JournalWriter.java:getCheckpointOutputStream) - Creating tmp checkpoint file: /userap/alluxio-1.2.0/journal/FileSystemMaster/checkpoint.data.tmp
2016-09-23 17:39:54,621 INFO logger.type (JournalWriter.java:getCheckpointOutputStream) - Latest journal sequence number: 0 Next journal sequence number: 1
2016-09-23 17:39:54,627 INFO logger.type (JournalWriter.java:close) - Successfully created tmp checkpoint file: /userap/alluxio-1.2.0/journal/FileSystemMaster/checkpoint.data.tmp
2016-09-23 17:39:54,627 INFO logger.type (JournalWriter.java:close) - Renamed checkpoint file /userap/alluxio-1.2.0/journal/FileSystemMaster/checkpoint.data.tmp to /userap/alluxio-1.2.0/journal/FileSystemMaster/checkpoint.data
2016-09-23 17:39:54,627 INFO logger.type (JournalWriter.java:deleteCompletedLogs) - Deleting all completed log files...
2016-09-23 17:39:54,627 INFO logger.type (JournalWriter.java:deleteCompletedLogs) - Finished deleting all completed log files.
2016-09-23 17:39:54,783 INFO server.Server (Server.java:doStart) - jetty-7.x.y-SNAPSHOT
2016-09-23 17:39:54,798 INFO handler.ContextHandler (ContextHandler.java:startContext) - started o.e.j.s.ServletContextHandler{/metrics/json,null}
2016-09-23 17:39:54,866 INFO handler.ContextHandler (ContextHandler.java:startContext) - started o.e.j.w.WebAppContext{/,file:/userap/alluxio-1.2.0/core/server/src/main/webapp/},/userap/alluxio-1.2.0/core/server/src/main/webapp
2016-09-23 17:40:03,003 INFO server.AbstractConnector (AbstractConnector.java:doStart) - Started SelectChannelConnector@0.0.0.0:19999
2016-09-23 17:40:03,003 INFO logger.type (UIWebServer.java:startWebServer) - Alluxio Master Web service started @ 0.0.0.0/0.0.0.0:19999
2016-09-23 17:40:03,004 INFO logger.type (AlluxioMaster.java:startServing) - Alluxio master version 1.2.0 started @ test01/127.0.0.1:19998
2016-09-23 17:40:03,048 INFO logger.type (BlockMaster.java:getWorkerId) - getWorkerId(): WorkerNetAddress: WorkerNetAddress{host=test01, rpcPort=29998, dataPort=29999, webPort=30000} id: 1
2016-09-23 17:40:03,058 INFO logger.type (BlockMaster.java:workerRegister) - registerWorker(): MasterWorkerInfo{id=1, workerAddress=WorkerNetAddress{host=test01, rpcPort=29998, dataPort=29999, webPort=30000}, capacityBytes=23622320128, usedBytes=0, lastUpdatedTimeMs=1474623603058, blocks=[]}
alluxio.underfs.address=s3n://myBucket/
fs.s3n.awsAccessKeyId=xxxxxxxxxxxx
fs.s3n.awsSecretAccessKey=xxxxxxxxxxxxxx
alluxio-1.2.0 cch$ vim conf/alluxio-env.sh
#!/usr/bin/env bash
#
# The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
# (the "License"). You may not use this work except in compliance with the License, which is
# available at www.apache.org/licenses/LICENSE-2.0
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied, as more fully set forth in the License.
#
# See the NOTICE file distributed with this work for information regarding copyright ownership.
#
# This file is sourced to launch Alluxio servers or use Alluxio shell commands
# This file was generated by command "bin/alluxio bootstrapConf localhost local"
# For a list of supported environment variables, see "conf/alluxio-env.sh.template"
ALLUXIO_MASTER_HOSTNAME=${ALLUXIO_MASTER_HOSTNAME:-"localhost"}
ALLUXIO_WORKER_MEMORY_SIZE=${ALLUXIO_WORKER_MEMORY_SIZE:-"10922MB"}
ALLUXIO_RAM_FOLDER=${ALLUXIO_RAM_FOLDER:-"/Volumes/ramdisk"}
#ALLUXIO_UNDERFS_ADDRESS=${ALLUXIO_UNDERFS_ADDRESS:-"${ALLUXIO_HOME}/underFSStorage/"}
#export ALLUXIO_UNDERFS_ADDRESS=/tmp
alluxio-1.2.0 cch$ ./bin/alluxio runTests
runTest BasicNonByteBuffer CACHE_PROMOTE MUST_CACHE
2016-09-27 14:37:34,110 ERROR type (CliUtils.java:runExample) - Exception running test: alluxio.examples.BasicNonByteBufferOperations@215be6bb
java.io.IOException: Failed to cache: alluxio.exception.BlockAlreadyExistsException: Temp blockId 33,554,432 is not available, because it is already committed
at alluxio.client.file.FileOutStream.handleCacheWriteException(FileOutStream.java:342)
at alluxio.client.file.FileOutStream.write(FileOutStream.java:256)
at java.io.DataOutputStream.writeInt(DataOutputStream.java:197)
at alluxio.examples.BasicNonByteBufferOperations.write(BasicNonByteBufferOperations.java:85)
at alluxio.examples.BasicNonByteBufferOperations.call(BasicNonByteBufferOperations.java:78)
at alluxio.examples.BasicNonByteBufferOperations.call(BasicNonByteBufferOperations.java:46)
at alluxio.cli.CliUtils.runExample(CliUtils.java:51)
at alluxio.cli.TestRunner.runTest(TestRunner.java:152)
at alluxio.cli.TestRunner.runTests(TestRunner.java:121)
at alluxio.cli.TestRunner.main(TestRunner.java:98)
Suppressed: java.io.IOException: alluxio.exception.BlockInfoException: Cannot complete a file without all the blocks committed
at alluxio.client.file.FileOutStream.close(FileOutStream.java:227)
at java.io.FilterOutputStream.close(FilterOutputStream.java:159)
at alluxio.examples.BasicNonByteBufferOperations.write(BasicNonByteBufferOperations.java:89)
... 6 more
Caused by: alluxio.exception.BlockInfoException: Cannot complete a file without all the blocks committed
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at alluxio.exception.AlluxioException.fromThrift(AlluxioException.java:99)
at alluxio.AbstractClient.retryRPC(AbstractClient.java:326)
at alluxio.client.file.FileSystemMasterClient.completeFile(FileSystemMasterClient.java:128)
at alluxio.client.file.FileOutStream.close(FileOutStream.java:225)
... 8 more
Caused by: java.io.IOException: alluxio.exception.BlockAlreadyExistsException: Temp blockId 33,554,432 is not available, because it is already committed
at alluxio.client.block.BlockWorkerClient.requestBlockLocation(BlockWorkerClient.java:358)
at alluxio.client.block.LocalBlockOutStream.<init>(LocalBlockOutStream.java:64)
at alluxio.client.block.AlluxioBlockStore.getOutStream(AlluxioBlockStore.java:170)
at alluxio.client.file.FileOutStream.getNextBlock(FileOutStream.java:320)
at alluxio.client.file.FileOutStream.write(FileOutStream.java:252)
... 8 more
Caused by: alluxio.exception.BlockAlreadyExistsException: Temp blockId 33,554,432 is not available, because it is already committed
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at alluxio.exception.AlluxioException.fromThrift(AlluxioException.java:99)
at alluxio.AbstractClient.retryRPC(AbstractClient.java:326)
at alluxio.client.block.BlockWorkerClient.requestBlockLocation(BlockWorkerClient.java:348)
... 12 more
Failed the test!