class ApacheHttpdlogDeserializer extends AbstractDeserializer {

    @Override
    public Object deserialize(Writable writable) throws SerDeException {
        if (!(writable instanceof Text)) {
            throw new SerDeException("The input MUST be a Text line.");
        }

        linesInput++;

        try {
            currentValue.clear();
            parser.parse(currentValue, writable.toString());
        } catch (DissectionFailure dissectionFailure) {
            linesBad++;
            if (linesInput >= MINIMAL_FAIL_LINES) {
                if (100* linesBad > MINIMAL_FAIL_PERCENTAGE * linesInput){
                    throw new SerDeException("To many bad lines: " + linesBad + " of " + linesInput + " are bad.");
                }
            }
            return null; // Just return that this line is nothing.
        } catch (InvalidDissectorException |MissingDissectorsException e) {
            throw new SerDeException("Cannot continue; Fix the Dissectors before retrying", e);
        }

        for (ColumnToGetterMapping ctgm: columnToGetterMappings) {
            switch(ctgm.casts) {
                case STRING:
                    String currentValueString = currentValue.getString(ctgm.fieldValue);
                    row.set(ctgm.index, currentValueString);
                    break;
                case LONG:
                    Long currentValueLong = currentValue.getLong(ctgm.fieldValue);
                    row.set(ctgm.index, currentValueLong);
                    break;
                case DOUBLE:
                    Double currentValueDouble = currentValue.getDouble(ctgm.fieldValue);
                    row.set(ctgm.index, currentValueDouble);
                    break;
                default:
                    // Do nothing
            }
        }

        return row;
    }

}