Changeset 33498
- Timestamp:
- 2019-09-23T16:43:22+12:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/maori-lang-detection/bin/script/get_maori_WET_records_for_crawl.sh
r33495 r33498 74 74 75 75 # https://stackoverflow.com/questions/26513861/checking-if-directory-in-hdfs-already-exists-or-not 76 hdfs dfs -test -d $OUTPUT_PARENTDIR 77 if [ $? == 0 ]; then 76 #hdfs dfs -test -d $OUTPUT_PARENTDIR 77 #if [ $? == 0 ]; then 78 if $(hdfs dfs -test -d "$OUTPUT_PARENTDIR"); then 78 79 echo "Directory $OUTPUT_PARENTDIR already exists." 79 80 else … … 131 132 # The above generates ZIPPED part*.csv files in $OUTPUTDIR (folder cc-mri-csv). 132 133 # First create a folder and unzip into it: 133 hdfs dfs -test -d $OUTPUT_PARENTDIR/cc-mri-unzipped-csv 134 if [ $? == 0 ]; then 134 #hdfs dfs -test -d $OUTPUT_PARENTDIR/cc-mri-unzipped-csv 135 #if [ $? == 0 ]; then 136 if $(hdfs dfs -test -d "$OUTPUT_PARENTDIR/cc-mri-unzipped-csv"); then 135 137 echo "Directory cc-mri-unzipped-csv already exists for crawl ${CRAWL_ID}." 136 138 echo "Assuming cc-mri.csv also exists inside $OUTPUT_PARENTDIR" … … 172 174 # PHASE 3: convert warc files to wet files and copy the wet files into the mounted shared area 173 175 174 hdfs dfs -test -f $OUTPUTDIR/_SUCCESS 175 if [ $? == 0 ]; then 176 #hdfs dfs -test -f $OUTPUTDIR/_SUCCESS 177 #if [ $? == 0 ]; then 178 if $(hdfs dfs -test -f "$OUTPUTDIR/_SUCCESS"); then 176 179 # ia-hadoop-tools converts warc files into wet (and wat) files but expects a particular folder structure 177 180 # Create the expected folder structure: a "wet" and a "wat" folder should exist
Note:
See TracChangeset
for help on using the changeset viewer.