Граф коммитов

76 Коммитов

Автор SHA1 Сообщение Дата
Colin Marc f4280a2b2c Tweak put tests
Add a very basic test, and put everything in the same directory so it
gets cleaned up properly.
2018-03-16 12:59:08 -07:00
Shastick 5434f3676c Add the ability for 'put -' to read from stdin
Fixes #44, closes #98
2018-03-16 12:59:08 -07:00
Junjie Qian d961456920 Add StatFs and the df [-h] command 2017-03-14 00:47:54 +01:00
Shane Kumpf a732047294 Allow the CLI to load the NameNodes from the Hadoop configuration 2017-02-13 11:34:53 -07:00
Colin Marc 5ca9568680 Add a -v / --version flag 2017-01-23 13:08:15 +01:00
Colin Marc cefa4bc7e7 Make mv behavior match the posix spec a little better
- Moving a non-directory on top of a directory should never work
 - Replacing an existing file should be the default
2016-10-26 21:05:48 +02:00
Junjie Qian 8774aa7d4c Force overwrite in rename and provide option support in mv 2016-10-26 10:15:58 -07:00
Dave Beckett b629910101 Format ls -l year correctly
Without this fix, ls -l generated Unicode character 2015 for the year
2015 rather than the string "2015"
2016-04-03 16:49:58 -07:00
Ben Kochie c43cceb489 Fix ls -l format
`ls -l` prints Month Day incorrectly for 2-digit dates.  Use the _ empty
padding method to format the Month and Day.
2016-02-13 12:30:09 +01:00
Colin Marc 2028fbc05e Add hdfs put 2016-01-05 00:02:27 +01:00
Erik Bartels 0e0b705362 Add Username function and also add to paths which only had old logic 2015-12-21 16:33:30 +01:00
Ashish Gandhi a08db18c38 all: run goimports -w -l . 2015-11-23 16:25:37 -08:00
Ashish Gandhi 7df08bbd5e cmd/tail: do not try to read more than file size 2015-11-23 12:22:47 -08:00
Ashish Gandhi 885c569282 file: implement io.ReaderAt correctly
io.ReaderAt says ReadAt should fill up the passed in slice as
much as there is data from the passed in offset.
2015-11-22 17:18:34 -08:00
Jihyun Yu d1dc635a3f fetch getopt from github instead of googlecode
`getopt` package is moved to github, so there's no reason to use old
code.google.com link. It also removes mercurial dependency on installing
`hdfs` command.
2015-06-26 14:39:30 +09:00
Colin Marc 9519821475 remove completion testing code that snuck in 2015-02-26 16:47:44 +01:00
Colin Marc 5ced0621b7 Add GetContentSummary, and rewrite `hdfs du` to use it
The current process, of recursively stat'ing files, is way too slow for big
directory trees. GetContentSummary returns the total size for a whole tree, so
lets use that.
2015-02-26 16:39:24 +01:00
Colin Marc 1cc0e2711a divert minicluster output to a file 2015-02-25 12:23:52 +01:00
Colin Marc 7306883008 When creating directories for 'get', create them as 0755.
Fixes #9.
2015-02-25 03:13:06 +01:00
Colin Marc 93e320c0d9 tail should print to stdout, not to stderr 2015-01-19 23:12:10 +01:00
Colin Marc 0b6bc39d66 add du -sh 2015-01-06 12:45:13 +01:00
Colin Marc 738b7cc9c9 in ls, don't flush the tabwriter until the very end
(also make some formatting tweaks)
2015-01-06 12:40:26 +01:00
Colin Marc 979dfc4c44 gofmt 2015-01-06 12:36:14 +01:00
Colin Marc c8bc953e4d make exit status global 2015-01-06 12:05:17 +01:00
Colin Marc efbd8f615e add ls -h 2014-12-19 22:54:20 +01:00
Colin Marc 3caac15a68 add FileReader.Checksum and 'hdfs checksum'
The FileReader.Checksum method provides access to HDFS's built in checksum
ability, which works by checksumming concatenated checksums which are already
stored alongside the data.

This also adds a datanodeFailover type, to abstract over handling datanode
failure in multiple contexts (reading the checksum is the second such context;
reading blocks was the original one, and writing blocks will eventually be
similar).
2014-12-19 02:54:26 +01:00
Colin Marc f2f22c4631 gofmt 2014-11-19 02:50:31 +01:00
Colin Marc e1dcc570c1 vendor mobydick.txt
It changed on gutenberg (????), which broke the tests.
2014-11-19 02:46:49 +01:00
Colin Marc 7c2faa189c make sure we're not clobbering the canonical mobydick.txt 2014-11-19 02:34:20 +01:00
Colin Marc b975c54800 more linting 2014-11-07 20:13:50 +01:00
Colin Marc 5c5077f5b6 Match unix ls by printing full paths (only when passed them directly) 2014-11-04 20:58:32 +01:00
Colin Marc f9ffd5ccd4 make sure we never expand nonexistent paths from globs 2014-11-04 20:16:22 +01:00
Colin Marc 7590866a06 update one test message 2014-11-04 00:40:34 +01:00
Colin Marc 1406bb3801 update usage for rm -f 2014-11-04 00:40:15 +01:00
Colin Marc 5d6bea147b Merge pull request #2 from snoble/snoble-rm-f
Add -f to rm to suppress errors on non-existence.
2014-11-04 00:39:25 +01:00
Steven H. Noble dce42f8c73 Add -f to rm to suppress errors on non-existence. 2014-11-03 15:20:59 -05:00
Colin Marc 124daea3f1 gomft 2014-11-03 20:20:11 +01:00
Colin Marc 5288ee46f3 remove unused import 2014-11-01 19:40:55 +01:00
Colin Marc 6c23e98338 add tests for head and tail 2014-11-01 18:58:53 +01:00
Colin Marc f9b2974614 Instead of using a Scanner to read lines in head, look for the offset and copy
This fixes two bugs:
 - trailing CRs were being stripped from the output, because the ScanLines
   implementation does that
 - long files without newlines weren't being printed at all
2014-11-01 18:56:56 +01:00
Colin Marc cc34a26dc3 another test fix 2014-11-01 18:36:15 +01:00
Colin Marc 5c76a7becb fix touch test 2014-11-01 18:34:20 +01:00
Colin Marc 7916986dd4 fix rm tests 2014-10-31 21:39:07 +01:00
Colin Marc 3b3141ba95 add tests for cat 2014-10-31 21:38:12 +01:00
Colin Marc 5baa02d9fe add tests for mkdir and touch 2014-10-31 21:19:37 +01:00
Colin Marc de48a95262 add tests for mv 2014-10-31 21:09:20 +01:00
Colin Marc a0befc4db3 when rming, change the Op for the error to 'rm' 2014-10-31 21:04:46 +01:00
Colin Marc e48cf99b93 add some rm tests 2014-10-31 21:00:04 +01:00
Colin Marc 56af180726 refactor out caching in cmd/hdfs
It's definitely a premature optimization, and also blows up with huge
directories.
2014-10-31 20:46:22 +01:00
Colin Marc 5cd50d3b56 attempt to fix travis 2014-10-31 20:15:04 +01:00