Skip to content

Commit

Permalink
[improve][writer][elasticsearch] remove unused variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
wgzhao committed Feb 2, 2024
1 parent 114fb7f commit a9f5b5a
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ public void startWrite(RecordReceiver recordReceiver)

private String getDateStr(ESColumn esColumn, Column column)
{
DateTime date = null;
DateTime date;
DateTimeZone dtz = DateTimeZone.getDefault();
if (esColumn.getTimezone() != null) {
// 所有时区参考 http://www.joda.org/joda-time/timezones.html
Expand All @@ -345,7 +345,7 @@ else if (column.getType() == Column.Type.DATE) {

private long doBatchInsert(final List<Record> writerBuffer)
{
Map<String, Object> data = null;
Map<String, Object> data;
final Bulk.Builder bulkAction = new Bulk.Builder().defaultIndex(this.index).defaultType(this.type);
for (Record record : writerBuffer) {
data = new HashMap<>();
Expand Down Expand Up @@ -403,8 +403,6 @@ private long doBatchInsert(final List<Record> writerBuffer)
data.put(columnName, column.asLong());
break;
case INTEGER:
data.put(columnName, column.asBigInteger());
break;
case SHORT:
data.put(columnName, column.asBigInteger());
break;
Expand Down

0 comments on commit a9f5b5a

Please sign in to comment.