You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "wolfboys (via GitHub)" <gi...@apache.org> on 2023/04/11 06:07:32 UTC

[GitHub] [hudi] wolfboys opened a new pull request, #8426: [Feature] hudi console initial commit

wolfboys opened a new pull request, #8426:
URL: https://github.com/apache/hudi/pull/8426

   [Feature] hudi console initial commit
   
   ### Impact
   
   _Describe any public API or user-facing feature change or any performance impact._
   
   ### Risk level (write none, low medium or high below)
   
   _If medium or high, explain what verification was done to mitigate the risks._
   
   ### Documentation Update
   
   _Describe any necessary documentation update if there is any new feature, config, or user-facing change_
   
   - _The config description must be updated if new configs are added or the default value of the configs are changed_
   - _Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
     ticket number here and follow the [instruction](https://hudi.apache.org/contribute/developer-setup#website) to make
     changes to the website._
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Change Logs and Impact were stated clearly
   - [ ] Adequate tests were added if applicable
   - [ ] CI passed
   


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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] XuQianJin-Stars commented on pull request #8426: [Feature] hudi console initial commit

Posted by "XuQianJin-Stars (via GitHub)" <gi...@apache.org>.
XuQianJin-Stars commented on PR #8426:
URL: https://github.com/apache/hudi/pull/8426#issuecomment-1504773488

   @hudi-bot run azure


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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8426: [Feature] hudi console initial commit

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8426:
URL: https://github.com/apache/hudi/pull/8426#issuecomment-1502754918

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16248",
       "triggerID" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 522eacf6b91c62da70c03cc0cfd9c841604f40a0 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16248) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] XuQianJin-Stars commented on a diff in pull request #8426: [Feature] hudi console initial commit

Posted by "XuQianJin-Stars (via GitHub)" <gi...@apache.org>.
XuQianJin-Stars commented on code in PR #8426:
URL: https://github.com/apache/hudi/pull/8426#discussion_r1162442519


##########
hudi-console/README.md:
##########
@@ -0,0 +1,71 @@
+<!--
+  ~ 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.
+  ~
+  -->
+
+# Apache Hudi Console
+
+Apache Hudi (pronounced Hoodie) stands for `Hadoop Upserts Deletes and Incrementals`. Hudi manages the storage of large
+analytical datasets on DFS (Cloud stores, HDFS or any Hadoop FileSystem compatible storage).
+
+<img src="https://hudi.apache.org/assets/images/hudi-logo-medium.png" alt="Hudi logo" height="80px" align="right" />
+
+<https://hudi.apache.org/>
+
+[![Build](https://github.com/apache/hudi/actions/workflows/bot.yml/badge.svg)](https://github.com/apache/hudi/actions/workflows/bot.yml)
+[![Test](https://dev.azure.com/apache-hudi-ci-org/apache-hudi-ci/_apis/build/status/apachehudi-ci.hudi-mirror?branchName=master)](https://dev.azure.com/apache-hudi-ci-org/apache-hudi-ci/_build/latest?definitionId=3&branchName=master)
+[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
+[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.hudi/hudi/badge.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.hudi%22)
+![GitHub commit activity](https://img.shields.io/github/commit-activity/m/apache/hudi)
+[![Join on Slack](https://img.shields.io/badge/slack-%23hudi-72eff8?logo=slack&color=48c628&label=Join%20on%20Slack)](https://join.slack.com/t/apache-hudi/shared_invite/zt-1e94d3xro-JvlNO1kSeIHJBTVfLPlI5w)
+![Twitter Follow](https://img.shields.io/twitter/follow/ApacheHudi)
+
+
+## 🚀 What is Hudi Console?
+
+<h4>StreamPark is a stream processing development framework and professional management platform. </h4>

Review Comment:
   StreamPark -> Hudi Console ?



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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] XuQianJin-Stars commented on a diff in pull request #8426: [Feature] hudi console initial commit

Posted by "XuQianJin-Stars (via GitHub)" <gi...@apache.org>.
XuQianJin-Stars commented on code in PR #8426:
URL: https://github.com/apache/hudi/pull/8426#discussion_r1170761551


##########
hudi-console/hudi-console/src/main/assembly/script/README.md:
##########
@@ -0,0 +1,23 @@
+# Hudi Console DataBase Guide
+
+## Initialization Guide
+
+Currently, Hudi console supports MySQL and PostgreSQL. The schema directory is the current database schema, it includes mysql and pgsql
+schema. The data directory is the current complete data, it includes mysql and pgsql data.
+
+If you use MySQL as the Hudi database, please execute `mysql-schema.sql` first, then execute `mysql-data.sql` to initialize data.
+
+If you use PostgreSQL as the Hudi database, please execute `pgsql-schema.sql` first, then execute `pgsql-data.sql` to initialize data.
+
+## Upgrade Guide
+
+When upgrading StreamPark from an old version to a new version, you need to execute some SQL to upgrade the schema and data of the database.

Review Comment:
   StreamPark -> hudi? or TODO



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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] XuQianJin-Stars commented on a diff in pull request #8426: [Feature] hudi console initial commit

Posted by "XuQianJin-Stars (via GitHub)" <gi...@apache.org>.
XuQianJin-Stars commented on code in PR #8426:
URL: https://github.com/apache/hudi/pull/8426#discussion_r1170761824


##########
hudi-console/hudi-console/src/main/java/org/apache/hudi/console/base/emuns/UserType.java:
##########
@@ -0,0 +1,46 @@
+/*
+ * 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.hudi.console.base.emuns;
+
+import com.baomidou.mybatisplus.annotation.EnumValue;
+
+import java.util.Arrays;
+
+/** The user type. */
+public enum UserType {
+
+  /** The admin of StreamPark. */

Review Comment:
   StreamPark -> hudi



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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8426: [Feature] hudi console initial commit

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8426:
URL: https://github.com/apache/hudi/pull/8426#issuecomment-1518682967

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16248",
       "triggerID" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16281",
       "triggerID" : "1504773488",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "7286eeebcab751b3de0ce5dc6cd9cc1cf791731e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16434",
       "triggerID" : "7286eeebcab751b3de0ce5dc6cd9cc1cf791731e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b45ec1857fc153906fa4e5e5ed532491d5644d8f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16560",
       "triggerID" : "b45ec1857fc153906fa4e5e5ed532491d5644d8f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7286eeebcab751b3de0ce5dc6cd9cc1cf791731e Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16434) 
   * b45ec1857fc153906fa4e5e5ed532491d5644d8f Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16560) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8426: [Feature] hudi console initial commit

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8426:
URL: https://github.com/apache/hudi/pull/8426#issuecomment-1502748451

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 522eacf6b91c62da70c03cc0cfd9c841604f40a0 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] wolfboys commented on pull request #8426: [Feature] hudi console initial commit

Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys commented on PR #8426:
URL: https://github.com/apache/hudi/pull/8426#issuecomment-1518669869

   cc @XuQianJin-Stars thanks for your review, updated. please review again.


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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8426: [Feature] hudi console initial commit

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8426:
URL: https://github.com/apache/hudi/pull/8426#issuecomment-1513918610

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16248",
       "triggerID" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16281",
       "triggerID" : "1504773488",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "7286eeebcab751b3de0ce5dc6cd9cc1cf791731e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16434",
       "triggerID" : "7286eeebcab751b3de0ce5dc6cd9cc1cf791731e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7286eeebcab751b3de0ce5dc6cd9cc1cf791731e Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16434) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8426: [Feature] hudi console initial commit

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8426:
URL: https://github.com/apache/hudi/pull/8426#issuecomment-1518681159

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16248",
       "triggerID" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16281",
       "triggerID" : "1504773488",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "7286eeebcab751b3de0ce5dc6cd9cc1cf791731e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16434",
       "triggerID" : "7286eeebcab751b3de0ce5dc6cd9cc1cf791731e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b45ec1857fc153906fa4e5e5ed532491d5644d8f",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "b45ec1857fc153906fa4e5e5ed532491d5644d8f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7286eeebcab751b3de0ce5dc6cd9cc1cf791731e Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16434) 
   * b45ec1857fc153906fa4e5e5ed532491d5644d8f UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8426: [Feature] hudi console initial commit

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8426:
URL: https://github.com/apache/hudi/pull/8426#issuecomment-1513322268

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16248",
       "triggerID" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16281",
       "triggerID" : "1504773488",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "7286eeebcab751b3de0ce5dc6cd9cc1cf791731e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16434",
       "triggerID" : "7286eeebcab751b3de0ce5dc6cd9cc1cf791731e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 522eacf6b91c62da70c03cc0cfd9c841604f40a0 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16248) Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16281) 
   * 7286eeebcab751b3de0ce5dc6cd9cc1cf791731e Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16434) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] XuQianJin-Stars commented on a diff in pull request #8426: [Feature] hudi console initial commit

Posted by "XuQianJin-Stars (via GitHub)" <gi...@apache.org>.
XuQianJin-Stars commented on code in PR #8426:
URL: https://github.com/apache/hudi/pull/8426#discussion_r1170762467


##########
hudi-console/hudi-console/src/main/java/org/apache/hudi/console/system/authentication/ShiroRealm.java:
##########
@@ -0,0 +1,89 @@
+/*
+ * 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.hudi.console.system.authentication;
+
+import org.apache.hudi.console.system.entity.User;
+import org.apache.hudi.console.system.service.UserService;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authc.AuthenticationException;
+import org.apache.shiro.authc.AuthenticationInfo;
+import org.apache.shiro.authc.AuthenticationToken;
+import org.apache.shiro.authc.SimpleAuthenticationInfo;
+import org.apache.shiro.authz.AuthorizationInfo;
+import org.apache.shiro.authz.SimpleAuthorizationInfo;
+import org.apache.shiro.realm.AuthorizingRealm;
+import org.apache.shiro.subject.PrincipalCollection;
+
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.Set;
+
+/** Implementation of ShiroRealm, including two modules: authentication and authorization */
+public class ShiroRealm extends AuthorizingRealm {
+
+  @Autowired private UserService userService;
+
+  @Override
+  public boolean supports(AuthenticationToken token) {
+    return token instanceof JWTToken;
+  }
+
+  /**
+   * Authorization module to get user roles and permissions
+   *
+   * @param token token
+   * @return AuthorizationInfo permission information
+   */
+  @Override
+  protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection token) {
+    Long userId = JWTUtil.getUserId(token.toString());
+
+    SimpleAuthorizationInfo simpleAuthorizationInfo = new SimpleAuthorizationInfo();
+
+    // Get user permission set
+    Set<String> permissionSet = userService.getPermissions(userId);
+    simpleAuthorizationInfo.setStringPermissions(permissionSet);
+    return simpleAuthorizationInfo;
+  }
+
+  /**
+   * User Authentication
+   *
+   * @param authenticationToken authentication token
+   * @return AuthenticationInfo authentication information
+   * @throws AuthenticationException authentication related exceptions
+   */
+  @Override
+  protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken)
+      throws AuthenticationException {
+    // The token here is passed from the executeLogin method of JWTFilter and has been decrypted
+    String token = (String) authenticationToken.getCredentials();
+    String username = JWTUtil.getUserName(token);
+    if (StringUtils.isBlank(username)) {
+      throw new AuthenticationException("Token verification failed");
+    }
+    // Query user information by username
+    User user = userService.findByName(username);
+
+    if (user == null) {
+      throw new AuthenticationException("ERROR Incorrect username or password!");
+    }
+    return new SimpleAuthenticationInfo(token, token, "streampark_shiro_realm");

Review Comment:
   hudi_shiro_realm?



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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8426: [Feature] hudi console initial commit

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8426:
URL: https://github.com/apache/hudi/pull/8426#issuecomment-1513287170

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16248",
       "triggerID" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16281",
       "triggerID" : "1504773488",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "7286eeebcab751b3de0ce5dc6cd9cc1cf791731e",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7286eeebcab751b3de0ce5dc6cd9cc1cf791731e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 522eacf6b91c62da70c03cc0cfd9c841604f40a0 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16248) Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16281) 
   * 7286eeebcab751b3de0ce5dc6cd9cc1cf791731e UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8426: [Feature] hudi console initial commit

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8426:
URL: https://github.com/apache/hudi/pull/8426#issuecomment-1504789038

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16248",
       "triggerID" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16281",
       "triggerID" : "1504773488",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 522eacf6b91c62da70c03cc0cfd9c841604f40a0 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16248) Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16281) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8426: [Feature] hudi console initial commit

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8426:
URL: https://github.com/apache/hudi/pull/8426#issuecomment-1503055725

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16248",
       "triggerID" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 522eacf6b91c62da70c03cc0cfd9c841604f40a0 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16248) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] XuQianJin-Stars commented on a diff in pull request #8426: [Feature] hudi console initial commit

