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

[feature] integrate with Apache Arrow #2860

Merged

Conversation

Calvin979
Copy link
Contributor

@Calvin979 Calvin979 commented Dec 7, 2024

What's changed?

#2825

Not completed yet!!!!!

I've write codes that can run successfully in local. It can be tested by using CentOS monitor.
image

How to test?

  1. Add VM options in IDE.
    --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED
    image
  2. Create CentOS monitor.

Operations in Apache Arrow

Please refer package: org.apache.hertzbeat.common.entity.arrow
I've organized operations and data structure about arrow.

  • org.apache.hertzbeat.common.entity.arrow.ArrowVectorWriter: used for writing data and tranferring to bytes arr, which can be set in collect_rep.proto.
  • org.apache.hertzbeat.common.entity.arrow.ArrowVectorReader: used for reading bytes arr that created by ArrowVectorWriter
  • org.apache.hertzbeat.common.entity.arrow.RowWrapper and org.apache.hertzbeat.common.entity.arrow.ArrowCell: when try to read data from ArrowVectorReader, we can get this two data structure.
    image

Todo List

  • Complete comment on new method and class.
  • Delete Field and ValueRow in collect_rep.proto.
  • Modify collected data in package hertzbeat-collector
  • Add JDK options in scripts. See also: https://arrow.apache.org/docs/java/install.html#java-compatibility
  • Change unit case in package hertzbeat-collector
  • org.apache.hertzbeat.warehouse.store.history.HistoryDataWriter#saveData
  • org.apache.hertzbeat.warehouse.store.realtime.RealTimeDataWriter#saveData

Checklist

  • I have read the Contributing Guide
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

Add or update API

  • I have added the necessary e2e tests and all cases have passed.

@Calvin979 Calvin979 requested a review from tomsun28 December 7, 2024 10:33
@Calvin979 Calvin979 linked an issue Dec 7, 2024 that may be closed by this pull request
@Calvin979 Calvin979 changed the base branch from master to feature/integrate_apache_arrow December 8, 2024 03:59
# Conflicts:
#	hertzbeat-collector/hertzbeat-collector-basic/src/main/java/org/apache/hertzbeat/collector/collect/snmp/SnmpCollectImpl.java
#	hertzbeat-collector/hertzbeat-collector-collector/src/main/java/org/apache/hertzbeat/collector/dispatch/MetricsCollect.java
@Calvin979 Calvin979 merged commit cafbac7 into apache:feature/integrate_apache_arrow Dec 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

[Task] Use apache arrow to store metrics data
2 participants