@Test public void shouldOutputAsPropertiesWithVeryLongPropValueAndLargeNodeSizeAndHighEdgeId() throws Exception { driver.setConfiguration(populateConfigWithMetaDataWithLargeNodeSize()); output = driver .withInputKey(new Text("700000000")) .withInputValue( new Text( "B C Prop1 Prop2 AndAPropWithAverryLongvalueBecauseWeKindOfNeedToFindOutIfABlockCountIsPresentAndCorrectAndAPropWithAverryLongvalueBecauseWeKindOfNeedToFindOutIfABlockCountIsPresentAndCorrect")) .run(); FullEdgePropertiesWritable edge1 = new FullEdgePropertiesWritable(700000000, "B", "C", 0, 0, -1, -1, 5, "Prop1"); edge1.add(6, "Prop2", 0); FullEdgePropertiesWritable edge2 = new FullEdgePropertiesWritable( 700000000, "B", "C", 1, 2, -1, -1, 7, "AndAPropWithAverryLongvalueBecauseWeKindOfNeedToFindOutIfABlockCountIsPresentAndCorrectAndAPropWithAverryLongvalueBecauseWeKindOfNeedToFindOutIfABlockCountIsPresentAndCorrect"); assertThat(output.size(), is(2)); assertThat( output.get(0).getFirst(), equalTo(new AscLongDescLongWritable(new LongWritable(700000000L), new LongWritable(0)))); assertThat(output.get(0).getSecond(), equalTo(edge1)); assertThat( output.get(1).getFirst(), equalTo(new AscLongDescLongWritable(new LongWritable(700000000L), new LongWritable(1)))); assertThat(output.get(1).getSecond(), equalTo(edge2)); }
@Test public void shouldOutputAsProperties() throws Exception { driver.setConfiguration(populateConfigWithMetaData()); output = driver .withInputKey(new Text("0")) .withInputValue( new Text( "A B Prop3 Prop4 AndAPropWithAverryLongvalueBecauseWeKindOfNeedToFindOutIfABlockCountIsPresentAndCorrect")) .run(); FullEdgePropertiesWritable edge1 = new FullEdgePropertiesWritable(0, "A", "B", 0, 0, -1, -1, 5, "Prop3"); edge1.add(6, "Prop4", 0); FullEdgePropertiesWritable edge2 = new FullEdgePropertiesWritable( 0, "A", "B", 1, 1, -1, -1, 7, "AndAPropWithAverryLongvalueBecauseWeKindOfNeedToFindOutIfABlockCountIsPresentAndCorrect"); assertThat(output.size(), is(2)); assertThat( output.get(0).getFirst(), equalTo(new AscLongDescLongWritable(new LongWritable(0), new LongWritable(0)))); assertThat(output.get(0).getSecond(), equalTo(edge1)); assertThat( output.get(1).getFirst(), equalTo(new AscLongDescLongWritable(new LongWritable(0), new LongWritable(1)))); assertThat(output.get(1).getSecond(), equalTo(edge2)); }