日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > java >内容正文

java

Java查询spark中生成的文件,spark原代码生成方法

發(fā)布時間:2023/12/20 java 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Java查询spark中生成的文件,spark原代码生成方法 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

其實關于這個問題在Spark的官網www.igniterealtime.org上有很詳盡的介紹,因此本文大部分內容是從英文文檔引用而來的,其中還有一些個人的經驗。

Spark源代碼:下載地址

想了解更多關于"Spark"的文章,請點擊這里.

安裝JDK

這個不用說了,注意版本,最少要1.5,推薦使用

安裝Eclipse3.3

a) 從官網下載Eclipse 3.3 (對Java開發(fā)者用的)

b) 假設你把eclipse安裝在c:/program files/eclipse,進入這個文件夾,為eclipse.exe創(chuàng)造一個桌面圖標,右擊這個圖標,選擇“屬性”,打開屬性對話框,在“目標”的輸入框里,輸入如下

"C:\Program Files\Eclipse\eclipse.exe" -vm "C:\Program Files\Java\jdk1.6.0\bin\javaw"

熟悉eclipse的都知道這是為eclipse指定使用哪個Java VM。

為eclipse安裝Subversive插件

a)用上面建的圖標打開eclipse,下面開始安裝Subversive插件,由于我用的是英文版的ecplipse,

下面的菜單我都用英文。

b) 點擊Help::Software Updates::Find and Install...

c)點擊 Search for new features to install ,點Next

d)點New Remote Site... 按鈕

e)在name的輸入框里輸入 Subversive ,并且在URL輸入框里輸入http://www.polarion.org/projects/subversive/download/1.1/update-site

(最新的Subversive地址上http://www.eclipse.org/subversive查詢)

f)點擊Finish ,開始安裝Subversive,eclipse將搜索網站,并且在下一個窗口中顯示你想安裝的功能

選擇安裝Subversive SVN Team Provider Plugin 和Subversive Client Libraries下面所有的功能

g)???? 點Next,eclipse開始安裝過程,安裝結束后重啟eclipse。

利用svn方式下載spark代碼

a)點擊如下Windows::Open Perspective::Other...

b)彈出一個“Open Perspective”對話框,選擇“SVN Repository Exploring”,單擊OK

c)這是eclipse界面發(fā)生變化,在左邊的“ SVN Repositories”面板上,右擊鼠標

選擇New::Repository Location...

d)在“New Repository Location”的位置輸入

“http://svn.igniterealtime.org/svn/repos”,單擊 “Finish”

e)在SVN Repositories面板上,會發(fā)生變化,展開它,找到spark的選項,右擊

spark下面的trunk項,選擇“Check Out”,下載spark的代碼。

f)下載完成后,選擇Window::Open Perspective::Java,在Project Explorer面板上,

看到Spark項目,刪掉它,在彈出來的對話框中選擇“Do not delete contents”

在工作目錄下面找到spark文件夾,里面就是spark的源代碼。

注:也可以不要這么麻煩,我在上面提供了一個鏈接,可以直接下載Spark源代碼,上面的步驟都

可以省了.

創(chuàng)建Spark項目

1)點擊Window::Open Perspective::Java菜單

2)在Project Explorer窗口中,如果有spark這個項目,把它刪了,刪除時,會問你要不要刪除

文件,選擇不要.

3)選擇File::New::Project...,再選擇Java::Java Project,在New Java Project窗口選擇

"Create project from existiing source",然后把spark文件所在的文件夾加進去.

4)在"project name"中輸入spark,要和文件夾的名字相同.

5)點Finish.

生成Spark

1)點擊Window::Show View::Ant

2)右擊Ant面板,選擇Add Buildfiles

3)展開spark::build文件夾,選擇build.xml,點擊"OK"

4)在Ant面板,展開Spark,雙擊"release",等一段時間,會提示"Build Successful".

Create Project Builder1)點擊Run::Open Debug Dialog...,出現"Run"窗口

2)選擇"Java Application",點擊"New"按鈕.

3)在"Main"標簽頁,將New_configuration換成Spark或其它的這個無所謂.

4)點擊Project::Browse按鈕,選擇Spark,再點OK.

5)點擊Main class::Search按鈕,選擇main所在的類Startup-org.jivesoftware.launcher,

再點擊OK

6)建議勾選Stop in main.

7)點擊Classpath標簽頁,選擇User Entries ,使得Advanced..按鈕變的可用.點擊Advanced

按鈕.

8)在彈出來的Advanced Options窗口,選擇Add Folders,再點OK,在Folder Selection窗口

選擇spark::src::resources 文件夾,點擊OK

9)選擇Common標簽頁,勾選Debug,Run前面的框

10)點擊Apply,再點擊Close

Run/Debug

