Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KYLIN-4081 Use absolute path instead of relative for local segment cache #741

Merged
merged 1 commit into from Jul 19, 2019

Conversation

hit-lacus
Copy link
Member

Use absolute path instead of relative path for local segment cache may cause unpredicted result. After restart receiver, if working directory change, Receiver cannot find segment data/checkpoint which created previously, and recreate new one, which is a serious problem.

@codecov-io
Copy link

Codecov Report

Merging #741 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #741      +/-   ##
============================================
- Coverage     25.71%   25.71%   -0.01%     
  Complexity     6021     6021              
============================================
  Files          1387     1387              
  Lines         82758    82760       +2     
  Branches      11586    11586              
============================================
- Hits          21282    21279       -3     
- Misses        59432    59436       +4     
- Partials       2044     2045       +1
Impacted Files Coverage Δ Complexity Δ
...rg/apache/kylin/stream/server/StreamingServer.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...rg/apache/kylin/cube/inmemcubing/MemDiskStore.java 69.3% <0%> (-0.92%) 7% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 58f990c...f18df6c. Read the comment docs.

@coveralls
Copy link

coveralls commented Jul 15, 2019

Copy link

@allenma allenma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If user specify an absolute path, such as /path1/index, should respect that, otherwise if it is an relative path, use KylinHome as parent

@hit-lacus
Copy link
Member Author

If user specify an absolute path, such as /path1/index, should respect that, otherwise if it is an relative path, use KylinHome as parent

Yes, you are right.

1. Use absolute path instead of relative path for local segment cache may cause unpredicted result. After restart receiver, if working directory change, Receiver cannot find segment data/checkpoint which created previously, and recreate new one, which is a serious problem.

2. Add several way of metrics for streaming receiver, including console/csv/jmx.
@hit-lacus
Copy link
Member Author

Test Local Segment Cache Path

working directory is $HOME

  • Without manual configure

  • kylin.stream.index.path=/root/xiaoxiang.yu/KYLIN_4081_index

  • kylin.stream.index.path=KYLIN_4081_index

All manual test passed.

Copy link

@allenma allenma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hit-lacus
Copy link
Member Author

Test Metrics

kylin.stream.metrics.option=console

You can get metrics in logs/streaming_receiver.out.

-- Meters ----------------------------------------------------------------------
streaming.events.consume.cnt.UserActionCube.0
             count = 2588
         mean rate = 541.27 events/second
     1-minute rate = 0.00 events/second
     5-minute rate = 0.00 events/second
    15-minute rate = 0.00 events/second

-- Gauges ----------------------------------------------------------------------
gc.PS-MarkSweep.count
             value = 2
gc.PS-MarkSweep.time
             value = 90
gc.PS-Scavenge.count
             value = 2
gc.PS-Scavenge.time
             value = 42
memory.heap.committed
             value = 1163395072
memory.heap.init
             value = 1073741824
memory.heap.max
             value = 3817865216

kylin.stream.metrics.option=csv

You can get all file under $KYLIN_HOME/stream_metrics_csv, like this

[root@cdh-client apache-kylin-3.0.0-SNAPSHOT-bin-4081-receiver]# tree stream_metrics_csv/
stream_metrics_csv/
├── gc.PS-MarkSweep.count.csv
├── gc.PS-MarkSweep.time.csv
├── gc.PS-Scavenge.count.csv
├── gc.PS-Scavenge.time.csv
├── memory.heap.committed.csv
├── memory.heap.init.csv
├── memory.heap.max.csv
├── memory.heap.usage.csv
├── memory.heap.used.csv
├── memory.non-heap.committed.csv
├── memory.non-heap.init.csv
├── memory.non-heap.max.csv
├── memory.non-heap.usage.csv
├── memory.non-heap.used.csv
├── memory.pools.Code-Cache.committed.csv
├── memory.pools.Code-Cache.init.csv
├── memory.pools.Code-Cache.max.csv
├── memory.pools.Code-Cache.usage.csv
├── memory.pools.Code-Cache.used.csv
├── memory.pools.Compressed-Class-Space.committed.csv
├── memory.pools.Compressed-Class-Space.init.csv
├── memory.pools.Compressed-Class-Space.max.csv
├── memory.pools.Compressed-Class-Space.usage.csv
├── memory.pools.Compressed-Class-Space.used.csv
├── memory.pools.Metaspace.committed.csv
├── memory.pools.Metaspace.init.csv
├── memory.pools.Metaspace.max.csv
├── memory.pools.Metaspace.usage.csv
├── memory.pools.Metaspace.used.csv
├── memory.pools.PS-Eden-Space.committed.csv

kylin.stream.metrics.option=jmx

@allenma allenma merged commit 0b38be9 into apache:master Jul 19, 2019
@hit-lacus hit-lacus deleted the KYLIN-4081 branch August 15, 2019 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants