@Test public void testSmallInitialBuffer() throws Exception { assertNoLeak(textLoader -> { String csv = "123\tabc\t2015-01-20T21:00:00.000Z\t3.1415\tTRUE\tLorem ipsum dolor sit amet.\t122\n" + "124\tabc\t2015-01-20T21:00:00.000Z\t7.342\tFALSE\t\"Lorem ipsum \n" + "\n" + "dolor \"\"sit\"\" amet.\"\t546756\n" + "125\tabc\t2015-01-20T21:00:00.000Z\t9.334\t\t\"Lorem ipsum \"\"dolor\"\" sit amet.\"\t23\n" + "126\tabc\t2015-01-20T21:00:00.000Z\t1.345\tTRUE\t\"Lorem, ipsum, dolor sit amet.\"\t434\n" + "120\tabc\t2015-01-20T21:00:00.000Z\t1.345\tTRUE\t\"Lorem, ipsum, dolor sit amet.\"\t434\tasdfasdf\tasdfasdf\tasdfasd\n" + "127\tabc\t2015-01-20T21:00:00.000Z\t1.53321\tTRUE\tLorem ipsum dolor sit amet.\t112\n" + "128\tabc\t2015-01-20T21:00:00.000Z\t2.456\tTRUE\tLorem ipsum dolor sit amet.\t122"; configureLoaderDefaults(textLoader, (byte) '\t'); textLoader.setForceHeaders(false); try { playText0(textLoader, csv, 1, ENTITY_MANIPULATOR); Assert.fail(); } catch (CairoException e) { TestUtils.assertContains(e.getMessage(), "cannot determine text structure"); } }); }
public void setForceHeaders(boolean forceHeaders) { this.forceHeaders = forceHeaders; }
TextLoader implements Closeable, Mutable { public void setForceHeaders(boolean forceHeaders) { this.forceHeaders = forceHeaders; } }
TextLoader implements Closeable, Mutable { public void setForceHeaders(boolean forceHeaders) { this.forceHeaders = forceHeaders; } TextLoader(CairoEngine engine); }
TextLoader implements Closeable, Mutable { public void setForceHeaders(boolean forceHeaders) { this.forceHeaders = forceHeaders; } TextLoader(CairoEngine engine); @Override void clear(); @Override void close(); void configureColumnDelimiter(byte columnDelimiter); void configureDestination(CharSequence tableName, boolean overwrite, boolean durable, int atomicity, int partitionBy, CharSequence timestampIndexCol); byte getColumnDelimiter(); LongList getColumnErrorCounts(); RecordMetadata getMetadata(); long getParsedLineCount(); long getErrorLineCount(); int getPartitionBy(); CharSequence getTableName(); long getWrittenLineCount(); boolean hasHeader(); boolean isForceHeaders(); void setForceHeaders(boolean forceHeaders); void setSkipRowsWithExtraValues(boolean skipRowsWithExtraValues); void parse(long lo, long hi, CairoSecurityContext cairoSecurityContext); void setState(int state); void wrapUp(); }
TextLoader implements Closeable, Mutable { public void setForceHeaders(boolean forceHeaders) { this.forceHeaders = forceHeaders; } TextLoader(CairoEngine engine); @Override void clear(); @Override void close(); void configureColumnDelimiter(byte columnDelimiter); void configureDestination(CharSequence tableName, boolean overwrite, boolean durable, int atomicity, int partitionBy, CharSequence timestampIndexCol); byte getColumnDelimiter(); LongList getColumnErrorCounts(); RecordMetadata getMetadata(); long getParsedLineCount(); long getErrorLineCount(); int getPartitionBy(); CharSequence getTableName(); long getWrittenLineCount(); boolean hasHeader(); boolean isForceHeaders(); void setForceHeaders(boolean forceHeaders); void setSkipRowsWithExtraValues(boolean skipRowsWithExtraValues); void parse(long lo, long hi, CairoSecurityContext cairoSecurityContext); void setState(int state); void wrapUp(); static final int LOAD_JSON_METADATA; static final int ANALYZE_STRUCTURE; static final int LOAD_DATA; }