Posted by "XuQianJin-Stars (via GitHub)" <gi...@apache.org>.
XuQianJin-Stars commented on code in PR #8426:
URL: https://github.com/apache/hudi/pull/8426#discussion_r1162451339


##########
hudi-console/hudi-console/src/main/assembly/script/schema/pgsql-schema.sql:
##########
@@ -0,0 +1,812 @@
+/*
+ * 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.
+ */
+
+-- ----------------------------
+-- drop table if exists
+-- ----------------------------
+
+drop table if exists "public"."t_user";
+drop table if exists "public"."t_permissions";
+drop table if exists "public"."t_setting";
+drop table if exists "public"."t_role";
+drop table if exists "public"."t_role_menu";
+drop table if exists "public"."t_menu";
+drop table if exists "public"."t_message";
+drop table if exists "public"."t_flink_tutorial";
+drop table if exists "public"."t_flink_sql";
+drop table if exists "public"."t_flink_savepoint";
+drop table if exists "public"."t_flink_project";
+drop table if exists "public"."t_flink_env";
+drop table if exists "public"."t_flink_effective";
+drop table if exists "public"."t_flink_config";
+drop table if exists "public"."t_flink_cluster";
+drop table if exists "public"."t_flink_app";
+drop table if exists "public"."t_app_build_pipe";
+drop table if exists "public"."t_app_backup";
+drop table if exists "public"."t_alert_config";
+drop table if exists "public"."t_access_token";
+drop table if exists "public"."t_flink_log";
+drop table if exists "public"."t_team";
+drop table if exists "public"."t_variable";
+drop table if exists "public"."t_external_link";
+drop table if exists "public"."t_yarn_queue";
+
+-- ----------------------------
+-- drop sequence if exists
+-- ----------------------------
+drop sequence if exists "public"."streampark_t_user_id_seq";

