forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve pulsar functions logging (apache#165)
- inject instance id in thread context. so we can have instance id information in function log - rename dlog logging to bk logging, so all bk/dlog logging can be routed there - add more variables to allow overrides by sys variables - fixes some scripts
- Loading branch information
Showing
8 changed files
with
245 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
java -cp runtime/target/java-instance.jar -Dlog4j.configurationFile=java_instance_log4j2.yml org.apache.pulsar.functions.runtime.instance.JavaInstanceMain \ | ||
--name example \ | ||
--tenant "test" \ | ||
--namespace test-namespace \ | ||
--source_topics persistent://sample/standalone/ns1/test_src \ | ||
--sink_topic persistent://sample/standalone/ns1/test_result \ | ||
--input_serde_classnames org.apache.pulsar.functions.api.utils.Utf8StringSerDe \ | ||
--output_serde_classname org.apache.pulsar.functions.api.utils.Utf8StringSerDe \ | ||
--processing_guarantees ATMOST_ONCE \ | ||
--instance_id test-instance-id \ | ||
--function_id test-function-id \ | ||
--function_version "1.0" \ | ||
--pulsar_serviceurl "pulsar://localhost:6650/" \ | ||
--port 0 \ | ||
--max_buffered_tuples 1000 \ | ||
--function_classname org.apache.pulsar.functions.api.examples.CounterFunction \ | ||
--state_storage_serviceurl localhost:4182 \ | ||
--jar `pwd`/java-examples/target/pulsar-functions-api-examples.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.