You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/01/22 09:33:14 UTC

[GitHub] [shardingsphere-elasticjob] jinjiangxu opened a new issue #1821: elastic-job-lite 3.x 使用事件追踪,但是在数据库查询不到任何追踪记录

jinjiangxu opened a new issue #1821:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1821


   ## Question
   
   *elastic-job-lite 3.x 使用事件追踪,但是在数据库查询不到任何追踪记录
   
   ## Code
   ```
   public class MyJobDemo {
       private static final String EVENT_RDB_STORAGE_DRIVER = "org.postgresql.Driver";
       private static final String EVENT_RDB_STORAGE_URL = "jdbc:postgresql://127.0.0.1:5432/elastic-job";
   
       public static void main(String[] args) {
           TracingConfiguration<DataSource> tracingConfig = new TracingConfiguration<>("RDB", setUpEventTraceDataSource());
           JobConfiguration jobConfiguration = createJobConfiguration();
           jobConfiguration.getExtraConfigurations().add(tracingConfig);
           new ScheduleJobBootstrap(createRegistryCenter(), new MyJob(), createJobConfiguration()).schedule();
       }
   
       private static CoordinatorRegistryCenter createRegistryCenter() {
           CoordinatorRegistryCenter regCenter = new ZookeeperRegistryCenter(new ZookeeperConfiguration("127.0.0.1:2181", "my-job"));
           regCenter.init();
           return regCenter;
       }
   
       private static JobConfiguration createJobConfiguration() {
           JobConfiguration jobConfig = JobConfiguration.newBuilder("myJob", 3).cron("0/5 * * * * ?").shardingItemParameters("0=Beijing,1=Shanghai,2=Guangzhou").build();
           return jobConfig;
       }
   
       private static DataSource setUpEventTraceDataSource() {
           BasicDataSource result = new BasicDataSource();
           result.setDriverClassName(EVENT_RDB_STORAGE_DRIVER);
           result.setUrl(EVENT_RDB_STORAGE_URL);
           result.setUsername("postgres");
           result.setPassword("postgres");
           return result;
       }
   }
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] TeslaCN commented on issue #1821: elastic-job-lite 3.x 使用事件追踪,但是在数据库查询不到任何追踪记录

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #1821:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1821#issuecomment-765273170


   **For English Only**


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] ArberChang commented on issue #1821: elastic-job-lite 3.x 使用事件追踪,但是在数据库查询不到任何追踪记录

Posted by GitBox <gi...@apache.org>.
ArberChang commented on issue #1821:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1821#issuecomment-856614397


   开发人员或许需要加强中文学习哦!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] TeslaCN closed issue #1821: elastic-job-lite 3.x 使用事件追踪,但是在数据库查询不到任何追踪记录

Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #1821:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1821


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org