Skip to content

Commit

Permalink
Moved FileStoreException class
Browse files Browse the repository at this point in the history
  • Loading branch information
Jai Balani committed Feb 19, 2025
1 parent cd6ead6 commit fb860f6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

package com.github.ambry.clustermap;
package com.github.ambry.store;

/**
* Custom exception class for FileStore-related errors.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package com.github.ambry.store;

import com.github.ambry.clustermap.FileStoreException;
import com.github.ambry.config.FileCopyConfig;
import com.github.ambry.utils.CrcInputStream;
import com.github.ambry.utils.CrcOutputStream;
Expand All @@ -35,7 +34,7 @@
import java.nio.file.StandardOpenOption;
import java.util.ArrayList;
import java.util.List;
import com.github.ambry.clustermap.FileStoreException.FileStoreErrorCode;
import com.github.ambry.store.FileStoreException.FileStoreErrorCode;
import java.util.Objects;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -195,7 +194,8 @@ public void putChunkToFile(String outputFilePath, DataInputStream dataInputStrea
int fileSize = dataInputStream.available();
byte[] content = Utils.readBytesFromStream(dataInputStream, fileSize);

// Write content to file with create and append options
// Write content to file with create and append options, which will create a new file if file doesn't exist
// and append to the existing file if file exists
Files.write(Paths.get(outputFilePath), content,
StandardOpenOption.CREATE, StandardOpenOption.APPEND);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@
*/
package com.github.ambry.store;

import com.github.ambry.clustermap.FileStoreException;
import com.github.ambry.config.FileCopyConfig;
import com.github.ambry.config.VerifiableProperties;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.RandomAccessFile;
Expand Down

0 comments on commit fb860f6

Please sign in to comment.