點擊Run::Open Run Dialog..,在彈出的對話框選擇Spark,然后點Run就行了.

英文文檔如下:

This guide assumes that you are installing everything from scratch. If you've done some parts of them, this guide may still be useful. I compile this guide to the best of my knowledge. I apologize if it doesn't work for you.

Notes:

This guide assumes that you want the latest updates of the source i.e. from the project's trunk directory. If you only want the released/stable version, checkout the desired release from under

the tags directory.

Install JDK

Download JDK and install them. The least version should be 1.5. I use 1.6. Sorry, no instruction for this.

Install Eclipse 3.3

Download Eclipse 3.3 from www.eclipse.org. I use Eclipse IDE for Java EE Developers. You should at least use Eclipse IDE for Java Developers.

Extract the downloaded zip file into C:/Program Files/Eclipse.

Open C:/Program Files/Eclipse folder.

Right click and drag eclipse.exe on to your desktop (or Windows taskbar) to create a shortcut icon.

Right click the shortcut icon and choose Properties. The Eclipse Properties window will show.

The Target textbox should read something like this "C:\Program Files\Eclipse\eclipse.exe" -vm "C:\Program Files\Java\jdk1.6.0\bin\javaw" depending on the JDK that you use and where you installed it.

Close the Eclipse Properties window.

Install Subversive Plugin

Double-click the shortcut icon to start Eclipse.

Select/enter your preferred workspace and click OK to open Eclipse main IDE window.

Click on the Workbench icon to close the welcome screen.

Click Help::Software Updates::Find and Install... menu.

Click on Search for new features to install and click Next.

Click on New Remote Site... button.

Click Finish to install Subversive. Eclipse will search for the update site and show the result in a next window where you will select the features to install. I choose everything under Subversive SVN Team Provider Plugin and Subversive Client Libraries.

Click Next to continue and so on until the installation ends. You normally want to restart Eclipse when the installation ends.

Check Out Spark SVN

Click Windows::Open Perspective::Other... menu.

Click on SVN Repository Exploring on the Open Perspective window and click OK.

Right-click on SVN Repositories screen and choose New::Repository Location...

On New Repository Location enter Finish. You'll see the URL location in the SVN Repositories screen.

Expand the URL location.

Expand the spark tree.

Right-click on trunk and choose Check Out. Make yourself some Mocha while waiting for the checkout to complete.

Create Spark Project

Click Window::Open Perspective::Java menu.

In the Project Explorer screen, if there is a spark project, delete it. This project was created during the Spark check out process. Yes you read it correctly, DELETE the project!!! Otherwise you'll have to setup your Spark development environment manually. On the Confirm Project Delete choose Do not delete contents, then click Yes.

Click File::New::Project... Notice the ellipses!!!

Select Java::Java Project and click Next.

On the New Java Project window choose Create project from existing source and browse to where spark folder is located under your workspace.

In the Project name box enter exactly as spark. Otherwise, the Next and Finish button remain disabled. Click on Next. Eclipse will read the directory structure to setup the environment automatically (almost) for you and you can see what it does on the next screen. Then click on Finish.

If the Open Associated Perspective windows opens, click Yes.

Build Spark

Click Window::Show View::Ant menu.

Right-click the Ant screen and choose Add Buildfiles...

Expand the spark::build folder and select build.xml, then click OK.

On the Ant screen, expand the Spark and double-click on release ant task. The build may fail because you're checking out the daily updates of Spark sources, which may contain bugs. If so, wait for another day and hope that the developers discover and fix the bug; or you might dare to fix it yourself. During this first time setup, a successful build is necessary before you can proceed with the remaining tasks below.

Create Project Builder

Click Run::Open Run Dialog... or Run::Open Debug Dialog... menu. A Run window shows.

Select Java Application and click on the New button.

On the Main tab of the Run window, change the New_configuration name to Spark or anything you like.

Click on Project::Browse button and select spark and click OK.

Click on Main class::Search button and select Startup - org.jivesoftware.launcher and click OK.

I'd suggest that you select Stop in main check box so that you could later verify that debugging works.

Click on Classpath tab.

Select User Entries so that the Advanced... button will be enabled.

Click on the Advanced... button.

On the Advanced Options window select Add Folders and click OK.

On the Folder Selection window select spark::src::resources folder and click OK.

Click on Common tab.

Select the Debug and Run check box.

Click on Apply button.

Click on Close button.

Run/Debug

The setting is now complete for Spark.

You may test running and debugging by clicking on Run::Run History::Spark and Run::Debug History::Spark respectively. If you choose the later and if you follow this instruction closely, execution will stop in the main method of Startup.java

創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎勵來咯,堅持創(chuàng)作打卡瓜分現金大獎

總結

以上是生活随笔為你收集整理的Java查询spark中生成的文件,spark原代码生成方法的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。