<commit_before>package pl.agh.edu.iosr.logs.writer.hdfs;

import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;

public class HDFSHelper {
	
	private Configuration config;
	private FileSystem hdfs;
	
	public HDFSHelper(Configuration conf) throws IOException, URISyntaxException {
		config = conf;
		hdfs = FileSystem.get( new URI("hdfs://localhost:8020"), config);
	}

	public FileSystem getHdfs() {
		return hdfs;
	}
}<commit_msg>Introduced properties for accessing filesystem and max file size.<commit_after>package pl.agh.edu.iosr.logs.writer.hdfs;

import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;

public class HDFSHelper {
	
	private Configuration config;
	private FileSystem hdfs;
	
	public HDFSHelper(Configuration conf) throws IOException, URISyntaxException {
		String fs = System.getProperty("fs.defaultFS", "hdfs://localhost:8020");
		String fileSize = System.getProperty("dfs.blocksize", "15000");
		System.setProperty("dfs.blocksize", fileSize);
		config = conf;
		hdfs = FileSystem.get( new URI(fs), config);
	}

	public FileSystem getHdfs() {
		return hdfs;
	}
}
{'fraction_non_alphanumeric': 0.11161731207289294, 'fraction_numerical': 0.009870918754745633, 'mean_word_length': 5.216981132075472, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2278069', 'n_tokens_mistral': 452, 'n_tokens_neox': 426, 'n_words': 96}