chncaesar opened a new pull request, #57:
URL: https://github.com/apache/doris-spark-connector/pull/57

   # Proposed changes
   1. Support Spark 3.3.0
   Removed  log4j 1.x, and uses Spark's Logging trait, which uses log4j 2.x in 
Sprak 3.3.0. For older Spark versions , this change does not break the 
compability.  Code changes are in `ScalaValueReader.scala`
   
   2. Close BufferedReader in DorisStreamLoad
   When reading Doris BE rest api's response, BufferedReader should be closed 
in `DorisStreamLoad` , function: `loadBatch`
   
   3. Change spark.minor.version to spark.major.version
   In pom.xml, the property `spark.minor.version` is actually spark major 
version. 
   
   5. source jar to include scala code
   changes in pom.xml scala-maven-plugin
   
   Issue Number: close #xxx
   
   ## Problem Summary:
   This pr upgrades the code to support Spark 3.3.0, as well as other minor 
changes.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (Yes/No/I Don't know)
   No
   3. Has unit tests been added: (Yes/No/No Need)
   No unit test is added, but tested manually. in spark-sql CLI.
   
   5. Has document been added or modified: (Yes/No/No Need)
   6. Does it need to update dependencies: (Yes/No)
   7. Are there any changes that cannot be rolled back: (Yes/No)
   
   ## Further comments
   If this is a relatively large or complex change, kick off the discussion at 
[[email protected]](mailto:[email protected]) by explaining why you 
chose the solution you did and what alternatives you considered, etc...
   
   ## Test results:
   Versions: 
   - spark-3.3.0-bin-hadoop3
   - JDK 1.8
   
   1.  truncate Doris table from CLI
   
![image](https://user-images.githubusercontent.com/12869649/207050768-df732160-33d3-4395-87ef-e3141d6bc663.png)
   
   2. Create spark view and insert data into Doris table
   Start `spark-sql` CLI in local mode and execute: 
   ```
   CREATE TEMPORARY VIEW spark_doris
   USING doris
   OPTIONS(
     "table.identifier"="zjc_1.table_hash",
     "fenodes"="localhost:8030",
     "user"="zjc",
     "password"="******"
   );
   insert into spark_doris select 5,15.0;
   ```
   4. Check data in Doris
   
![image](https://user-images.githubusercontent.com/12869649/207051363-c77e59c5-fa5b-4527-b94b-9829913b48ae.png)
   
   6. Select data in spark-sql
   `select * from spark_doris;`
   
![image](https://user-images.githubusercontent.com/12869649/207051565-582853ab-b8bf-4b8e-8ad5-dff17d7277aa.png)
   
   ## How to build spark-doris-connector for  Spark 3.3.0
   Run  the command:
   `sh build.sh --spark 3.3.0 --scala 2.12`
   
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to