179179import org .apache .hadoop .hbase .wal .WALKeyImpl ;
180180import org .apache .hadoop .hbase .wal .WALSplitUtil ;
181181import org .apache .hadoop .hbase .wal .WALSplitUtil .MutationReplay ;
182- import org .apache .hadoop .io .MultipleIOException ;
183182import org .apache .hadoop .util .StringUtils ;
184183import org .apache .htrace .core .TraceScope ;
185184import org .apache .yetus .audience .InterfaceAudience ;
@@ -6315,8 +6314,8 @@ String prepareBulkLoad(byte[] family, String srcPath, boolean copyFile)
63156314 * @throws IOException if failed unrecoverably.
63166315 */
63176316 public Map <byte [], List <Path >> bulkLoadHFiles (Collection <Pair <byte [], String >> familyPaths ,
6318- boolean assignSeqId , BulkLoadListener bulkLoadListener ,
6319- boolean copyFile , List <String > clusterIds , boolean replicate ) throws IOException {
6317+ boolean assignSeqId , BulkLoadListener bulkLoadListener , boolean copyFile ,
6318+ List <String > clusterIds , boolean replicate ) throws IOException {
63206319 long seqId = -1 ;
63216320 Map <byte [], List <Path >> storeFiles = new TreeMap <>(Bytes .BYTES_COMPARATOR );
63226321 Map <String , Long > storeFilesSizes = new HashMap <>();
@@ -6328,19 +6327,18 @@ public Map<byte[], List<Path>> bulkLoadHFiles(Collection<Pair<byte[], String>> f
63286327 this .writeRequestsCount .increment ();
63296328
63306329 // There possibly was a split that happened between when the split keys
6331- // were gathered and before the HRegion's write lock was taken. We need
6330+ // were gathered and before the HRegion's write lock was taken. We need
63326331 // to validate the HFile region before attempting to bulk load all of them
6333- List < IOException > ioes = new ArrayList <>() ;
6332+ IOException ioException = null ;
63346333 List <Pair <byte [], String >> failures = new ArrayList <>();
63356334 for (Pair <byte [], String > p : familyPaths ) {
63366335 byte [] familyName = p .getFirst ();
63376336 String path = p .getSecond ();
63386337
63396338 HStore store = getStore (familyName );
63406339 if (store == null ) {
6341- IOException ioe = new org .apache .hadoop .hbase .DoNotRetryIOException (
6340+ ioException = new org .apache .hadoop .hbase .DoNotRetryIOException (
63426341 "No such column family " + Bytes .toStringBinary (familyName ));
6343- ioes .add (ioe );
63446342 } else {
63456343 try {
63466344 store .assertBulkLoadHFileOk (new Path (path ));
@@ -6349,18 +6347,16 @@ public Map<byte[], List<Path>> bulkLoadHFiles(Collection<Pair<byte[], String>> f
63496347 failures .add (p );
63506348 } catch (IOException ioe ) {
63516349 // unrecoverable (hdfs problem)
6352- ioes . add ( ioe ) ;
6350+ ioException = ioe ;
63536351 }
63546352 }
6355- }
63566353
6357- // validation failed because of some sort of IO problem.
6358- if (ioes . size () != 0 ) {
6359- IOException e = MultipleIOException . createIOException ( ioes );
6360- LOG . error ( "There were one or more IO errors when checking if the bulk load is ok." , e ) ;
6361- throw e ;
6354+ // validation failed because of some sort of IO problem.
6355+ if (ioException != null ) {
6356+ LOG . error ( "There was IO error when checking if the bulk load is ok." , ioException );
6357+ throw ioException ;
6358+ }
63626359 }
6363-
63646360 // validation failed, bail out before doing anything permanent.
63656361 if (failures .size () != 0 ) {
63666362 StringBuilder list = new StringBuilder ();
0 commit comments