Review Comment:
   `streampark_t_user_id_seq` -> `hudi_t_user_id_seq`?
   
   Do the same below. `streampark` -> `hudi`



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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] XuQianJin-Stars commented on a diff in pull request #8426: [Feature] hudi console initial commit

Posted by "XuQianJin-Stars (via GitHub)" <gi...@apache.org>.
XuQianJin-Stars commented on code in PR #8426:
URL: https://github.com/apache/hudi/pull/8426#discussion_r1170762043


##########
hudi-console/hudi-console/src/main/java/org/apache/hudi/console/system/entity/User.java:
##########
@@ -0,0 +1,105 @@
+/*
+ * 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.hudi.console.system.entity;
+
+import org.apache.hudi.console.base.emuns.UserType;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import javax.validation.constraints.Email;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.Size;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@TableName("t_user")
+public class User implements Serializable {
+
+  private static final long serialVersionUID = -4852732617765810959L;
+  /** user status */
+  public static final String STATUS_VALID = "1";
+
+  public static final String STATUS_LOCK = "0";
+
+  public static final String DEFAULT_AVATAR = "default.jpg";
+
+  public static final String SEX_MALE = "0";
+
+  public static final String SEX_FEMALE = "1";
+
+  public static final String SEX_UNKNOW = "2";
+
+  public static final String DEFAULT_PASSWORD = "streampark666";

