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 #2864

Merged
merged 40 commits into from
Dec 24, 2024
Merged

Conversation

Calvin979
Copy link
Contributor

@Calvin979 Calvin979 commented Dec 9, 2024

What's changed?

Relate to: #2825

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 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

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 9, 2024 15:24
@github-actions github-actions bot added doc Improvements or additions to documentation build script labels Dec 9, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has checked 2888 files.

Valid Invalid Ignored Fixed
1491 2 1395 0
Click to see the invalid file list
  • hertzbeat-collector/hertzbeat-collector-common/src/main/java/org/apache/hertzbeat/collector/collect/common/MetricsDataBuilder.java
  • hertzbeat-common/src/main/java/org/apache/hertzbeat/common/entity/message/CollectRep.java
Use this command to fix any missing license headers
```bash

docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

</details>

@@ -0,0 +1,23 @@
package org.apache.hertzbeat.collector.collect.common;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
package org.apache.hertzbeat.collector.collect.common;
/*
* 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.
*/
package org.apache.hertzbeat.collector.collect.common;

* specific language governing permissions and limitations
* under the License.
*/

// Generated by the protocol buffer compiler. DO NOT EDIT!
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Generated by the protocol buffer compiler. DO NOT EDIT!
/*
* 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.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!

@@ -0,0 +1,23 @@
package org.apache.hertzbeat.collector.collect.common;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
package org.apache.hertzbeat.collector.collect.common;
/*
* 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.
*/
package org.apache.hertzbeat.collector.collect.common;

@@ -20,4411 +1,1802 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Generated by the protocol buffer compiler. DO NOT EDIT!
/*
* 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.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!

@Calvin979 Calvin979 changed the title Feature/integrate apache arrow [feature] integrate with Apache Arrow Dec 9, 2024
@github-actions github-actions bot removed the backend label Dec 9, 2024
@tomsun28 tomsun28 added this to the 1.6.2 milestone Dec 12, 2024
@tomsun28 tomsun28 linked an issue Dec 14, 2024 that may be closed by this pull request
@tomsun28
Copy link
Contributor

👍👍 great! i need more time to review🤭

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has checked 2892 files.

Valid Invalid Ignored Fixed
1494 3 1395 0
Click to see the invalid file list
  • hertzbeat-common/src/main/java/org/apache/arrow/vector/table/ArrowTable.java
  • hertzbeat-common/src/main/java/org/apache/hertzbeat/common/serialize/RedisMetricsDataCodec.java
  • hertzbeat-common/src/test/java/org/apache/arrow/vector/table/ArrowTableTest.java
Use this command to fix any missing license headers
```bash

docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

</details>

@@ -0,0 +1,90 @@
package org.apache.arrow.vector.table;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
package org.apache.arrow.vector.table;
/*
* 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.
*/
package org.apache.arrow.vector.table;

@@ -0,0 +1,90 @@
package org.apache.arrow.vector.table;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
package org.apache.arrow.vector.table;
/*
* 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.
*/
package org.apache.arrow.vector.table;

@github-actions github-actions bot added the home label Dec 23, 2024
Copy link
Contributor

@tomsun28 tomsun28 left a comment

Choose a reason for hiding this comment

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

👍👍👍 Done! we need more test after merge.

main test points.

  • collector cluster mode
  • kafka common queue
  • inner memory common queue

@tomsun28 tomsun28 merged commit 4236c43 into master Dec 24, 2024
4 checks passed
@zqr10159 zqr10159 deleted the feature/integrate_apache_arrow branch December 30, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build doc Improvements or additions to documentation good first pull request Good for newcomers helm home kubernetes new feature script
Projects
Development

Successfully merging this pull request may close these issues.

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