Skip to content

Commit

Permalink
fix resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
EC2 Default User committed Jun 21, 2016
2 parents 6fffec2 + 629fec9 commit 886c67c
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 17 deletions.
19 changes: 15 additions & 4 deletions src/main/config/log4j.dev.properties
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
# log4j logging dev configuration.
# log4j logging configuration.

# root logger.
log4j.rootLogger=DEBUG, CONSOLE, ROLLINGFILE

log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=INFO
log4j.appender.CONSOLE.Threshold=WARN
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} [%t] (%C:%L) %-5p %m%n

log4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender
log4j.appender.ROLLINGFILE.Threshold=DEBUG
log4j.appender.ROLLINGFILE.File=/tmp/secor_dev/logs/secor.log
log4j.appender.ROLLINGFILE.Threshold=INFO
log4j.appender.ROLLINGFILE.File=/tmp/secor-me/logs/secor-${secor_group}.log
# keep log files up to 1G
log4j.appender.ROLLINGFILE.MaxFileSize=20MB
log4j.appender.ROLLINGFILE.MaxBackupIndex=50
log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601} [%t] (%C:%L) %-5p %m%n

log4j.appender.ROLLINGFILE2=org.apache.log4j.RollingFileAppender
log4j.appender.ROLLINGFILE2.Threshold=DEBUG
log4j.appender.ROLLINGFILE2.File=/tmp/secor-me/logs/secor-uploader.log
# keep log files up to 1G
log4j.appender.ROLLINGFILE2.MaxFileSize=200MB
log4j.appender.ROLLINGFILE2.MaxBackupIndex=5
log4j.appender.ROLLINGFILE2.layout=org.apache.log4j.PatternLayout
log4j.appender.ROLLINGFILE2.layout.ConversionPattern=%d{ISO8601} [%t] (%C:%L) %-5p %m%n

log4j.logger.com.pinterest.secor.uploader.Uploader=DEBUG, ROLLINGFILE2
4 changes: 4 additions & 0 deletions src/main/config/secor.common.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
############

# Regular expression matching names of consumed topics.
<<<<<<< HEAD
secor.kafka.topic_filter=sandbox.telemetry.unique
=======
secor.kafka.topic_filter=replay
>>>>>>> 629fec9a3ecb48e5b2ed4b6933d129b6c32fb40e

# AWS authentication credentials.
aws.access.key=${aws.access.key}
Expand Down
17 changes: 9 additions & 8 deletions src/main/config/secor.dev.partition.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@
include=secor.dev.properties

# Name of the Kafka consumer group.
secor.kafka.group=secor_partition
secor.kafka.group=secor-me

# Parser class that extracts s3 partitions from consumed messages.
secor.message.parser.class=com.pinterest.secor.parser.PatternDateMessageParser

# S3 path where sequence files are stored.
secor.s3.path=secor_dev
secor.s3.path=

# Local path where sequence files are stored before they are uploaded to s3.
secor.local.path=/tmp/secor_dev/message_logs/partition
secor.local.path=/tmp/secor-me/message_logs/partition

# Port of the Ostrich server.
ostrich.port=9998
ostrich.port=9997

# Partition Date Output format. This is used along with PatternDateMessageParser. Defaults to 'yyyy-MM-dd' *New*
secor.partition.output_dt_format=dd_MM_yyyy
secor.partition.output_dt_format=yyyy-MM-dd

# Output file pattern excluding prefix. Defaults to topic/partition/generation_kafkaPartition_fmOffset.gz.
# Available placeholders are
Expand All @@ -41,7 +41,8 @@ secor.partition.output_dt_format=dd_MM_yyyy
# kafkaPartition - The kafka partition
# fmOffset - First Message offset in the file.
# randomHex - A 4 character random hex to append to the file name
# currentTimestamp - Epoch time
# currentTime - Time in HH-mm format
# currentTimestamp - Time of upload in epoch format
# currentTime - Time of upload in HH-mm format
# currentDate - Time of upload in YYYYMMDD format
# folder - Folder to use based on message id map lookup
secor.s3.output_file_pattern={partition}-{currentTimestamp}.json
secor.s3.output_file_pattern={partition}-{currentDate}.json
6 changes: 3 additions & 3 deletions src/main/config/secor.dev.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include=secor.common.properties
############

# Name of the s3 bucket where log files are stored.
secor.s3.bucket=
secor.s3.bucket=lpdev-ekstep

################
# END MUST SET #
Expand All @@ -18,8 +18,8 @@ zookeeper.quorum=localhost:2181

# Upload policies.
# 10K
secor.max.file.size.bytes=10000
secor.max.file.size.bytes=1000000000
# 10 seconds
secor.max.file.age.seconds=10
secor.max.file.age.seconds=300
# Compute the max file age for a topic partition using either the oldest or newest file. Defaults to newest
secor.max.file.age.policy=oldest
4 changes: 2 additions & 2 deletions src/main/java/com/pinterest/secor/uploader/Uploader.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,13 @@ private void checkTopicPartition(TopicPartition topicPartition) throws Exception
LOG.debug("Uploading for: " + topicPartition);
uploadFiles(topicPartition);
} else if (newOffsetCount > lastSeenOffset) { // && oldOffset < newOffset
LOG.debug("last seen offset {} is lower than committed offset count {}. Deleting files in topic {} partition {}",
LOG.warn("last seen offset {} is lower than committed offset count {}. Deleting files in topic {} partition {}",
lastSeenOffset, newOffsetCount,topicPartition.getTopic(), topicPartition.getPartition());
// There was a rebalancing event and someone committed an offset beyond that of the
// current message. We need to delete the local file.
mFileRegistry.deleteTopicPartition(topicPartition);
} else { // oldOffsetCount < newOffsetCount <= lastSeenOffset
LOG.debug("previous committed offset count {} is lower than committed offset {} is lower than or equal to last seen offset {}. " +
LOG.warn("previous committed offset count {} is lower than committed offset {} is lower than or equal to last seen offset {}. " +
"Trimming files in topic {} partition {}",
oldOffsetCount, newOffsetCount, lastSeenOffset, topicPartition.getTopic(), topicPartition.getPartition());
// There was a rebalancing event and someone committed an offset lower than that
Expand Down

0 comments on commit 886c67c

Please sign in to comment.