1) Fix bug with sharded realtime data ingestion

This commit is contained in:
Eric Tschetter 2012-10-30 10:59:07 -05:00
parent 8a49c156ed
commit f062e136d0
2 changed files with 6 additions and 11 deletions

View File

@ -194,6 +194,11 @@ public class DataSegment implements Comparable<DataSegment>
return builder(this).loadSpec(loadSpec).build();
}
public DataSegment withDimensions(List<String> dimensions)
{
return builder(this).dimensions(dimensions).build();
}
public DataSegment withSize(long size)
{
return builder(this).size(size).build();

View File

@ -307,16 +307,7 @@ public class RealtimePlumberSchool implements PlumberSchool
DataSegment segment = segmentPusher.push(
mergedFile,
new DataSegment(
schema.getDataSource(),
interval,
interval.getStart().toString(),
null,
Lists.newArrayList(index.getAvailableDimensions()),
Lists.newArrayList(index.getAvailableMetrics()),
new NoneShardSpec(),
0
)
sink.getSegment().withDimensions(Lists.newArrayList(index.getAvailableDimensions()))
);
metadataUpdater.publishSegment(segment);
@ -325,7 +316,6 @@ public class RealtimePlumberSchool implements PlumberSchool
log.makeAlert(e, "Failed to persist merged index[%s]", schema.getDataSource())
.addData("interval", interval)
.emit();
return;
}
}
}