getting crc^@^@^@^B^@ at the end of output file

I am wrting file with Haddop API, i checked outputSessionData, its look fine

outputSessionData.saveAsNewAPIHadoopFile(outputDataDir, String.class, Map.class, PeopleSessionFormatter.class, ContextHandler.getInstance().getHadoopConf());

we’re using, HadoopFileSystemHandler
FileSystem fs = HadoopFileSystemHandler.getInstance().getHadoopLocalFileSystem();

but in the end result i am getting that crc thing

public class PeopleSessionFormatter extends FileOutputFormat<String, Map<String, ArrayList<PeopleSession>>> {

private static Logger logger = Logger.getLogger(PeopleSessionFormatter.class.getName());

    @Override
    public RecordWriter<String, Map<String, ArrayList<PeopleSession>>> getRecordWriter(TaskAttemptContext context)
throws IOException, InterruptedException {
        try {
            // get the current path
            Path path = FileOutputFormat.getOutputPath(context);

            // create the full path with the output directory plus our filename
            Path fullPath = new Path(path, context.getTaskAttemptID().getTaskID().toString());

            // create the file in the file system
            FileSystem fs = HadoopFileSystemHandler.getInstance().getHadoopLocalFileSystem();
            FSDataOutputStream fileOut = fs.create(fullPath);

            return new PeopleSessionWriter(fileOut, context.getConfiguration().get(Constant.DELIMITER1));
        } catch (Exception e) {
            logger.error("Failed to set record writer for output part files. The error message is: " + e.getMessage());
            logger.error(e.getStackTrace());
            throw new IOException(e.getMessage());
        }
    }

    @Override
    public void checkOutputSpecs(JobContext job) throws FileAlreadyExistsException, IOException {
        // Ensure that the output directory is set and not already there
        Path outDir = getOutputPath(job);
        if (outDir == null) {
            throw new InvalidJobConfException("Validation Output directory not set.");
        }

        // get delegation token for outDir's file system
        TokenCache.obtainTokensForNamenodes(job.getCredentials(), new Path[] { outDir }, job.getConfiguration());

        if (outDir.getFileSystem(job.getConfiguration()).exists(outDir)) {
            logger.warn("Overwriting existing session files.");
        }
    }
}

public class ContextHandler {

// Fields.
SparkConf sparkConf;
JavaSparkContext sc;
Configuration hadoopConf;

// Singleton.
private static ContextHandler instance;

public static ContextHandler getInstance() throws Exception {
    if (instance == null) {
        instance = new ContextHandler();
    }
    return instance;
}

private ContextHandler() throws Exception {

    ValidationConfigHandler cfgHandler = OcConfigHandler.getInstance().getOcConfigurations();

    // Create configuration.
    sparkConf = new SparkConf();
    sparkConf.setAppName(Constant.APPLICATION_NAME);
    sparkConf.set(Constant.SPARK_EXECUTOR_EXTRA_JAVA_OPTIONS_KEY, cfgHandler.getSparkExecutorExtraJavaOptions());

    if (cfgHandler.getEnableKryoSerialization()) {
        sparkConf.set(com.kantarmedia.atriang.share.util.Constant.SPARK_SERIALIZER,
                com.kantarmedia.atriang.share.util.Constant.KRYO_SERIALIZER);
        sparkConf.set(com.kantarmedia.atriang.share.util.Constant.KRYO_REGISTRATION_REQUIRED,
                com.kantarmedia.atriang.share.util.Constant.TRUE);
        String krySerializationClasses = com.kantarmedia.atriang.share.util.Constant.KRYO_SERIALIZATION_CLASSES;
        String[] classNameArray = krySerializationClasses
                .split(com.kantarmedia.atriang.share.util.Constant.COMMA_SEPERATOR);
        int i = 0;
        Class[] classArray = new Class[classNameArray.length];
        for (String className : classNameArray) {
            classArray[i++] = Class.forName(className);
        }

        sparkConf.registerKryoClasses(classArray);
    }

    hadoopConf = new Configuration();
    hadoopConf.set(Constant.DELIMITER1, cfgHandler.getDelimiter1());
}

public JavaSparkContext getSparkContext() {
    if (sc == null)
        sc = new JavaSparkContext(sparkConf);
    return sc;
}

public void closeSparkContext() {
    if (sc != null)
        sc.close();
}

public SparkConf getConf() {
    return sparkConf;
}

public void tearDown() {
    closeSparkContext();
}

public Configuration getHadoopConf() {
    return hadoopConf;
}

}

Writing file in format of .psv
DELIMITER1 is ‘|’ symbol

I dont want crc^@^@^@^B^@ in .psv output file

New contributor

pranav parab is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật