private DataFile newDataFile() throws IOException { int nextNum = nextDataFileId++; File file = getFile(nextNum); DataFile nextWriteFile = new DataFile(file, nextNum); preallocateEntireJournalDataFile(nextWriteFile.appendRandomAccessFile()); return nextWriteFile; }
public DataFile reserveDataFile() { synchronized (dataFileIdLock) { int nextNum = nextDataFileId++; File file = getFile(nextNum); DataFile reservedDataFile = new DataFile(file, nextNum); synchronized (currentDataFile) { fileMap.put(reservedDataFile.getDataFileId(), reservedDataFile); fileByFileMap.put(file, reservedDataFile); if (dataFiles.isEmpty()) { dataFiles.addLast(reservedDataFile); } else { dataFiles.getTail().linkBefore(reservedDataFile); } } return reservedDataFile; } }
String numStr = n.substring(filePrefix.length(), n.length()-fileSuffix.length()); int num = Integer.parseInt(numStr); DataFile dataFile = new DataFile(file, num); fileMap.put(dataFile.getDataFileId(), dataFile); totalLength.addAndGet(dataFile.getLength());
if (!config.isOnlyMemory() && dataHead.inMemory >= config.memoryThreshold) { try { String prefix = config.getTempFilePrefix(); String suffix = config.getTempFileSuffix(); File dir = config.getTempDir(); File tempFile = (dir == null) ? File.createTempFile(prefix, suffix) // here your code crashes : File.createTempFile(prefix, suffix, dir); LOGGER.fine("Created temp file = "+tempFile); dataHead.dataFile = new DataFile(tempFile); } catch(IOException ioe) { throw new MIMEParsingException(ioe); }
private DataFile newDataFile() throws IOException { int nextNum = nextDataFileId++; File file = getFile(nextNum); DataFile nextWriteFile = new DataFile(file, nextNum); preallocateEntireJournalDataFile(nextWriteFile.appendRandomAccessFile()); return nextWriteFile; }
private DataFile newDataFile() throws IOException { int nextNum = nextDataFileId++; File file = getFile(nextNum); DataFile nextWriteFile = new DataFile(file, nextNum); preallocateEntireJournalDataFile(nextWriteFile.appendRandomAccessFile()); return nextWriteFile; }
private DataFile newDataFile() throws IOException { int nextNum = nextDataFileId++; File file = getFile(nextNum); DataFile nextWriteFile = new DataFile(file, nextNum); preallocateEntireJournalDataFile(nextWriteFile.appendRandomAccessFile()); return nextWriteFile; }
public DataFile reserveDataFile() { synchronized (dataFileIdLock) { int nextNum = nextDataFileId++; File file = getFile(nextNum); DataFile reservedDataFile = new DataFile(file, nextNum); synchronized (currentDataFile) { fileMap.put(reservedDataFile.getDataFileId(), reservedDataFile); fileByFileMap.put(file, reservedDataFile); if (dataFiles.isEmpty()) { dataFiles.addLast(reservedDataFile); } else { dataFiles.getTail().linkBefore(reservedDataFile); } } return reservedDataFile; } }
public DataFile reserveDataFile() { synchronized (dataFileIdLock) { int nextNum = nextDataFileId++; File file = getFile(nextNum); DataFile reservedDataFile = new DataFile(file, nextNum); synchronized (currentDataFile) { fileMap.put(reservedDataFile.getDataFileId(), reservedDataFile); fileByFileMap.put(file, reservedDataFile); if (dataFiles.isEmpty()) { dataFiles.addLast(reservedDataFile); } else { dataFiles.getTail().linkBefore(reservedDataFile); } } return reservedDataFile; } }
public DataFile reserveDataFile() { synchronized (dataFileIdLock) { int nextNum = nextDataFileId++; File file = getFile(nextNum); DataFile reservedDataFile = new DataFile(file, nextNum); synchronized (currentDataFile) { fileMap.put(reservedDataFile.getDataFileId(), reservedDataFile); fileByFileMap.put(file, reservedDataFile); if (dataFiles.isEmpty()) { dataFiles.addLast(reservedDataFile); } else { dataFiles.getTail().linkBefore(reservedDataFile); } } return reservedDataFile; } }
String numStr = n.substring(filePrefix.length(), n.length()-fileSuffix.length()); int num = Integer.parseInt(numStr); DataFile dataFile = new DataFile(file, num); fileMap.put(dataFile.getDataFileId(), dataFile); totalLength.addAndGet(dataFile.getLength());
String numStr = n.substring(filePrefix.length(), n.length()-fileSuffix.length()); int num = Integer.parseInt(numStr); DataFile dataFile = new DataFile(file, num); fileMap.put(dataFile.getDataFileId(), dataFile); totalLength.addAndGet(dataFile.getLength());
String numStr = n.substring(filePrefix.length(), n.length()-fileSuffix.length()); int num = Integer.parseInt(numStr); DataFile dataFile = new DataFile(file, num); fileMap.put(dataFile.getDataFileId(), dataFile); totalLength.addAndGet(dataFile.getLength());
DataFile dataFile = new DataFile("e:\\hugeRawFile.csv"); DataProcessor dataProcessor = new DataProcessor();