Review Comment:
   password change



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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] XuQianJin-Stars commented on a diff in pull request #8426: [Feature] hudi console initial commit

Posted by "XuQianJin-Stars (via GitHub)" <gi...@apache.org>.
XuQianJin-Stars commented on code in PR #8426:
URL: https://github.com/apache/hudi/pull/8426#discussion_r1170762669


##########
hudi-console/hudi-console/src/main/java/org/apache/hudi/console/base/util/EncryptUtils.java:
##########
@@ -0,0 +1,73 @@
+/*
+ * 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.hudi.console.base.util;
+
+import org.apache.commons.codec.digest.DigestUtils;
+
+import javax.crypto.Cipher;
+import javax.crypto.KeyGenerator;
+import javax.crypto.SecretKey;
+
+import java.nio.charset.StandardCharsets;
+import java.security.SecureRandom;
+import java.util.Base64;
+
+public class EncryptUtils {
+
+  private static final int KEY_SIZE = 128;
+
+  private static final String DEFAULT_KEY = DigestUtils.md5Hex("ApacheStreamPark");

Review Comment:
   ApacheStreamPark - > ApacheHudi ?



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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] XuQianJin-Stars commented on a diff in pull request #8426: [Feature] hudi console initial commit

Posted by "XuQianJin-Stars (via GitHub)" <gi...@apache.org>.
XuQianJin-Stars commented on code in PR #8426:
URL: https://github.com/apache/hudi/pull/8426#discussion_r1170762290


##########
hudi-console/hudi-console/src/main/java/org/apache/hudi/console/base/properties/ShiroProperties.java:
##########
@@ -0,0 +1,33 @@
+/*
+ * 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.hudi.console.base.properties;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+@Data
+@Configuration
+@ConfigurationProperties(prefix = "streampark.shiro")

Review Comment:
   hudi.shiro ?



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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8426: [Feature] hudi console initial commit

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8426:
URL: https://github.com/apache/hudi/pull/8426#issuecomment-1518718227

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16248",
       "triggerID" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16281",
       "triggerID" : "1504773488",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "7286eeebcab751b3de0ce5dc6cd9cc1cf791731e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16434",
       "triggerID" : "7286eeebcab751b3de0ce5dc6cd9cc1cf791731e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b45ec1857fc153906fa4e5e5ed532491d5644d8f",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16560",
       "triggerID" : "b45ec1857fc153906fa4e5e5ed532491d5644d8f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * b45ec1857fc153906fa4e5e5ed532491d5644d8f Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16560) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8426: [Feature] hudi console initial commit

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8426:
URL: https://github.com/apache/hudi/pull/8426#issuecomment-1505268020

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16248",
       "triggerID" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "522eacf6b91c62da70c03cc0cfd9c841604f40a0",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16281",
       "triggerID" : "1504773488",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 522eacf6b91c62da70c03cc0cfd9c841604f40a0 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16248) Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16281) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] XuQianJin-Stars merged pull request #8426: [Feature] hudi console initial commit

Posted by "XuQianJin-Stars (via GitHub)" <gi...@apache.org>.
XuQianJin-Stars merged PR #8426:
URL: https://github.com/apache/hudi/pull/8426


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

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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