diff --git a/.metadata/.bak_0.log b/.metadata/.bak_0.log deleted file mode 100644 index 32c75ce..0000000 --- a/.metadata/.bak_0.log +++ /dev/null @@ -1,12431 +0,0 @@ -!SESSION 2017-03-21 20:36:59.126 ----------------------------------------------- -eclipse.buildId=4.6.2.M20161124-1400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-03-21 20:37:57.050 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-03-22 19:42:10.566 ----------------------------------------------- -eclipse.buildId=4.6.2.M20161124-1400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-03-22 19:43:05.670 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-03-22 20:24:11.451 ----------------------------------------------- -eclipse.buildId=4.6.2.M20161124-1400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-03-22 20:25:27.553 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-03-24 02:26:49.142 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-03-24 02:28:34.087 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.e4.ui.workbench 2 0 2017-03-24 02:28:35.379 -!MESSAGE Removing part descriptor with the 'org.eclipse.wb.core.StructureView' id and the 'Structure' description. Points to the invalid 'bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView' class. - -!ENTRY org.eclipse.e4.ui.workbench 2 0 2017-03-24 02:28:35.380 -!MESSAGE Removing part descriptor with the 'org.eclipse.wb.core.PaletteView' id and the 'Palette' description. Points to the invalid 'bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView' class. - -!ENTRY org.eclipse.equinox.p2.transport.ecf 2 0 2017-03-24 02:50:40.841 -!MESSAGE Connection to http://mirror.ufs.ac.za/eclipse/releases/neon/201612211000/features/org.eclipse.wb.core.java.feature_1.9.0.jar failed on Connection timed out: connect. Retry attempt 0 started -!STACK 0 -java.net.ConnectException: Connection timed out: connect - at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) - at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) - at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) - at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) - at java.net.AbstractPlainSocketImpl.connect(Unknown Source) - at java.net.PlainSocketImpl.connect(Unknown Source) - at java.net.SocksSocketImpl.connect(Unknown Source) - at java.net.Socket.connect(Unknown Source) - at org.eclipse.ecf.internal.provider.filetransfer.httpclient4.ECFHttpClientProtocolSocketFactory.connectSocket(ECFHttpClientProtocolSocketFactory.java:86) - at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177) - at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144) - at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:131) - at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611) - at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446) - at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863) - at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) - at org.eclipse.ecf.provider.filetransfer.httpclient4.HttpClientRetrieveFileTransfer.performConnect(HttpClientRetrieveFileTransfer.java:1084) - at org.eclipse.ecf.provider.filetransfer.httpclient4.HttpClientRetrieveFileTransfer.access$0(HttpClientRetrieveFileTransfer.java:1075) - at org.eclipse.ecf.provider.filetransfer.httpclient4.HttpClientRetrieveFileTransfer$1.performFileTransfer(HttpClientRetrieveFileTransfer.java:1071) - at org.eclipse.ecf.filetransfer.FileTransferJob.run(FileTransferJob.java:74) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) -!SESSION 2017-03-24 03:12:38.610 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -data file:/D:/jinyu/udt-java/ -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-03-24 08:01:57.906 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-03-24 08:05:50.970 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -data file:/D:/jinyu/udt-java/ -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-03-24 08:06:24.151 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-03-26 01:18:44.784 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-03-26 01:19:15.899 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-03-26 11:08:10.027 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-03-26 11:09:44.150 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-04-02 01:59:50.264 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-02 02:00:08.715 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.epp.logging.aeri.ide 2 17 2017-04-02 02:00:13.612 -!MESSAGE Server ‘org.eclipse.epp.logging.aeri.ide.server’ failed with exception: Connect to dev.eclipse.org:443 [dev.eclipse.org/198.41.30.200] failed: Read timed out. ; version: 2.0.4.v20170307-1435 -!STACK 0 -org.apache.http.conn.ConnectTimeoutException: Connect to dev.eclipse.org:443 [dev.eclipse.org/198.41.30.200] failed: Read timed out - at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:134) - at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:319) - at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363) - at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219) - at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195) - at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86) - at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108) - at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) - at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) - at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57) - at org.apache.http.client.fluent.Executor.execute(Executor.java:206) - at org.eclipse.epp.internal.logging.aeri.ide.server.mars.IO.request(IO.java:206) - at org.eclipse.epp.internal.logging.aeri.ide.server.mars.IO.refreshConfiguration(IO.java:68) - at org.eclipse.epp.internal.logging.aeri.ide.server.mars.ServerConnection.startUp(ServerConnection.java:124) - at com.google.common.util.concurrent.AbstractIdleService$2$1.run(AbstractIdleService.java:54) - at com.google.common.util.concurrent.Callables$3.run(Callables.java:93) - at java.lang.Thread.run(Thread.java:745) -Caused by: java.net.SocketTimeoutException: Read timed out - at java.net.SocketInputStream.socketRead0(Native Method) - at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) - at java.net.SocketInputStream.read(SocketInputStream.java:171) - at java.net.SocketInputStream.read(SocketInputStream.java:141) - at sun.security.ssl.InputRecord.readFully(InputRecord.java:465) - at sun.security.ssl.InputRecord.read(InputRecord.java:503) - at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973) - at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) - at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) - at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) - at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:290) - at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:259) - at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:125) - ... 16 more - -!ENTRY org.eclipse.equinox.event 4 0 2017-04-02 03:51:07.175 -!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/widget/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@18ad543b (elementId: org.eclipse.e4.ui.compatibility.editor, tags: [Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer@56ed9270, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor, object: org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor@7aadd290, context: PartImpl (org.eclipse.e4.ui.compatibility.editor) Context, variables: [], label: UDTServerSocket.java, iconURI: platform:/plugin/org.eclipse.jdt.ui/icons/full/obj16/jcu_obj.png, tooltip: null, dirty: false, closeable: true, description: null), Widget=null, org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@18ad543b (elementId: org.eclipse.e4.ui.compatibility.editor, tags: [Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer@56ed9270, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor, object: org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor@7aadd290, context: PartImpl (org.eclipse.e4.ui.compatibility.editor) Context, variables: [], label: UDTServerSocket.java, iconURI: platform:/plugin/org.eclipse.jdt.ui/icons/full/obj16/jcu_obj.png, tooltip: null, dirty: false, closeable: true, description: null), AttName=widget, EventType=SET, OldValue=ContributedPartRenderer$2 {}, Widget=null}, AttName=widget, EventType=SET, OldValue=ContributedPartRenderer$2 {}} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@4ab909f4 -!STACK 0 -java.lang.NullPointerException - at org.eclipse.ui.internal.NavigationHistory.getDisplay(NavigationHistory.java:176) - at org.eclipse.ui.internal.NavigationHistory.markEditor(NavigationHistory.java:193) - at org.eclipse.ui.internal.WorkbenchPage.updateActiveEditorSources(WorkbenchPage.java:411) - at org.eclipse.ui.internal.WorkbenchPage.firePartClosed(WorkbenchPage.java:5164) - at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart$1.handleEvent(CompatibilityPart.java:102) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:151) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer$1.widgetDisposed(SWTPartRenderer.java:139) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Widget.release(Widget.java:836) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) - at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:171) - at org.eclipse.swt.widgets.Decorations.releaseChildren(Decorations.java:807) - at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:1368) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:459) - at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) - at org.eclipse.swt.widgets.Display.release(Display.java:3875) - at org.eclipse.swt.graphics.Device.dispose(Device.java:298) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3358) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4897) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3144) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3819) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.jface.dialogs.MessageDialogWithToggle.open(MessageDialogWithToggle.java:115) - at org.eclipse.jface.dialogs.MessageDialogWithToggle.openOkCancelConfirm(MessageDialogWithToggle.java:210) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:213) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:165) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4410) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3371) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4897) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3144) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3819) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -!SESSION 2017-04-02 14:35:06.822 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-02 14:35:48.921 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.e4.ui.workbench 4 0 2017-04-02 18:56:14.941 -!MESSAGE Error disposing widget for : org.eclipse.e4.ui.model.application.ui.menu.impl.MenuImpl null -!STACK 0 -org.eclipse.swt.SWTException: Graphic is disposed - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.SWT.error(SWT.java:4419) - at org.eclipse.swt.graphics.Font.getFontData(Font.java:192) - at org.eclipse.swt.custom.CTabFolderRenderer.drawChevron(CTabFolderRenderer.java:909) - at org.eclipse.swt.custom.CTabFolderRenderer.draw(CTabFolderRenderer.java:605) - at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.draw(CTabRendering.java:252) - at org.eclipse.swt.custom.CTabFolder.createButtonImage(CTabFolder.java:721) - at org.eclipse.swt.custom.CTabFolder.setButtonBounds(CTabFolder.java:2541) - at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3766) - at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3697) - at org.eclipse.swt.custom.CTabFolder.onResize(CTabFolder.java:2090) - at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:340) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.sendResize(Control.java:3042) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1058) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1108) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3292) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3288) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:301) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:246) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:163) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1062) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1108) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3211) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3259) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1102) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3292) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3288) - at org.eclipse.swt.custom.StackLayout.layout(StackLayout.java:123) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3259) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1102) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3292) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3288) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:301) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:246) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:163) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3259) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1102) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3211) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) - at org.eclipse.swt.internal.win32.OS.EndDeferWindowPos(Native Method) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:1030) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:996) - at org.eclipse.swt.widgets.Composite.setResizeChildren(Composite.java:1210) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1801) - at org.eclipse.swt.widgets.Canvas.WM_SIZE(Canvas.java:492) - at org.eclipse.swt.widgets.Decorations.WM_SIZE(Decorations.java:1849) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) - at org.eclipse.swt.widgets.Canvas.WM_WINDOWPOSCHANGED(Canvas.java:499) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.SetMenu(Native Method) - at org.eclipse.swt.widgets.Decorations.setMenuBar(Decorations.java:1187) - at org.eclipse.swt.widgets.Menu.releaseParent(Menu.java:1206) - at org.eclipse.swt.widgets.Widget.release(Widget.java:844) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.disposeWidget(SWTPartRenderer.java:176) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeRemoveGui(PartRenderingEngine.java:918) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$1(PartRenderingEngine.java:846) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$3.run(PartRenderingEngine.java:841) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:825) - at org.eclipse.ui.internal.WorkbenchWindow$1.handleEvent(WorkbenchWindow.java:322) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:151) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer$1.widgetDisposed(SWTPartRenderer.java:139) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Widget.release(Widget.java:836) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:459) - at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) - at org.eclipse.swt.widgets.Display.release(Display.java:3875) - at org.eclipse.swt.graphics.Device.dispose(Device.java:298) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3358) - at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2446) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:483) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2197) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3144) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3819) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.jface.dialogs.MessageDialogWithToggle.open(MessageDialogWithToggle.java:115) - at org.eclipse.jface.dialogs.MessageDialogWithToggle.openOkCancelConfirm(MessageDialogWithToggle.java:210) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:213) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:165) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4410) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3371) - at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2446) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:483) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2197) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3144) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3819) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -!SESSION 2017-04-02 23:54:19.701 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-02 23:59:27.171 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.osgi 2 0 2017-04-02 23:59:37.584 -!MESSAGE While loading class "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber", thread "Thread[Worker-5,5,main]" timed out waiting (5007ms) for thread "Thread[Compiler Source File Reader,5,main]" to finish starting bundle "org.eclipse.wb.core_1.9.0.201608250402 [1137]". To avoid deadlock, thread "Thread[Worker-5,5,main]" is proceeding but "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber" may not be fully initialized. -!STACK 0 -org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="1.9.0.201608250402"; osgi.identity="org.eclipse.wb.core"; singleton:="true" [id=1137] STARTED [STARTED] - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) - at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) - at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) - at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) - at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) - at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) - at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) - at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) - at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) - at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) - at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) - at org.eclipse.core.internal.resources.File.getCharset(File.java:198) - at org.eclipse.core.internal.resources.File.getCharset(File.java:186) - at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) - at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) - at org.eclipse.jdt.internal.compiler.ReadManager.getContents(ReadManager.java:145) - at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:11374) - at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:11346) - at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:9760) - at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:815) - at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:385) - at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:431) - at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:417) - at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:368) - at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:179) - at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:305) - at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:61) - at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:256) - at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:175) - at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) - at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) - at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) - at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) - at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304) - at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360) - at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383) - at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144) - at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) -Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - ... 57 more -Root exception: -java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) - at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) - at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) - at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) - at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) - at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) - at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) - at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) - at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) - at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) - at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) - at org.eclipse.core.internal.resources.File.getCharset(File.java:198) - at org.eclipse.core.internal.resources.File.getCharset(File.java:186) - at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) - at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) - at org.eclipse.jdt.internal.compiler.ReadManager.getContents(ReadManager.java:145) - at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:11374) - at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:11346) - at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:9760) - at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:815) - at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:385) - at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:431) - at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:417) - at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:368) - at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:179) - at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:305) - at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:61) - at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:256) - at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:175) - at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) - at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) - at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) - at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) - at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304) - at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360) - at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383) - at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144) - at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) - -!ENTRY org.eclipse.osgi 2 0 2017-04-02 23:59:38.158 -!MESSAGE While loading class "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber", thread "Thread[Compiler Source File Reader,5,main]" timed out waiting (5007ms) for thread "Thread[Compiler Source File Reader,5,main]" to finish starting bundle "org.eclipse.wb.core_1.9.0.201608250402 [1137]". To avoid deadlock, thread "Thread[Compiler Source File Reader,5,main]" is proceeding but "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber" may not be fully initialized. -!STACK 0 -org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="1.9.0.201608250402"; osgi.identity="org.eclipse.wb.core"; singleton:="true" [id=1137] STARTED [STARTED] - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) - at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) - at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) - at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) - at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) - at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) - at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) - at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) - at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) - at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) - at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) - at org.eclipse.core.internal.resources.File.getCharset(File.java:198) - at org.eclipse.core.internal.resources.File.getCharset(File.java:186) - at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) - at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) - at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) - at java.lang.Thread.run(Thread.java:745) -Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - ... 33 more -Root exception: -java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) - at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) - at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) - at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) - at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) - at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) - at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) - at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) - at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) - at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) - at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) - at org.eclipse.core.internal.resources.File.getCharset(File.java:198) - at org.eclipse.core.internal.resources.File.getCharset(File.java:186) - at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) - at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) - at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) - at java.lang.Thread.run(Thread.java:745) - -!ENTRY org.eclipse.osgi 2 0 2017-04-02 23:59:38.159 -!MESSAGE While loading class "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber", thread "Thread[Compiler Source File Reader,5,main]" timed out waiting (5007ms) for thread "Thread[Compiler Source File Reader,5,main]" to finish starting bundle "org.eclipse.wb.core_1.9.0.201608250402 [1137]". To avoid deadlock, thread "Thread[Compiler Source File Reader,5,main]" is proceeding but "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber" may not be fully initialized. -!STACK 0 -org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="1.9.0.201608250402"; osgi.identity="org.eclipse.wb.core"; singleton:="true" [id=1137] STARTED [STARTED] - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) - at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) - at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) - at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) - at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) - at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) - at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) - at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) - at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) - at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) - at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) - at org.eclipse.core.internal.resources.File.getCharset(File.java:198) - at org.eclipse.core.internal.resources.File.getCharset(File.java:186) - at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) - at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) - at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) - at java.lang.Thread.run(Thread.java:745) -Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - ... 33 more -Root exception: -java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) - at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) - at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) - at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) - at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) - at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) - at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) - at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) - at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) - at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) - at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) - at org.eclipse.core.internal.resources.File.getCharset(File.java:198) - at org.eclipse.core.internal.resources.File.getCharset(File.java:186) - at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) - at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) - at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) - at java.lang.Thread.run(Thread.java:745) - -!ENTRY org.eclipse.osgi 2 0 2017-04-02 23:59:38.160 -!MESSAGE While loading class "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber", thread "Thread[Compiler Source File Reader,5,main]" timed out waiting (5007ms) for thread "Thread[Compiler Source File Reader,5,main]" to finish starting bundle "org.eclipse.wb.core_1.9.0.201608250402 [1137]". To avoid deadlock, thread "Thread[Compiler Source File Reader,5,main]" is proceeding but "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber" may not be fully initialized. -!STACK 0 -org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="1.9.0.201608250402"; osgi.identity="org.eclipse.wb.core"; singleton:="true" [id=1137] STARTED [STARTED] - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) - at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) - at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) - at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) - at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) - at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) - at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) - at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) - at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) - at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) - at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) - at org.eclipse.core.internal.resources.File.getCharset(File.java:198) - at org.eclipse.core.internal.resources.File.getCharset(File.java:186) - at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) - at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) - at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) - at java.lang.Thread.run(Thread.java:745) -Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - ... 33 more -Root exception: -java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) - at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) - at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) - at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) - at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) - at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) - at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) - at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) - at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) - at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) - at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) - at org.eclipse.core.internal.resources.File.getCharset(File.java:198) - at org.eclipse.core.internal.resources.File.getCharset(File.java:186) - at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) - at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) - at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) - at java.lang.Thread.run(Thread.java:745) - -!ENTRY org.eclipse.osgi 2 0 2017-04-02 23:59:38.161 -!MESSAGE While loading class "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber", thread "Thread[Compiler Source File Reader,5,main]" timed out waiting (5007ms) for thread "Thread[Compiler Source File Reader,5,main]" to finish starting bundle "org.eclipse.wb.core_1.9.0.201608250402 [1137]". To avoid deadlock, thread "Thread[Compiler Source File Reader,5,main]" is proceeding but "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber" may not be fully initialized. -!STACK 0 -org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="1.9.0.201608250402"; osgi.identity="org.eclipse.wb.core"; singleton:="true" [id=1137] STARTED [STARTED] - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) - at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) - at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) - at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) - at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) - at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) - at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) - at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) - at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) - at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) - at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) - at org.eclipse.core.internal.resources.File.getCharset(File.java:198) - at org.eclipse.core.internal.resources.File.getCharset(File.java:186) - at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) - at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) - at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) - at java.lang.Thread.run(Thread.java:745) -Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - ... 33 more -Root exception: -java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) - at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) - at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) - at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) - at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) - at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) - at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) - at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) - at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) - at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) - at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) - at org.eclipse.core.internal.resources.File.getCharset(File.java:198) - at org.eclipse.core.internal.resources.File.getCharset(File.java:186) - at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) - at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) - at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) - at java.lang.Thread.run(Thread.java:745) - -!ENTRY org.eclipse.osgi 2 0 2017-04-02 23:59:38.162 -!MESSAGE While loading class "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber", thread "Thread[Compiler Source File Reader,5,main]" timed out waiting (5007ms) for thread "Thread[Compiler Source File Reader,5,main]" to finish starting bundle "org.eclipse.wb.core_1.9.0.201608250402 [1137]". To avoid deadlock, thread "Thread[Compiler Source File Reader,5,main]" is proceeding but "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber" may not be fully initialized. -!STACK 0 -org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="1.9.0.201608250402"; osgi.identity="org.eclipse.wb.core"; singleton:="true" [id=1137] STARTED [STARTED] - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) - at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) - at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) - at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) - at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) - at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) - at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) - at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) - at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) - at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) - at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) - at org.eclipse.core.internal.resources.File.getCharset(File.java:198) - at org.eclipse.core.internal.resources.File.getCharset(File.java:186) - at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) - at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) - at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) - at java.lang.Thread.run(Thread.java:745) -Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - ... 33 more -Root exception: -java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) - at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) - at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) - at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) - at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) - at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) - at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) - at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) - at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) - at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) - at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) - at org.eclipse.core.internal.resources.File.getCharset(File.java:198) - at org.eclipse.core.internal.resources.File.getCharset(File.java:186) - at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) - at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) - at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) - at java.lang.Thread.run(Thread.java:745) - -!ENTRY org.eclipse.osgi 2 0 2017-04-02 23:59:38.163 -!MESSAGE While loading class "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber", thread "Thread[Compiler Source File Reader,5,main]" timed out waiting (5007ms) for thread "Thread[Compiler Source File Reader,5,main]" to finish starting bundle "org.eclipse.wb.core_1.9.0.201608250402 [1137]". To avoid deadlock, thread "Thread[Compiler Source File Reader,5,main]" is proceeding but "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber" may not be fully initialized. -!STACK 0 -org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="1.9.0.201608250402"; osgi.identity="org.eclipse.wb.core"; singleton:="true" [id=1137] STARTED [STARTED] - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) - at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) - at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) - at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) - at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) - at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) - at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) - at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) - at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) - at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) - at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) - at org.eclipse.core.internal.resources.File.getCharset(File.java:198) - at org.eclipse.core.internal.resources.File.getCharset(File.java:186) - at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) - at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) - at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) - at java.lang.Thread.run(Thread.java:745) -Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - ... 33 more -Root exception: -java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) - at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) - at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) - at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) - at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) - at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) - at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) - at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) - at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) - at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) - at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) - at org.eclipse.core.internal.resources.File.getCharset(File.java:198) - at org.eclipse.core.internal.resources.File.getCharset(File.java:186) - at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) - at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) - at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) - at java.lang.Thread.run(Thread.java:745) - -!ENTRY org.eclipse.osgi 2 0 2017-04-02 23:59:38.163 -!MESSAGE While loading class "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber", thread "Thread[Compiler Source File Reader,5,main]" timed out waiting (5007ms) for thread "Thread[Compiler Source File Reader,5,main]" to finish starting bundle "org.eclipse.wb.core_1.9.0.201608250402 [1137]". To avoid deadlock, thread "Thread[Compiler Source File Reader,5,main]" is proceeding but "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber" may not be fully initialized. -!STACK 0 -org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="1.9.0.201608250402"; osgi.identity="org.eclipse.wb.core"; singleton:="true" [id=1137] STARTED [STARTED] - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) - at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) - at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) - at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) - at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) - at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) - at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) - at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) - at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) - at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) - at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) - at org.eclipse.core.internal.resources.File.getCharset(File.java:198) - at org.eclipse.core.internal.resources.File.getCharset(File.java:186) - at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) - at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) - at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) - at java.lang.Thread.run(Thread.java:745) -Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - ... 33 more -Root exception: -java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) - at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) - at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) - at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) - at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) - at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) - at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) - at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) - at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) - at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) - at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) - at org.eclipse.core.internal.resources.File.getCharset(File.java:198) - at org.eclipse.core.internal.resources.File.getCharset(File.java:186) - at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) - at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) - at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) - at java.lang.Thread.run(Thread.java:745) - -!ENTRY org.eclipse.osgi 2 0 2017-04-02 23:59:38.164 -!MESSAGE While loading class "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber", thread "Thread[Compiler Source File Reader,5,main]" timed out waiting (5007ms) for thread "Thread[Compiler Source File Reader,5,main]" to finish starting bundle "org.eclipse.wb.core_1.9.0.201608250402 [1137]". To avoid deadlock, thread "Thread[Compiler Source File Reader,5,main]" is proceeding but "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber" may not be fully initialized. -!STACK 0 -org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="1.9.0.201608250402"; osgi.identity="org.eclipse.wb.core"; singleton:="true" [id=1137] STARTED [STARTED] - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) - at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) - at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) - at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) - at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) - at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) - at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) - at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) - at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) - at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) - at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) - at org.eclipse.core.internal.resources.File.getCharset(File.java:198) - at org.eclipse.core.internal.resources.File.getCharset(File.java:186) - at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) - at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) - at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) - at java.lang.Thread.run(Thread.java:745) -Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - ... 33 more -Root exception: -java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) - at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) - at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) - at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) - at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) - at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) - at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) - at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) - at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) - at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) - at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) - at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) - at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) - at org.eclipse.core.internal.resources.File.getCharset(File.java:198) - at org.eclipse.core.internal.resources.File.getCharset(File.java:186) - at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) - at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) - at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) - at java.lang.Thread.run(Thread.java:745) - -!ENTRY org.eclipse.equinox.event 4 0 2017-04-03 00:13:28.827 -!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@5e4b9f22 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@5e4b9f22 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@1cd9c2de -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(FileInputStream.java:195) - at java.io.FileInputStream.(FileInputStream.java:138) - at java.io.FileInputStream.(FileInputStream.java:93) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 75 more - -!ENTRY org.eclipse.equinox.event 4 0 2017-04-03 00:13:47.986 -!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@1e695be6 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@1e695be6 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@1cd9c2de -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(FileInputStream.java:195) - at java.io.FileInputStream.(FileInputStream.java:138) - at java.io.FileInputStream.(FileInputStream.java:93) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 75 more - -!ENTRY org.eclipse.jface.text 2 0 2017-04-03 00:14:05.541 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-04-03 00:14:05.542 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.jface.text 2 0 2017-04-03 00:14:06.351 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-04-03 00:14:06.352 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.equinox.event 4 0 2017-04-03 00:14:28.440 -!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@71bcc154 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@71bcc154 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@1cd9c2de -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(FileInputStream.java:195) - at java.io.FileInputStream.(FileInputStream.java:138) - at java.io.FileInputStream.(FileInputStream.java:93) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 75 more - -!ENTRY org.eclipse.equinox.event 4 0 2017-04-03 00:14:41.129 -!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@4260f222 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@4260f222 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@1cd9c2de -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(FileInputStream.java:195) - at java.io.FileInputStream.(FileInputStream.java:138) - at java.io.FileInputStream.(FileInputStream.java:93) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 75 more -!SESSION 2017-04-03 13:15:47.065 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.osgi 2 0 2017-04-03 13:20:48.672 -!MESSAGE While loading class "org.eclipse.egit.ui.internal.ConfigurationChecker$1$1", thread "Thread[Worker-0,5,main]" timed out waiting (5010ms) for thread "Thread[main,6,main]" to finish starting bundle "org.eclipse.egit.ui_4.6.1.201703071140-r [1025]". To avoid deadlock, thread "Thread[Worker-0,5,main]" is proceeding but "org.eclipse.egit.ui.internal.ConfigurationChecker$1$1" may not be fully initialized. -!STACK 0 -org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="4.6.1.201703071140-r"; osgi.identity="org.eclipse.egit.ui"; singleton:="true" [id=1025] STARTED [STARTED] - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:423) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.egit.ui.internal.ConfigurationChecker$1.run(ConfigurationChecker.java:45) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) -Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - ... 13 more -Root exception: -java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. - at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) - at org.eclipse.osgi.container.Module.start(Module.java:401) - at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) - at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) - at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) - at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) - at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:423) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) - at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) - at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) - at java.lang.ClassLoader.loadClass(ClassLoader.java:357) - at org.eclipse.egit.ui.internal.ConfigurationChecker$1.run(ConfigurationChecker.java:45) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-03 13:23:48.986 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-04-03 14:07:53.429 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-03 14:11:19.044 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-04-03 16:52:58.264 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-03 16:53:09.914 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-04-03 18:13:48.775 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-03 18:14:00.127 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-04-03 21:03:59.376 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-03 21:04:18.275 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-04-03 21:49:22.479 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-03 21:49:42.879 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-04-03 23:52:06.346 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-03 23:52:20.464 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-04-04 01:10:35.356 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-04 01:10:50.441 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.jface.text 2 0 2017-04-04 01:25:16.037 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-04-04 01:25:16.055 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.e4.ui.workbench 4 0 2017-04-04 04:25:44.802 -!MESSAGE Error disposing widget for : org.eclipse.e4.ui.model.application.ui.menu.impl.MenuImpl null -!STACK 0 -java.lang.IllegalArgumentException: Argument not valid - at org.eclipse.swt.SWT.error(SWT.java:4514) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.SWT.error(SWT.java:4419) - at org.eclipse.swt.graphics.GC.setFont(GC.java:4617) - at org.eclipse.swt.custom.CTabFolderRenderer.computeSize(CTabFolderRenderer.java:340) - at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.computeSize(CTabRendering.java:200) - at org.eclipse.swt.custom.CTabFolder.setItemSize(CTabFolder.java:2819) - at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3764) - at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3697) - at org.eclipse.swt.custom.CTabFolder.onResize(CTabFolder.java:2090) - at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:340) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.sendResize(Control.java:3042) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1058) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1108) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3292) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3288) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:301) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:246) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:163) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1062) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1108) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3211) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3259) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1102) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3292) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3288) - at org.eclipse.swt.custom.StackLayout.layout(StackLayout.java:123) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3259) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1102) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3292) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3288) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:301) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:246) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:163) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3259) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1102) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3211) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) - at org.eclipse.swt.internal.win32.OS.EndDeferWindowPos(Native Method) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:1030) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:996) - at org.eclipse.swt.widgets.Composite.setResizeChildren(Composite.java:1210) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1801) - at org.eclipse.swt.widgets.Canvas.WM_SIZE(Canvas.java:492) - at org.eclipse.swt.widgets.Decorations.WM_SIZE(Decorations.java:1849) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) - at org.eclipse.swt.widgets.Canvas.WM_WINDOWPOSCHANGED(Canvas.java:499) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.SetMenu(Native Method) - at org.eclipse.swt.widgets.Decorations.setMenuBar(Decorations.java:1187) - at org.eclipse.swt.widgets.Menu.releaseParent(Menu.java:1206) - at org.eclipse.swt.widgets.Widget.release(Widget.java:844) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.disposeWidget(SWTPartRenderer.java:176) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeRemoveGui(PartRenderingEngine.java:918) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$1(PartRenderingEngine.java:846) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$3.run(PartRenderingEngine.java:841) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:825) - at org.eclipse.ui.internal.WorkbenchWindow$1.handleEvent(WorkbenchWindow.java:322) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:151) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer$1.widgetDisposed(SWTPartRenderer.java:139) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Widget.release(Widget.java:836) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:459) - at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) - at org.eclipse.swt.widgets.Display.release(Display.java:3875) - at org.eclipse.swt.graphics.Device.dispose(Device.java:298) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3358) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4897) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) - at org.eclipse.swt.internal.win32.OS.VtblCall(Native Method) - at org.eclipse.swt.widgets.TaskItem.setOverlayImage(TaskItem.java:296) - at org.eclipse.ui.internal.progress.TaskBarProgressManager.updateImage(TaskBarProgressManager.java:159) - at org.eclipse.ui.internal.progress.TaskBarProgressManager.access$4(TaskBarProgressManager.java:153) - at org.eclipse.ui.internal.progress.TaskBarProgressManager$2.runInUIThread(TaskBarProgressManager.java:117) - at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:97) - at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) - at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182) - at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.jface.dialogs.MessageDialogWithToggle.open(MessageDialogWithToggle.java:115) - at org.eclipse.jface.dialogs.MessageDialogWithToggle.openOkCancelConfirm(MessageDialogWithToggle.java:210) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:213) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:165) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4410) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3371) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4897) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3144) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3819) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) - -!ENTRY org.eclipse.equinox.event 4 0 2017-04-04 04:25:44.955 -!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/widget/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@1eb906f3 (elementId: org.eclipse.e4.ui.compatibility.editor, tags: [Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer@2be89ba5, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor, object: org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor@33ef701e, context: PartImpl (org.eclipse.e4.ui.compatibility.editor) Context, variables: [], label: ClientSession.java, iconURI: platform:/plugin/org.eclipse.jdt.ui/icons/full/obj16/jcu_obj.png, tooltip: null, dirty: false, closeable: true, description: null), Widget=null, org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@1eb906f3 (elementId: org.eclipse.e4.ui.compatibility.editor, tags: [Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer@2be89ba5, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor, object: org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor@33ef701e, context: PartImpl (org.eclipse.e4.ui.compatibility.editor) Context, variables: [], label: ClientSession.java, iconURI: platform:/plugin/org.eclipse.jdt.ui/icons/full/obj16/jcu_obj.png, tooltip: null, dirty: false, closeable: true, description: null), AttName=widget, EventType=SET, OldValue=ContributedPartRenderer$2 {}, Widget=null}, AttName=widget, EventType=SET, OldValue=ContributedPartRenderer$2 {}} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@1ea3309a -!STACK 0 -java.lang.NullPointerException - at org.eclipse.ui.internal.NavigationHistory.getDisplay(NavigationHistory.java:176) - at org.eclipse.ui.internal.NavigationHistory.markEditor(NavigationHistory.java:193) - at org.eclipse.ui.internal.WorkbenchPage.updateActiveEditorSources(WorkbenchPage.java:411) - at org.eclipse.ui.internal.WorkbenchPage.firePartClosed(WorkbenchPage.java:5164) - at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart$1.handleEvent(CompatibilityPart.java:102) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:151) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer$1.widgetDisposed(SWTPartRenderer.java:139) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Widget.release(Widget.java:836) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) - at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:171) - at org.eclipse.swt.widgets.Decorations.releaseChildren(Decorations.java:807) - at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:1368) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:459) - at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) - at org.eclipse.swt.widgets.Display.release(Display.java:3875) - at org.eclipse.swt.graphics.Device.dispose(Device.java:298) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3358) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4897) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) - at org.eclipse.swt.internal.win32.OS.VtblCall(Native Method) - at org.eclipse.swt.widgets.TaskItem.setOverlayImage(TaskItem.java:296) - at org.eclipse.ui.internal.progress.TaskBarProgressManager.updateImage(TaskBarProgressManager.java:159) - at org.eclipse.ui.internal.progress.TaskBarProgressManager.access$4(TaskBarProgressManager.java:153) - at org.eclipse.ui.internal.progress.TaskBarProgressManager$2.runInUIThread(TaskBarProgressManager.java:117) - at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:97) - at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) - at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182) - at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.jface.dialogs.MessageDialogWithToggle.open(MessageDialogWithToggle.java:115) - at org.eclipse.jface.dialogs.MessageDialogWithToggle.openOkCancelConfirm(MessageDialogWithToggle.java:210) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:213) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:165) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4410) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3371) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4897) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3144) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3819) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -!SESSION 2017-04-04 17:28:24.334 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.core.resources 2 10035 2017-04-04 17:28:32.785 -!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-04 17:28:41.471 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.jface.text 2 0 2017-04-04 17:32:45.473 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-04-04 17:32:45.475 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.equinox.event 4 0 2017-04-04 17:35:12.546 -!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@4e4f979f (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@440e2406, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@4e4f979f (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@440e2406, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@165abf1 -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(FileInputStream.java:195) - at java.io.FileInputStream.(FileInputStream.java:138) - at java.io.FileInputStream.(FileInputStream.java:93) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 75 more - -!ENTRY org.eclipse.ui 4 0 2017-04-04 17:35:14.020 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(FileInputStream.java:195) - at java.io.FileInputStream.(FileInputStream.java:138) - at java.io.FileInputStream.(FileInputStream.java:93) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.equinox.event 4 0 2017-04-04 17:35:49.040 -!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@507f7caa (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@440e2406, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@507f7caa (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@440e2406, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@165abf1 -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(FileInputStream.java:195) - at java.io.FileInputStream.(FileInputStream.java:138) - at java.io.FileInputStream.(FileInputStream.java:93) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 75 more - -!ENTRY org.eclipse.ui 4 0 2017-04-04 17:35:50.602 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(FileInputStream.java:195) - at java.io.FileInputStream.(FileInputStream.java:138) - at java.io.FileInputStream.(FileInputStream.java:93) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more -!SESSION 2017-04-04 18:07:28.299 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-04 18:07:37.718 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-04-04 20:23:39.571 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-04 20:24:42.106 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.jface.text 2 0 2017-04-05 01:23:19.257 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-04-05 01:23:19.316 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.jface.text 2 0 2017-04-05 01:43:16.807 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-04-05 01:43:16.807 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.e4.ui.workbench 4 0 2017-04-05 02:20:07.842 -!MESSAGE Error disposing widget for : org.eclipse.e4.ui.model.application.ui.menu.impl.MenuImpl null -!STACK 0 -java.lang.IllegalArgumentException: Argument not valid - at org.eclipse.swt.SWT.error(SWT.java:4514) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.SWT.error(SWT.java:4419) - at org.eclipse.swt.graphics.GC.setFont(GC.java:4617) - at org.eclipse.swt.custom.CTabFolderRenderer.computeSize(CTabFolderRenderer.java:340) - at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.computeSize(CTabRendering.java:200) - at org.eclipse.swt.custom.CTabFolder.setItemSize(CTabFolder.java:2819) - at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3764) - at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3697) - at org.eclipse.swt.custom.CTabFolder.onResize(CTabFolder.java:2090) - at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:340) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.sendResize(Control.java:3042) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1058) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1108) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3292) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3288) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:301) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:246) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:163) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1062) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1108) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3211) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3259) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1102) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3292) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3288) - at org.eclipse.swt.custom.StackLayout.layout(StackLayout.java:123) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3259) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1102) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3292) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3288) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:301) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:246) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:163) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3259) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1102) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3211) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) - at org.eclipse.swt.internal.win32.OS.EndDeferWindowPos(Native Method) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:1030) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:996) - at org.eclipse.swt.widgets.Composite.setResizeChildren(Composite.java:1210) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1801) - at org.eclipse.swt.widgets.Canvas.WM_SIZE(Canvas.java:492) - at org.eclipse.swt.widgets.Decorations.WM_SIZE(Decorations.java:1849) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) - at org.eclipse.swt.widgets.Canvas.WM_WINDOWPOSCHANGED(Canvas.java:499) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.SetMenu(Native Method) - at org.eclipse.swt.widgets.Decorations.setMenuBar(Decorations.java:1187) - at org.eclipse.swt.widgets.Menu.releaseParent(Menu.java:1206) - at org.eclipse.swt.widgets.Widget.release(Widget.java:844) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.disposeWidget(SWTPartRenderer.java:176) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeRemoveGui(PartRenderingEngine.java:918) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$1(PartRenderingEngine.java:846) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$3.run(PartRenderingEngine.java:841) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:825) - at org.eclipse.ui.internal.WorkbenchWindow$1.handleEvent(WorkbenchWindow.java:322) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:151) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer$1.widgetDisposed(SWTPartRenderer.java:139) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Widget.release(Widget.java:836) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:459) - at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) - at org.eclipse.swt.widgets.Display.release(Display.java:3875) - at org.eclipse.swt.graphics.Device.dispose(Device.java:298) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3358) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4897) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) - at org.eclipse.swt.internal.win32.OS.VtblCall(Native Method) - at org.eclipse.swt.widgets.TaskItem.setOverlayImage(TaskItem.java:296) - at org.eclipse.ui.internal.progress.TaskBarProgressManager.updateImage(TaskBarProgressManager.java:159) - at org.eclipse.ui.internal.progress.TaskBarProgressManager.access$4(TaskBarProgressManager.java:153) - at org.eclipse.ui.internal.progress.TaskBarProgressManager$2.runInUIThread(TaskBarProgressManager.java:117) - at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:97) - at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) - at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182) - at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.jface.dialogs.MessageDialogWithToggle.open(MessageDialogWithToggle.java:115) - at org.eclipse.jface.dialogs.MessageDialogWithToggle.openOkCancelConfirm(MessageDialogWithToggle.java:210) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:213) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:165) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4410) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3371) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4897) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3144) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3819) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -!SESSION 2017-04-05 22:26:22.175 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.core.resources 2 10035 2017-04-05 22:26:29.318 -!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-05 22:26:36.687 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-04-06 00:47:18.247 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-06 00:47:50.832 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-04-06 02:03:23.389 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-06 02:03:44.687 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.equinox.event 4 0 2017-04-06 02:04:07.770 -!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@78fdc1bb (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@75707f05, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@78fdc1bb (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@75707f05, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@6fffad6d -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(FileInputStream.java:195) - at java.io.FileInputStream.(FileInputStream.java:138) - at java.io.FileInputStream.(FileInputStream.java:93) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 75 more - -!ENTRY org.eclipse.ui 4 0 2017-04-06 02:04:10.005 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(FileInputStream.java:195) - at java.io.FileInputStream.(FileInputStream.java:138) - at java.io.FileInputStream.(FileInputStream.java:93) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more -!SESSION 2017-04-06 02:08:17.558 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-06 02:08:38.242 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.equinox.event 4 0 2017-04-06 02:08:41.170 -!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@3d45ea17 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@6971f5f4, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@3d45ea17 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@6971f5f4, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@562b791b -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(FileInputStream.java:195) - at java.io.FileInputStream.(FileInputStream.java:138) - at java.io.FileInputStream.(FileInputStream.java:93) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 75 more - -!ENTRY org.eclipse.ui 4 0 2017-04-06 02:08:44.687 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(FileInputStream.java:195) - at java.io.FileInputStream.(FileInputStream.java:138) - at java.io.FileInputStream.(FileInputStream.java:93) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-04-06 02:08:44.787 -!MESSAGE Unhandled event loop exception -!STACK 0 -java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 - at java.util.ArrayList.rangeCheck(ArrayList.java:653) - at java.util.ArrayList.get(ArrayList.java:429) - at org.eclipse.jdt.internal.ui.wizards.buildpaths.newsourcepage.ConfigureBuildPathAction.run(ConfigureBuildPathAction.java:63) - at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) - at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565) - at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) - -!ENTRY org.eclipse.equinox.event 4 0 2017-04-06 02:08:49.521 -!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@6896ef29 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@6971f5f4, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@6896ef29 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@6971f5f4, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@562b791b -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(FileInputStream.java:195) - at java.io.FileInputStream.(FileInputStream.java:138) - at java.io.FileInputStream.(FileInputStream.java:93) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 75 more -!SESSION 2017-04-06 02:21:00.143 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-06 02:21:23.640 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.jface.text 2 0 2017-04-06 02:28:12.434 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-04-06 02:28:12.437 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.equinox.event 4 0 2017-04-06 02:31:03.685 -!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@3afbd1fd (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@10007fdc, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@3afbd1fd (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@10007fdc, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@5e31ad69 -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(FileInputStream.java:195) - at java.io.FileInputStream.(FileInputStream.java:138) - at java.io.FileInputStream.(FileInputStream.java:93) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 75 more - -!ENTRY org.eclipse.ui 4 0 2017-04-06 02:31:05.552 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(FileInputStream.java:195) - at java.io.FileInputStream.(FileInputStream.java:138) - at java.io.FileInputStream.(FileInputStream.java:93) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more -!SESSION 2017-04-06 02:49:58.774 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-06 02:50:15.871 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-04-06 02:50:30.453 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-06 02:50:42.826 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.jface.text 2 0 2017-04-06 03:01:55.359 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-04-06 03:01:55.361 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.equinox.event 4 0 2017-04-06 03:04:22.938 -!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@116c5bfa (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@116c5bfa (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@456839ee -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) - at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) - at org.eclipse.equinox.launcher.Main.run(Main.java:1519) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(FileInputStream.java:195) - at java.io.FileInputStream.(FileInputStream.java:138) - at java.io.FileInputStream.(FileInputStream.java:93) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 75 more -!SESSION 2017-04-17 03:24:29.378 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-17 03:24:51.826 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-04-17 03:25:49.972 ----------------------------------------------- -eclipse.buildId=4.6.3.M20170301-0400 -java.version=1.8.0_121 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-04-17 03:25:58.567 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-08-28 00:39:00.693 ----------------------------------------------- -eclipse.buildId=4.7.0.I20170612-0950 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-08-28 00:39:15.622 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-08-28 00:40:50.014 ----------------------------------------------- -eclipse.buildId=4.7.0.I20170612-0950 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-08-28 00:41:00.718 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-08-28 00:42:12.549 ----------------------------------------------- -eclipse.buildId=4.7.0.I20170612-0950 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-08-28 00:42:24.071 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-08-28 00:43:41.933 ----------------------------------------------- -eclipse.buildId=4.7.0.I20170612-0950 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-08-28 00:43:52.374 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-08-28 00:49:21.174 ----------------------------------------------- -eclipse.buildId=4.7.0.I20170612-0950 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-08-28 00:49:54.423 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-10-04 00:06:00.830 ----------------------------------------------- -eclipse.buildId=4.7.0.I20170612-0950 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-10-04 00:06:55.748 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.jface.text 2 0 2017-10-04 00:47:37.369 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-10-04 00:47:37.370 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.jface.text 2 0 2017-10-04 00:48:52.844 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-10-04 00:48:52.844 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.ui 4 0 2017-10-04 03:24:41.753 -!MESSAGE Unhandled event loop exception -!STACK 0 -java.lang.IllegalArgumentException: Argument not valid - at org.eclipse.swt.SWT.error(SWT.java:4514) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.SWT.error(SWT.java:4419) - at org.eclipse.swt.graphics.GC.setFont(GC.java:4617) - at org.eclipse.swt.custom.CTabFolderRenderer.computeSize(CTabFolderRenderer.java:340) - at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.computeSize(CTabRendering.java:198) - at org.eclipse.swt.custom.CTabFolder.setItemSize(CTabFolder.java:2839) - at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3784) - at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3717) - at org.eclipse.swt.custom.CTabFolder.onResize(CTabFolder.java:2110) - at org.eclipse.swt.custom.CTabFolder.lambda$0(CTabFolder.java:335) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.sendResize(Control.java:3087) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1035) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:283) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:228) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:145) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.swt.custom.StackLayout.layout(StackLayout.java:123) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:283) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:228) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:145) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.EndDeferWindowPos(Native Method) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:1007) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:973) - at org.eclipse.swt.widgets.Composite.setResizeChildren(Composite.java:1187) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1778) - at org.eclipse.swt.widgets.Canvas.WM_SIZE(Canvas.java:492) - at org.eclipse.swt.widgets.Decorations.WM_SIZE(Decorations.java:1850) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Canvas.WM_WINDOWPOSCHANGED(Canvas.java:499) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetMenu(Native Method) - at org.eclipse.swt.widgets.Decorations.setMenuBar(Decorations.java:1188) - at org.eclipse.swt.widgets.Menu.releaseParent(Menu.java:1206) - at org.eclipse.swt.widgets.Widget.release(Widget.java:844) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.disposeWidget(SWTPartRenderer.java:172) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeRemoveGui(PartRenderingEngine.java:940) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$1(PartRenderingEngine.java:868) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:863) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:847) - at org.eclipse.ui.internal.WorkbenchWindow$1.handleEvent(WorkbenchWindow.java:322) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:147) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.lambda$0(SWTPartRenderer.java:136) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Widget.release(Widget.java:836) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:460) - at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) - at org.eclipse.swt.widgets.Display.release(Display.java:3868) - at org.eclipse.swt.graphics.Device.dispose(Device.java:298) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3351) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:224) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:164) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4420) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3364) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1044) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) - -!ENTRY org.eclipse.ui 4 0 2017-10-04 03:24:43.003 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: Graphic is disposed - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.SWT.error(SWT.java:4419) - at org.eclipse.swt.graphics.Font.getFontData(Font.java:192) - at org.eclipse.swt.custom.CTabFolderRenderer.drawChevron(CTabFolderRenderer.java:909) - at org.eclipse.swt.custom.CTabFolderRenderer.draw(CTabFolderRenderer.java:605) - at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.draw(CTabRendering.java:251) - at org.eclipse.swt.custom.CTabFolder.createButtonImage(CTabFolder.java:747) - at org.eclipse.swt.custom.CTabFolder.setButtonBounds(CTabFolder.java:2561) - at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3786) - at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3717) - at org.eclipse.swt.custom.CTabFolder.onResize(CTabFolder.java:2110) - at org.eclipse.swt.custom.CTabFolder.lambda$0(CTabFolder.java:335) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.sendResize(Control.java:3087) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1035) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:283) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:228) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:145) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.swt.custom.StackLayout.layout(StackLayout.java:123) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:283) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:228) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:145) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.EndDeferWindowPos(Native Method) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:1007) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:973) - at org.eclipse.swt.widgets.Composite.setResizeChildren(Composite.java:1187) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1778) - at org.eclipse.swt.widgets.Canvas.WM_SIZE(Canvas.java:492) - at org.eclipse.swt.widgets.Decorations.WM_SIZE(Decorations.java:1850) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Canvas.WM_WINDOWPOSCHANGED(Canvas.java:499) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetMenu(Native Method) - at org.eclipse.swt.widgets.Decorations.setMenuBar(Decorations.java:1188) - at org.eclipse.swt.widgets.Menu.releaseParent(Menu.java:1206) - at org.eclipse.swt.widgets.Widget.release(Widget.java:844) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.disposeWidget(SWTPartRenderer.java:172) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeRemoveGui(PartRenderingEngine.java:940) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$1(PartRenderingEngine.java:868) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:863) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:847) - at org.eclipse.ui.internal.WorkbenchWindow$1.handleEvent(WorkbenchWindow.java:322) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:147) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.lambda$0(SWTPartRenderer.java:136) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Widget.release(Widget.java:836) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:460) - at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) - at org.eclipse.swt.widgets.Display.release(Display.java:3868) - at org.eclipse.swt.graphics.Device.dispose(Device.java:298) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3351) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:224) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:164) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4420) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3364) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1044) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) - -!ENTRY org.eclipse.e4.ui.css.swt.theme 4 0 2017-10-04 03:24:43.003 -!MESSAGE Graphic is disposed -!STACK 0 -org.eclipse.swt.SWTException: Graphic is disposed - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.SWT.error(SWT.java:4419) - at org.eclipse.swt.graphics.Font.getFontData(Font.java:192) - at org.eclipse.e4.ui.css.swt.helpers.CSSSWTFontHelper.getFirstFontData(CSSSWTFontHelper.java:459) - at org.eclipse.e4.ui.css.swt.properties.converters.CSSValueSWTFontDataConverterImpl.convert(CSSValueSWTFontDataConverterImpl.java:59) - at org.eclipse.e4.ui.css.swt.properties.converters.CSSValueSWTFontConverterImpl.convert(CSSValueSWTFontConverterImpl.java:34) - at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.convert(AbstractCSSEngine.java:1124) - at org.eclipse.e4.ui.css.swt.properties.css2.CSSPropertyFontSWTHandler.onAllCSSPropertiesApplyed(CSSPropertyFontSWTHandler.java:251) - at org.eclipse.e4.ui.css.core.dom.properties.ICSSPropertyHandler2.onAllCSSPropertiesApplyed(ICSSPropertyHandler2.java:44) - at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyleDeclaration(AbstractCSSEngine.java:581) - at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:426) - at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:367) - at org.eclipse.e4.ui.css.swt.engine.CSSSWTApplyStylesListener$1.handleEvent(CSSSWTApplyStylesListener.java:32) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4420) - at org.eclipse.swt.widgets.Display.runSkin(Display.java:4321) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1361) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:283) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:228) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:145) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.swt.custom.StackLayout.layout(StackLayout.java:123) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:283) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:228) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:145) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.EndDeferWindowPos(Native Method) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:1007) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:973) - at org.eclipse.swt.widgets.Composite.setResizeChildren(Composite.java:1187) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1778) - at org.eclipse.swt.widgets.Canvas.WM_SIZE(Canvas.java:492) - at org.eclipse.swt.widgets.Decorations.WM_SIZE(Decorations.java:1850) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Canvas.WM_WINDOWPOSCHANGED(Canvas.java:499) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetMenu(Native Method) - at org.eclipse.swt.widgets.Decorations.setMenuBar(Decorations.java:1188) - at org.eclipse.swt.widgets.Menu.releaseParent(Menu.java:1206) - at org.eclipse.swt.widgets.Widget.release(Widget.java:844) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.disposeWidget(SWTPartRenderer.java:172) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeRemoveGui(PartRenderingEngine.java:940) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$1(PartRenderingEngine.java:868) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:863) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:847) - at org.eclipse.ui.internal.WorkbenchWindow$1.handleEvent(WorkbenchWindow.java:322) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:147) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.lambda$0(SWTPartRenderer.java:136) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Widget.release(Widget.java:836) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:460) - at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) - at org.eclipse.swt.widgets.Display.release(Display.java:3868) - at org.eclipse.swt.graphics.Device.dispose(Device.java:298) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3351) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:224) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:164) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4420) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3364) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1044) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) - -!ENTRY org.eclipse.ui 4 0 2017-10-04 03:24:43.128 -!MESSAGE Unhandled event loop exception -!STACK 0 -java.lang.NullPointerException - at org.eclipse.ui.internal.NavigationHistory.getDisplay(NavigationHistory.java:176) - at org.eclipse.ui.internal.NavigationHistory.markEditor(NavigationHistory.java:193) - at org.eclipse.ui.internal.WorkbenchPage.updateActiveEditorSources(WorkbenchPage.java:418) - at org.eclipse.ui.internal.WorkbenchPage.firePartClosed(WorkbenchPage.java:5177) - at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.lambda$0(CompatibilityPart.java:104) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:147) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.lambda$0(SWTPartRenderer.java:136) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Widget.release(Widget.java:836) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:171) - at org.eclipse.swt.widgets.Decorations.releaseChildren(Decorations.java:808) - at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:1368) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:460) - at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) - at org.eclipse.swt.widgets.Display.release(Display.java:3868) - at org.eclipse.swt.graphics.Device.dispose(Device.java:298) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3351) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:224) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:164) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4420) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3364) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1044) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -!SESSION 2017-10-08 14:03:53.565 ----------------------------------------------- -eclipse.buildId=4.7.1.M20170906-1700 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.core.resources 2 10035 2017-10-08 14:05:13.130 -!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. - -!ENTRY org.eclipse.e4.ui.workbench 2 0 2017-10-08 14:12:51.564 -!MESSAGE Removing part descriptor with the 'org.eclipse.wb.core.StructureView' id and the 'Structure' description. Points to the invalid 'bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView' class. - -!ENTRY org.eclipse.egit.ui 2 0 2017-10-08 14:12:56.587 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.e4.ui.workbench 2 0 2017-10-08 14:13:00.383 -!MESSAGE Removing part descriptor with the 'org.eclipse.wb.core.PaletteView' id and the 'Palette' description. Points to the invalid 'bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView' class. - -!ENTRY org.eclipse.ui 4 0 2017-10-08 14:37:03.662 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 14:37:07.209 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 14:41:26.801 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 14:41:27.311 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 14:41:28.196 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.jface.text 2 0 2017-10-08 14:45:16.502 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-10-08 14:45:16.503 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.recommenders.models.rcp 1 11 2017-10-08 14:45:19.760 -!MESSAGE The model index service was accessed either before it started or after it finished running. -!STACK 0 -org.eclipse.recommenders.utils.Logs$LogTraceException - at org.eclipse.recommenders.utils.Logs$LogTraceException.newTrace(Logs.java:381) - at org.eclipse.recommenders.utils.Logs.log(Logs.java:134) - at org.eclipse.recommenders.utils.Logs.log(Logs.java:126) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelIndex.suggest(EclipseModelIndex.java:211) - at org.eclipse.recommenders.models.SimpleModelProvider.acquireModel(SimpleModelProvider.java:70) - at org.eclipse.recommenders.models.PoolingModelProvider.access$0(PoolingModelProvider.java:1) - at org.eclipse.recommenders.models.PoolingModelProvider$ModelPoolFactoryMediator.makeObject(PoolingModelProvider.java:96) - at org.eclipse.recommenders.models.PoolingModelProvider$ModelPoolFactoryMediator.makeObject(PoolingModelProvider.java:1) - at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220) - at org.eclipse.recommenders.models.PoolingModelProvider.acquireModel(PoolingModelProvider.java:67) - at org.eclipse.recommenders.internal.calls.rcp.RcpCallModelProvider.acquireModel(RcpCallModelProvider.java:65) - at org.eclipse.recommenders.internal.calls.rcp.RcpCallModelProvider.acquireModel(RcpCallModelProvider.java:1) - at org.eclipse.recommenders.internal.models.rcp.PrefetchModelArchiveJob.run(PrefetchModelArchiveJob.java:43) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 14:49:51.720 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:52) - at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:364) - at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:76) - at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:590) - at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:258) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:529) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more -Caused by: org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178) - at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:137) - at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:150) - at org.eclipse.aether.spi.connector.transport.AbstractTransporter.copy(AbstractTransporter.java:209) - at org.eclipse.aether.spi.connector.transport.AbstractTransporter.utilGet(AbstractTransporter.java:105) - at org.eclipse.aether.transport.http.HttpTransporter.access$100(HttpTransporter.java:81) - at org.eclipse.aether.transport.http.HttpTransporter$EntityGetter.handle(HttpTransporter.java:525) - at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:303) - at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTransporter.java:252) - at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(AbstractTransporter.java:68) - at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:456) - at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:359) - ... 13 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 14:49:51.722 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 14:49:51.726 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 14:49:51.727 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.jface.text 2 0 2017-10-08 15:03:17.651 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-10-08 15:03:17.651 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 15:12:32.126 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 15:12:32.127 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.ui 4 0 2017-10-08 15:15:29.844 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 15:15:30.547 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 15:16:48.364 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 15:16:48.365 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 15:16:53.161 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 15:16:53.162 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.ui 4 0 2017-10-08 15:22:38.178 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 15:31:44.142 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 15:31:44.143 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 15:34:07.823 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 15:34:07.824 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 15:34:19.413 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 15:34:19.414 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 15:34:36.525 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 15:34:36.526 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 15:54:17.456 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:52) - at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:364) - at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:76) - at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:590) - at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:258) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:529) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more -Caused by: org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178) - at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:137) - at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:150) - at org.eclipse.aether.spi.connector.transport.AbstractTransporter.copy(AbstractTransporter.java:209) - at org.eclipse.aether.spi.connector.transport.AbstractTransporter.utilGet(AbstractTransporter.java:105) - at org.eclipse.aether.transport.http.HttpTransporter.access$100(HttpTransporter.java:81) - at org.eclipse.aether.transport.http.HttpTransporter$EntityGetter.handle(HttpTransporter.java:525) - at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:303) - at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTransporter.java:252) - at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(AbstractTransporter.java:68) - at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:456) - at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:359) - ... 13 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 15:54:17.561 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 15:54:17.564 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 15:54:17.565 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 15:58:02.259 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 15:58:02.260 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.ui 4 0 2017-10-08 16:10:27.170 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 16:10:32.943 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 16:10:33.098 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 16:33:08.239 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 16:33:08.257 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 16:33:23.301 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 16:33:23.302 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 16:35:13.988 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 16:35:13.989 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 16:35:42.138 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 16:35:42.139 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 16:41:18.860 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 16:41:18.862 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 16:41:39.265 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 16:41:39.266 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 16:41:46.828 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 16:41:46.829 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 16:48:40.770 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 16:48:40.771 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.m2e.logback.appender 2 0 2017-10-08 16:51:33.503 -!MESSAGE Failed to download jre:jre:call:zip:1.0.0 -!STACK 0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) - ... 8 more - -!ENTRY org.eclipse.recommenders.models.rcp 1 0 2017-10-08 16:51:33.505 -!MESSAGE jre:jre:call:zip:1.0.0 could not be resolved from the model repositories. Are you offline? - -!ENTRY org.eclipse.ui 4 0 2017-10-08 16:57:58.651 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 16:57:59.375 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 16:58:09.147 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 17:16:08.153 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 17:16:08.671 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 17:17:08.680 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 18:12:52.640 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 18:44:53.373 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 18:44:54.056 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 18:48:59.957 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 18:50:04.342 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 19:04:16.687 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 19:19:15.094 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 19:20:50.878 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 20:54:04.273 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 20:55:50.054 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 20:55:50.689 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 20:58:47.667 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 20:58:48.409 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 21:11:07.671 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 21:11:08.427 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 21:11:33.538 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 21:17:56.675 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 21:17:57.143 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 21:42:51.725 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 22:39:20.831 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 22:39:28.883 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 22:39:29.390 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.jdt.debug.ui 4 150 2017-10-08 22:41:05.667 -!MESSAGE Internal Error -!STACK 1 -org.eclipse.debug.core.DebugException: com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine occurred while retrieving value. - at org.eclipse.jdt.internal.debug.core.model.JDIDebugElement.throwDebugException(JDIDebugElement.java:263) - at org.eclipse.jdt.internal.debug.core.model.JDIDebugElement.requestFailed(JDIDebugElement.java:202) - at org.eclipse.jdt.internal.debug.core.model.JDIDebugElement.targetRequestFailed(JDIDebugElement.java:182) - at org.eclipse.jdt.internal.debug.core.model.JDIVariable.getCurrentValue(JDIVariable.java:74) - at org.eclipse.jdt.internal.debug.core.model.JDIVariable.getValue(JDIVariable.java:96) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.appendArrayDetail(JavaDetailFormattersManager.java:696) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.appendArrayDetail(JavaDetailFormattersManager.java:710) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener$1.run(JavaDetailFormattersManager.java:664) - at org.eclipse.jdt.internal.debug.core.model.JDIThread.runEvaluation(JDIThread.java:828) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.valueToString(JavaDetailFormattersManager.java:673) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager.resolveFormatter(JavaDetailFormattersManager.java:167) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager.access$1(JavaDetailFormattersManager.java:140) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$1.run(JavaDetailFormattersManager.java:135) - at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:3529) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine - at org.eclipse.jdi.internal.connect.PacketReceiveManager.getReply(PacketReceiveManager.java:186) - at org.eclipse.jdi.internal.connect.PacketReceiveManager.getReply(PacketReceiveManager.java:204) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:192) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:227) - at org.eclipse.jdi.internal.ArrayReferenceImpl.getValues(ArrayReferenceImpl.java:124) - at org.eclipse.jdi.internal.ArrayReferenceImpl.getValue(ArrayReferenceImpl.java:73) - at org.eclipse.jdt.internal.debug.core.model.JDIArrayEntryVariable.retrieveValue(JDIArrayEntryVariable.java:87) - at org.eclipse.jdt.internal.debug.core.model.JDIVariable.getCurrentValue(JDIVariable.java:72) - ... 11 more -!SUBENTRY 1 org.eclipse.jdt.debug 4 5010 2017-10-08 22:41:05.733 -!MESSAGE com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine occurred while retrieving value. -!STACK 0 -com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine - at org.eclipse.jdi.internal.connect.PacketReceiveManager.getReply(PacketReceiveManager.java:186) - at org.eclipse.jdi.internal.connect.PacketReceiveManager.getReply(PacketReceiveManager.java:204) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:192) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:227) - at org.eclipse.jdi.internal.ArrayReferenceImpl.getValues(ArrayReferenceImpl.java:124) - at org.eclipse.jdi.internal.ArrayReferenceImpl.getValue(ArrayReferenceImpl.java:73) - at org.eclipse.jdt.internal.debug.core.model.JDIArrayEntryVariable.retrieveValue(JDIArrayEntryVariable.java:87) - at org.eclipse.jdt.internal.debug.core.model.JDIVariable.getCurrentValue(JDIVariable.java:72) - at org.eclipse.jdt.internal.debug.core.model.JDIVariable.getValue(JDIVariable.java:96) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.appendArrayDetail(JavaDetailFormattersManager.java:696) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.appendArrayDetail(JavaDetailFormattersManager.java:710) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener$1.run(JavaDetailFormattersManager.java:664) - at org.eclipse.jdt.internal.debug.core.model.JDIThread.runEvaluation(JDIThread.java:828) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.valueToString(JavaDetailFormattersManager.java:673) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager.resolveFormatter(JavaDetailFormattersManager.java:167) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager.access$1(JavaDetailFormattersManager.java:140) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$1.run(JavaDetailFormattersManager.java:135) - at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:3529) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) - -!ENTRY org.eclipse.jdt.debug.ui 4 150 2017-10-08 22:41:05.734 -!MESSAGE Internal Error -!STACK 1 -org.eclipse.debug.core.DebugException: com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine occurred while retrieving array length. - at org.eclipse.jdt.internal.debug.core.model.JDIDebugElement.throwDebugException(JDIDebugElement.java:263) - at org.eclipse.jdt.internal.debug.core.model.JDIDebugElement.requestFailed(JDIDebugElement.java:202) - at org.eclipse.jdt.internal.debug.core.model.JDIDebugElement.targetRequestFailed(JDIDebugElement.java:182) - at org.eclipse.jdt.internal.debug.core.model.JDIArrayValue.getLength(JDIArrayValue.java:81) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.appendArrayDetail(JavaDetailFormattersManager.java:690) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.appendArrayDetail(JavaDetailFormattersManager.java:710) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener$1.run(JavaDetailFormattersManager.java:664) - at org.eclipse.jdt.internal.debug.core.model.JDIThread.runEvaluation(JDIThread.java:828) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.valueToString(JavaDetailFormattersManager.java:673) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager.resolveFormatter(JavaDetailFormattersManager.java:167) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager.access$1(JavaDetailFormattersManager.java:140) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$1.run(JavaDetailFormattersManager.java:135) - at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:3529) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine - at org.eclipse.jdi.internal.connect.PacketSendManager.sendPacket(PacketSendManager.java:90) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:187) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:227) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:243) - at org.eclipse.jdi.internal.ArrayReferenceImpl.length(ArrayReferenceImpl.java:230) - at org.eclipse.jdt.internal.debug.core.model.JDIArrayValue.getLength(JDIArrayValue.java:79) - ... 10 more -!SUBENTRY 1 org.eclipse.jdt.debug 4 5010 2017-10-08 22:41:05.735 -!MESSAGE com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine occurred while retrieving array length. -!STACK 0 -com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine - at org.eclipse.jdi.internal.connect.PacketSendManager.sendPacket(PacketSendManager.java:90) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:187) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:227) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:243) - at org.eclipse.jdi.internal.ArrayReferenceImpl.length(ArrayReferenceImpl.java:230) - at org.eclipse.jdt.internal.debug.core.model.JDIArrayValue.getLength(JDIArrayValue.java:79) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.appendArrayDetail(JavaDetailFormattersManager.java:690) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.appendArrayDetail(JavaDetailFormattersManager.java:710) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener$1.run(JavaDetailFormattersManager.java:664) - at org.eclipse.jdt.internal.debug.core.model.JDIThread.runEvaluation(JDIThread.java:828) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.valueToString(JavaDetailFormattersManager.java:673) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager.resolveFormatter(JavaDetailFormattersManager.java:167) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager.access$1(JavaDetailFormattersManager.java:140) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$1.run(JavaDetailFormattersManager.java:135) - at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:3529) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) - -!ENTRY org.eclipse.jdt.debug.ui 4 150 2017-10-08 22:41:05.735 -!MESSAGE Internal Error -!STACK 1 -org.eclipse.debug.core.DebugException: com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine occurred while retrieving array length. - at org.eclipse.jdt.internal.debug.core.model.JDIDebugElement.throwDebugException(JDIDebugElement.java:263) - at org.eclipse.jdt.internal.debug.core.model.JDIDebugElement.requestFailed(JDIDebugElement.java:202) - at org.eclipse.jdt.internal.debug.core.model.JDIDebugElement.targetRequestFailed(JDIDebugElement.java:182) - at org.eclipse.jdt.internal.debug.core.model.JDIArrayValue.getLength(JDIArrayValue.java:81) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.appendArrayDetail(JavaDetailFormattersManager.java:690) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.appendArrayDetail(JavaDetailFormattersManager.java:710) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener$1.run(JavaDetailFormattersManager.java:664) - at org.eclipse.jdt.internal.debug.core.model.JDIThread.runEvaluation(JDIThread.java:828) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.valueToString(JavaDetailFormattersManager.java:673) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager.resolveFormatter(JavaDetailFormattersManager.java:167) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager.access$1(JavaDetailFormattersManager.java:140) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$1.run(JavaDetailFormattersManager.java:135) - at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:3529) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine - at org.eclipse.jdi.internal.connect.PacketSendManager.sendPacket(PacketSendManager.java:90) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:187) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:227) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:243) - at org.eclipse.jdi.internal.ArrayReferenceImpl.length(ArrayReferenceImpl.java:230) - at org.eclipse.jdt.internal.debug.core.model.JDIArrayValue.getLength(JDIArrayValue.java:79) - ... 10 more -!SUBENTRY 1 org.eclipse.jdt.debug 4 5010 2017-10-08 22:41:05.736 -!MESSAGE com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine occurred while retrieving array length. -!STACK 0 -com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine - at org.eclipse.jdi.internal.connect.PacketSendManager.sendPacket(PacketSendManager.java:90) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:187) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:227) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:243) - at org.eclipse.jdi.internal.ArrayReferenceImpl.length(ArrayReferenceImpl.java:230) - at org.eclipse.jdt.internal.debug.core.model.JDIArrayValue.getLength(JDIArrayValue.java:79) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.appendArrayDetail(JavaDetailFormattersManager.java:690) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.appendArrayDetail(JavaDetailFormattersManager.java:710) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener$1.run(JavaDetailFormattersManager.java:664) - at org.eclipse.jdt.internal.debug.core.model.JDIThread.runEvaluation(JDIThread.java:828) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.valueToString(JavaDetailFormattersManager.java:673) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager.resolveFormatter(JavaDetailFormattersManager.java:167) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager.access$1(JavaDetailFormattersManager.java:140) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$1.run(JavaDetailFormattersManager.java:135) - at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:3529) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) - -!ENTRY org.eclipse.jdt.debug.ui 4 150 2017-10-08 22:41:05.736 -!MESSAGE Internal Error -!STACK 1 -org.eclipse.debug.core.DebugException: com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine occurred while retrieving array length. - at org.eclipse.jdt.internal.debug.core.model.JDIDebugElement.throwDebugException(JDIDebugElement.java:263) - at org.eclipse.jdt.internal.debug.core.model.JDIDebugElement.requestFailed(JDIDebugElement.java:202) - at org.eclipse.jdt.internal.debug.core.model.JDIDebugElement.targetRequestFailed(JDIDebugElement.java:182) - at org.eclipse.jdt.internal.debug.core.model.JDIArrayValue.getLength(JDIArrayValue.java:81) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.appendArrayDetail(JavaDetailFormattersManager.java:690) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.appendArrayDetail(JavaDetailFormattersManager.java:710) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener$1.run(JavaDetailFormattersManager.java:664) - at org.eclipse.jdt.internal.debug.core.model.JDIThread.runEvaluation(JDIThread.java:828) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.valueToString(JavaDetailFormattersManager.java:673) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager.resolveFormatter(JavaDetailFormattersManager.java:167) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager.access$1(JavaDetailFormattersManager.java:140) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$1.run(JavaDetailFormattersManager.java:135) - at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:3529) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine - at org.eclipse.jdi.internal.connect.PacketSendManager.sendPacket(PacketSendManager.java:90) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:187) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:227) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:243) - at org.eclipse.jdi.internal.ArrayReferenceImpl.length(ArrayReferenceImpl.java:230) - at org.eclipse.jdt.internal.debug.core.model.JDIArrayValue.getLength(JDIArrayValue.java:79) - ... 10 more -!SUBENTRY 1 org.eclipse.jdt.debug 4 5010 2017-10-08 22:41:05.736 -!MESSAGE com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine occurred while retrieving array length. -!STACK 0 -com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine - at org.eclipse.jdi.internal.connect.PacketSendManager.sendPacket(PacketSendManager.java:90) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:187) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:227) - at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:243) - at org.eclipse.jdi.internal.ArrayReferenceImpl.length(ArrayReferenceImpl.java:230) - at org.eclipse.jdt.internal.debug.core.model.JDIArrayValue.getLength(JDIArrayValue.java:79) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.appendArrayDetail(JavaDetailFormattersManager.java:690) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.appendArrayDetail(JavaDetailFormattersManager.java:710) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener$1.run(JavaDetailFormattersManager.java:664) - at org.eclipse.jdt.internal.debug.core.model.JDIThread.runEvaluation(JDIThread.java:828) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$EvaluationListener.valueToString(JavaDetailFormattersManager.java:673) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager.resolveFormatter(JavaDetailFormattersManager.java:167) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager.access$1(JavaDetailFormattersManager.java:140) - at org.eclipse.jdt.internal.debug.ui.JavaDetailFormattersManager$1.run(JavaDetailFormattersManager.java:135) - at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:3529) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) - -!ENTRY org.eclipse.ui 4 0 2017-10-08 22:52:16.563 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 22:52:28.829 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-08 22:55:44.385 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 01:42:31.622 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 01:42:32.291 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 01:53:44.394 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 01:56:35.987 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 02:04:30.789 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 02:07:12.138 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 02:10:03.258 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more -!SESSION 2017-10-09 02:11:30.771 ----------------------------------------------- -eclipse.buildId=4.7.1.M20170906-1700 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-10-09 02:12:04.493 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.ui 4 0 2017-10-09 02:14:12.657 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 02:40:11.410 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 02:40:15.524 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 02:40:15.983 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.jface.text 2 0 2017-10-09 02:49:24.380 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-10-09 02:49:24.381 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.recommenders.models.rcp 1 11 2017-10-09 02:49:25.997 -!MESSAGE The model index service was accessed either before it started or after it finished running. -!STACK 0 -org.eclipse.recommenders.utils.Logs$LogTraceException - at org.eclipse.recommenders.utils.Logs$LogTraceException.newTrace(Logs.java:381) - at org.eclipse.recommenders.utils.Logs.log(Logs.java:134) - at org.eclipse.recommenders.utils.Logs.log(Logs.java:126) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelIndex.suggest(EclipseModelIndex.java:211) - at org.eclipse.recommenders.models.SimpleModelProvider.acquireModel(SimpleModelProvider.java:70) - at org.eclipse.recommenders.models.PoolingModelProvider.access$0(PoolingModelProvider.java:1) - at org.eclipse.recommenders.models.PoolingModelProvider$ModelPoolFactoryMediator.makeObject(PoolingModelProvider.java:96) - at org.eclipse.recommenders.models.PoolingModelProvider$ModelPoolFactoryMediator.makeObject(PoolingModelProvider.java:1) - at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220) - at org.eclipse.recommenders.models.PoolingModelProvider.acquireModel(PoolingModelProvider.java:67) - at org.eclipse.recommenders.internal.calls.rcp.RcpCallModelProvider.acquireModel(RcpCallModelProvider.java:65) - at org.eclipse.recommenders.internal.calls.rcp.RcpCallModelProvider.acquireModel(RcpCallModelProvider.java:1) - at org.eclipse.recommenders.internal.models.rcp.PrefetchModelArchiveJob.run(PrefetchModelArchiveJob.java:43) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) - -!ENTRY org.eclipse.ui 4 0 2017-10-09 02:49:46.268 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 02:55:47.677 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 02:55:55.175 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 02:55:55.635 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 03:19:46.116 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: Graphic is disposed - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.SWT.error(SWT.java:4419) - at org.eclipse.swt.graphics.Font.getFontData(Font.java:192) - at org.eclipse.swt.custom.CTabFolderRenderer.drawChevron(CTabFolderRenderer.java:909) - at org.eclipse.swt.custom.CTabFolderRenderer.draw(CTabFolderRenderer.java:605) - at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.draw(CTabRendering.java:251) - at org.eclipse.swt.custom.CTabFolder.createButtonImage(CTabFolder.java:747) - at org.eclipse.swt.custom.CTabFolder.setButtonBounds(CTabFolder.java:2561) - at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3786) - at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3717) - at org.eclipse.swt.custom.CTabFolder.onResize(CTabFolder.java:2110) - at org.eclipse.swt.custom.CTabFolder.lambda$0(CTabFolder.java:335) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.sendResize(Control.java:3087) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1035) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:283) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:228) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:145) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.swt.custom.StackLayout.layout(StackLayout.java:123) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:283) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:228) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:145) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.EndDeferWindowPos(Native Method) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:1007) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:973) - at org.eclipse.swt.widgets.Composite.setResizeChildren(Composite.java:1187) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1778) - at org.eclipse.swt.widgets.Canvas.WM_SIZE(Canvas.java:492) - at org.eclipse.swt.widgets.Decorations.WM_SIZE(Decorations.java:1850) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Canvas.WM_WINDOWPOSCHANGED(Canvas.java:499) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetMenu(Native Method) - at org.eclipse.swt.widgets.Decorations.setMenuBar(Decorations.java:1188) - at org.eclipse.swt.widgets.Menu.releaseParent(Menu.java:1206) - at org.eclipse.swt.widgets.Widget.release(Widget.java:844) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.disposeWidget(SWTPartRenderer.java:172) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeRemoveGui(PartRenderingEngine.java:935) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$1(PartRenderingEngine.java:863) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:858) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:842) - at org.eclipse.ui.internal.WorkbenchWindow$1.handleEvent(WorkbenchWindow.java:328) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:147) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.lambda$0(SWTPartRenderer.java:136) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Widget.release(Widget.java:836) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:460) - at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) - at org.eclipse.swt.widgets.Display.release(Display.java:3868) - at org.eclipse.swt.graphics.Device.dispose(Device.java:298) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3351) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:224) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:164) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4420) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3364) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:224) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.preWindowShellClose(IDEWorkbenchWindowAdvisor.java:168) - at org.eclipse.ui.internal.WorkbenchWindow$6.close(WorkbenchWindow.java:530) - at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer$3.shellClosed(WBWRenderer.java:615) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:99) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1088) - at org.eclipse.swt.widgets.Decorations.closeWidget(Decorations.java:316) - at org.eclipse.swt.widgets.Decorations.WM_CLOSE(Decorations.java:1729) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4845) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2560) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3815) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) - -!ENTRY org.eclipse.e4.ui.css.swt.theme 4 0 2017-10-09 03:19:46.209 -!MESSAGE Graphic is disposed -!STACK 0 -org.eclipse.swt.SWTException: Graphic is disposed - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.SWT.error(SWT.java:4419) - at org.eclipse.swt.graphics.Font.getFontData(Font.java:192) - at org.eclipse.e4.ui.css.swt.helpers.CSSSWTFontHelper.getFirstFontData(CSSSWTFontHelper.java:459) - at org.eclipse.e4.ui.css.swt.properties.converters.CSSValueSWTFontDataConverterImpl.convert(CSSValueSWTFontDataConverterImpl.java:59) - at org.eclipse.e4.ui.css.swt.properties.converters.CSSValueSWTFontConverterImpl.convert(CSSValueSWTFontConverterImpl.java:34) - at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.convert(AbstractCSSEngine.java:1124) - at org.eclipse.e4.ui.css.swt.properties.css2.CSSPropertyFontSWTHandler.onAllCSSPropertiesApplyed(CSSPropertyFontSWTHandler.java:251) - at org.eclipse.e4.ui.css.core.dom.properties.ICSSPropertyHandler2.onAllCSSPropertiesApplyed(ICSSPropertyHandler2.java:44) - at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyleDeclaration(AbstractCSSEngine.java:581) - at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:426) - at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:367) - at org.eclipse.e4.ui.css.swt.engine.CSSSWTApplyStylesListener$1.handleEvent(CSSSWTApplyStylesListener.java:32) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4420) - at org.eclipse.swt.widgets.Display.runSkin(Display.java:4321) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1361) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:283) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:228) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:145) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.swt.custom.StackLayout.layout(StackLayout.java:123) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:283) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:228) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:145) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.EndDeferWindowPos(Native Method) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:1007) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:973) - at org.eclipse.swt.widgets.Composite.setResizeChildren(Composite.java:1187) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1778) - at org.eclipse.swt.widgets.Canvas.WM_SIZE(Canvas.java:492) - at org.eclipse.swt.widgets.Decorations.WM_SIZE(Decorations.java:1850) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Canvas.WM_WINDOWPOSCHANGED(Canvas.java:499) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetMenu(Native Method) - at org.eclipse.swt.widgets.Decorations.setMenuBar(Decorations.java:1188) - at org.eclipse.swt.widgets.Menu.releaseParent(Menu.java:1206) - at org.eclipse.swt.widgets.Widget.release(Widget.java:844) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.disposeWidget(SWTPartRenderer.java:172) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeRemoveGui(PartRenderingEngine.java:935) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$1(PartRenderingEngine.java:863) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:858) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:842) - at org.eclipse.ui.internal.WorkbenchWindow$1.handleEvent(WorkbenchWindow.java:328) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:147) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.lambda$0(SWTPartRenderer.java:136) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Widget.release(Widget.java:836) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:460) - at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) - at org.eclipse.swt.widgets.Display.release(Display.java:3868) - at org.eclipse.swt.graphics.Device.dispose(Device.java:298) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3351) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:224) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:164) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4420) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3364) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:224) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.preWindowShellClose(IDEWorkbenchWindowAdvisor.java:168) - at org.eclipse.ui.internal.WorkbenchWindow$6.close(WorkbenchWindow.java:530) - at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer$3.shellClosed(WBWRenderer.java:615) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:99) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1088) - at org.eclipse.swt.widgets.Decorations.closeWidget(Decorations.java:316) - at org.eclipse.swt.widgets.Decorations.WM_CLOSE(Decorations.java:1729) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4845) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2560) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3815) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) - -!ENTRY org.eclipse.ui 4 0 2017-10-09 03:19:46.298 -!MESSAGE Unhandled event loop exception -!STACK 0 -java.lang.NullPointerException - at org.eclipse.ui.internal.NavigationHistory.getDisplay(NavigationHistory.java:176) - at org.eclipse.ui.internal.NavigationHistory.markEditor(NavigationHistory.java:193) - at org.eclipse.ui.internal.WorkbenchPage.updateActiveEditorSources(WorkbenchPage.java:418) - at org.eclipse.ui.internal.WorkbenchPage.firePartClosed(WorkbenchPage.java:5177) - at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.lambda$0(CompatibilityPart.java:104) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:147) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.lambda$0(SWTPartRenderer.java:136) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Widget.release(Widget.java:836) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:171) - at org.eclipse.swt.widgets.Decorations.releaseChildren(Decorations.java:808) - at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:1368) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:460) - at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) - at org.eclipse.swt.widgets.Display.release(Display.java:3868) - at org.eclipse.swt.graphics.Device.dispose(Device.java:298) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3351) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:224) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:164) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4420) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3364) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:224) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.preWindowShellClose(IDEWorkbenchWindowAdvisor.java:168) - at org.eclipse.ui.internal.WorkbenchWindow$6.close(WorkbenchWindow.java:530) - at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer$3.shellClosed(WBWRenderer.java:615) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:99) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1088) - at org.eclipse.swt.widgets.Decorations.closeWidget(Decorations.java:316) - at org.eclipse.swt.widgets.Decorations.WM_CLOSE(Decorations.java:1729) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4845) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2560) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3815) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -!SESSION 2017-10-09 03:26:53.247 ----------------------------------------------- -eclipse.buildId=4.7.1.M20170906-1700 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.core.resources 2 10035 2017-10-09 03:27:59.231 -!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. -!SESSION 2017-10-09 03:28:15.680 ----------------------------------------------- -eclipse.buildId=4.7.1.M20170906-1700 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.core.resources 2 10035 2017-10-09 03:28:19.039 -!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. - -!ENTRY org.eclipse.egit.ui 2 0 2017-10-09 03:29:00.768 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.ui 4 0 2017-10-09 03:29:48.307 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 03:29:50.051 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.jface.text 2 0 2017-10-09 03:35:50.141 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-10-09 03:35:50.142 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.recommenders.models.rcp 1 11 2017-10-09 03:35:51.579 -!MESSAGE The model index service was accessed either before it started or after it finished running. -!STACK 0 -org.eclipse.recommenders.utils.Logs$LogTraceException - at org.eclipse.recommenders.utils.Logs$LogTraceException.newTrace(Logs.java:381) - at org.eclipse.recommenders.utils.Logs.log(Logs.java:134) - at org.eclipse.recommenders.utils.Logs.log(Logs.java:126) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelIndex.suggest(EclipseModelIndex.java:211) - at org.eclipse.recommenders.models.SimpleModelProvider.acquireModel(SimpleModelProvider.java:70) - at org.eclipse.recommenders.models.PoolingModelProvider.access$0(PoolingModelProvider.java:1) - at org.eclipse.recommenders.models.PoolingModelProvider$ModelPoolFactoryMediator.makeObject(PoolingModelProvider.java:96) - at org.eclipse.recommenders.models.PoolingModelProvider$ModelPoolFactoryMediator.makeObject(PoolingModelProvider.java:1) - at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220) - at org.eclipse.recommenders.models.PoolingModelProvider.acquireModel(PoolingModelProvider.java:67) - at org.eclipse.recommenders.internal.calls.rcp.RcpCallModelProvider.acquireModel(RcpCallModelProvider.java:65) - at org.eclipse.recommenders.internal.calls.rcp.RcpCallModelProvider.acquireModel(RcpCallModelProvider.java:1) - at org.eclipse.recommenders.internal.models.rcp.PrefetchModelArchiveJob.run(PrefetchModelArchiveJob.java:43) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) - -!ENTRY org.eclipse.ui 4 0 2017-10-09 03:47:44.309 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 03:47:44.745 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more -!SESSION 2017-10-09 03:58:11.782 ----------------------------------------------- -eclipse.buildId=4.7.1.M20170906-1700 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-10-09 03:58:20.895 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.ui 4 0 2017-10-09 04:28:57.719 -!MESSAGE Unhandled event loop exception -!STACK 0 -java.lang.IllegalArgumentException: Argument not valid - at org.eclipse.swt.SWT.error(SWT.java:4514) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.SWT.error(SWT.java:4419) - at org.eclipse.swt.graphics.GC.setForeground(GC.java:4639) - at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.drawBackground(CTabRendering.java:1075) - at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.drawUnselectedTabBackground(CTabRendering.java:1008) - at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.drawCustomBackground(CTabRendering.java:990) - at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.draw(CTabRendering.java:218) - at org.eclipse.swt.custom.CTabFolder.updateBkImages(CTabFolder.java:3876) - at org.eclipse.swt.custom.CTabFolder.setButtonBounds(CTabFolder.java:2611) - at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3786) - at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3717) - at org.eclipse.swt.custom.CTabFolder.onResize(CTabFolder.java:2110) - at org.eclipse.swt.custom.CTabFolder.lambda$0(CTabFolder.java:335) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.sendResize(Control.java:3087) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1035) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:283) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:228) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:145) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.swt.custom.StackLayout.layout(StackLayout.java:123) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:283) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:228) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:145) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.EndDeferWindowPos(Native Method) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:1007) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:973) - at org.eclipse.swt.widgets.Composite.setResizeChildren(Composite.java:1187) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1778) - at org.eclipse.swt.widgets.Canvas.WM_SIZE(Canvas.java:492) - at org.eclipse.swt.widgets.Decorations.WM_SIZE(Decorations.java:1850) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Canvas.WM_WINDOWPOSCHANGED(Canvas.java:499) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetMenu(Native Method) - at org.eclipse.swt.widgets.Decorations.setMenuBar(Decorations.java:1188) - at org.eclipse.swt.widgets.Menu.releaseParent(Menu.java:1206) - at org.eclipse.swt.widgets.Widget.release(Widget.java:844) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.disposeWidget(SWTPartRenderer.java:172) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeRemoveGui(PartRenderingEngine.java:935) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$1(PartRenderingEngine.java:863) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:858) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:842) - at org.eclipse.ui.internal.WorkbenchWindow$1.handleEvent(WorkbenchWindow.java:328) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:147) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.lambda$0(SWTPartRenderer.java:136) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Widget.release(Widget.java:836) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:460) - at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) - at org.eclipse.swt.widgets.Display.release(Display.java:3868) - at org.eclipse.swt.graphics.Device.dispose(Device.java:298) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3351) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:224) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:164) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4420) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3364) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) - -!ENTRY org.eclipse.e4.ui.css.swt.theme 4 0 2017-10-09 04:28:57.722 -!MESSAGE Graphic is disposed -!STACK 0 -org.eclipse.swt.SWTException: Graphic is disposed - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.SWT.error(SWT.java:4419) - at org.eclipse.swt.graphics.Font.getFontData(Font.java:192) - at org.eclipse.e4.ui.css.swt.helpers.CSSSWTFontHelper.getFirstFontData(CSSSWTFontHelper.java:459) - at org.eclipse.e4.ui.css.swt.properties.converters.CSSValueSWTFontDataConverterImpl.convert(CSSValueSWTFontDataConverterImpl.java:59) - at org.eclipse.e4.ui.css.swt.properties.converters.CSSValueSWTFontConverterImpl.convert(CSSValueSWTFontConverterImpl.java:34) - at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.convert(AbstractCSSEngine.java:1124) - at org.eclipse.e4.ui.css.swt.properties.css2.CSSPropertyFontSWTHandler.onAllCSSPropertiesApplyed(CSSPropertyFontSWTHandler.java:251) - at org.eclipse.e4.ui.css.core.dom.properties.ICSSPropertyHandler2.onAllCSSPropertiesApplyed(ICSSPropertyHandler2.java:44) - at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyleDeclaration(AbstractCSSEngine.java:581) - at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:426) - at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:367) - at org.eclipse.e4.ui.css.swt.engine.CSSSWTApplyStylesListener$1.handleEvent(CSSSWTApplyStylesListener.java:32) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4420) - at org.eclipse.swt.widgets.Display.runSkin(Display.java:4321) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1361) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:283) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:228) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:145) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1039) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1085) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.swt.custom.StackLayout.layout(StackLayout.java:123) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3337) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3333) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:283) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:228) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:271) - at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:145) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) - at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3304) - at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1079) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3265) - at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3261) - at org.eclipse.swt.widgets.Control.setBounds(Control.java:3256) - at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) - at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1363) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1774) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.EndDeferWindowPos(Native Method) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:1007) - at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:973) - at org.eclipse.swt.widgets.Composite.setResizeChildren(Composite.java:1187) - at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1778) - at org.eclipse.swt.widgets.Canvas.WM_SIZE(Canvas.java:492) - at org.eclipse.swt.widgets.Decorations.WM_SIZE(Decorations.java:1850) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4918) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5743) - at org.eclipse.swt.widgets.Canvas.WM_WINDOWPOSCHANGED(Canvas.java:499) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4931) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.SetMenu(Native Method) - at org.eclipse.swt.widgets.Decorations.setMenuBar(Decorations.java:1188) - at org.eclipse.swt.widgets.Menu.releaseParent(Menu.java:1206) - at org.eclipse.swt.widgets.Widget.release(Widget.java:844) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.disposeWidget(SWTPartRenderer.java:172) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeRemoveGui(PartRenderingEngine.java:935) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$1(PartRenderingEngine.java:863) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:858) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:842) - at org.eclipse.ui.internal.WorkbenchWindow$1.handleEvent(WorkbenchWindow.java:328) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:147) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.lambda$0(SWTPartRenderer.java:136) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Widget.release(Widget.java:836) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:460) - at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) - at org.eclipse.swt.widgets.Display.release(Display.java:3868) - at org.eclipse.swt.graphics.Device.dispose(Device.java:298) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3351) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:224) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:164) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4420) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3364) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) - -!ENTRY org.eclipse.ui 4 0 2017-10-09 04:28:57.782 -!MESSAGE Unhandled event loop exception -!STACK 0 -java.lang.NullPointerException - at org.eclipse.ui.internal.NavigationHistory.getDisplay(NavigationHistory.java:176) - at org.eclipse.ui.internal.NavigationHistory.markEditor(NavigationHistory.java:193) - at org.eclipse.ui.internal.WorkbenchPage.updateActiveEditorSources(WorkbenchPage.java:418) - at org.eclipse.ui.internal.WorkbenchPage.firePartClosed(WorkbenchPage.java:5177) - at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.lambda$0(CompatibilityPart.java:104) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:147) - at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.lambda$0(SWTPartRenderer.java:136) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Widget.release(Widget.java:836) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:929) - at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:171) - at org.eclipse.swt.widgets.Decorations.releaseChildren(Decorations.java:808) - at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:1368) - at org.eclipse.swt.widgets.Widget.release(Widget.java:839) - at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) - at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:460) - at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) - at org.eclipse.swt.widgets.Display.release(Display.java:3868) - at org.eclipse.swt.graphics.Device.dispose(Device.java:298) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3351) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:224) - at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:164) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4420) - at org.eclipse.swt.widgets.Display.messageProc(Display.java:3364) - at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) - at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2555) - at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4941) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5191) - at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) - at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3152) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3812) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -!SESSION 2017-10-09 12:23:22.766 ----------------------------------------------- -eclipse.buildId=4.7.1.M20170906-1700 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.core.resources 2 10035 2017-10-09 12:24:05.736 -!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. - -!ENTRY org.eclipse.egit.ui 2 0 2017-10-09 12:24:39.357 -!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git -user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is -not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and -EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.jface.text 2 0 2017-10-09 13:24:15.330 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-10-09 13:24:15.340 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.recommenders.models.rcp 1 11 2017-10-09 13:24:17.325 -!MESSAGE The model index service was accessed either before it started or after it finished running. -!STACK 0 -org.eclipse.recommenders.utils.Logs$LogTraceException - at org.eclipse.recommenders.utils.Logs$LogTraceException.newTrace(Logs.java:381) - at org.eclipse.recommenders.utils.Logs.log(Logs.java:134) - at org.eclipse.recommenders.utils.Logs.log(Logs.java:126) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelIndex.suggest(EclipseModelIndex.java:211) - at org.eclipse.recommenders.models.SimpleModelProvider.acquireModel(SimpleModelProvider.java:70) - at org.eclipse.recommenders.models.PoolingModelProvider.access$0(PoolingModelProvider.java:1) - at org.eclipse.recommenders.models.PoolingModelProvider$ModelPoolFactoryMediator.makeObject(PoolingModelProvider.java:96) - at org.eclipse.recommenders.models.PoolingModelProvider$ModelPoolFactoryMediator.makeObject(PoolingModelProvider.java:1) - at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220) - at org.eclipse.recommenders.models.PoolingModelProvider.acquireModel(PoolingModelProvider.java:67) - at org.eclipse.recommenders.internal.calls.rcp.RcpCallModelProvider.acquireModel(RcpCallModelProvider.java:65) - at org.eclipse.recommenders.internal.calls.rcp.RcpCallModelProvider.acquireModel(RcpCallModelProvider.java:1) - at org.eclipse.recommenders.internal.models.rcp.PrefetchModelArchiveJob.run(PrefetchModelArchiveJob.java:43) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) - -!ENTRY org.eclipse.ui 4 0 2017-10-09 13:26:12.746 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 13:46:46.332 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 13:46:47.154 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 13:47:00.323 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more diff --git a/.metadata/.log b/.metadata/.log index 3ab478e..7ee3c95 100644 --- a/.metadata/.log +++ b/.metadata/.log @@ -1,7060 +1,3697 @@ -!SESSION 2017-10-09 12:23:22.766 ----------------------------------------------- -eclipse.buildId=4.7.1.M20170906-1700 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -This is a continuation of log file E:\Study\java\judt\.metadata\.bak_0.log -Created Time: 2017-10-09 13:47:08.029 - -!ENTRY org.eclipse.ui 4 0 2017-10-09 13:47:08.029 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 13:49:08.542 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 13:49:09.058 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 13:50:54.108 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 13:52:17.664 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 13:52:18.280 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 14:13:10.983 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 14:17:09.379 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 14:29:14.333 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 14:29:34.591 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 14:38:32.078 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 14:38:32.671 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 14:57:37.419 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 14:57:38.125 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 15:02:50.589 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.jface.text 2 0 2017-10-09 15:55:44.589 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-10-09 15:55:44.636 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.ui 4 0 2017-10-09 16:03:33.835 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 16:13:24.643 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 16:57:04.155 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 16:57:05.015 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 16:57:26.566 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 17:14:09.785 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 17:14:10.390 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 17:14:13.253 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 17:14:13.847 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 18:00:20.847 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 18:00:31.569 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 18:00:32.007 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 18:07:57.792 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 18:15:07.934 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 18:15:08.455 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 18:16:53.709 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 18:16:54.167 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 18:18:38.417 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 18:18:42.380 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 18:20:06.052 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 18:33:51.137 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 18:33:51.747 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 18:39:24.811 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 18:41:45.570 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 18:41:46.128 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 18:58:17.033 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 19:06:34.863 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 19:34:28.184 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 19:34:33.965 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 19:38:44.884 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 19:38:45.444 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 19:41:48.159 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 19:42:06.203 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 19:42:06.581 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-09 19:47:48.991 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more -!SESSION 2017-10-09 22:24:42.294 ----------------------------------------------- -eclipse.buildId=4.7.1.M20170906-1700 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-10-09 22:26:41.384 +!SESSION 2017-03-21 20:36:59.126 ----------------------------------------------- +eclipse.buildId=4.6.2.M20161124-1400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-03-21 20:37:57.050 !MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.jface.text 2 0 2017-10-10 01:05:25.880 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-10-10 01:05:25.881 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.recommenders.models.rcp 1 11 2017-10-10 01:05:27.692 -!MESSAGE The model index service was accessed either before it started or after it finished running. -!STACK 0 -org.eclipse.recommenders.utils.Logs$LogTraceException - at org.eclipse.recommenders.utils.Logs$LogTraceException.newTrace(Logs.java:381) - at org.eclipse.recommenders.utils.Logs.log(Logs.java:134) - at org.eclipse.recommenders.utils.Logs.log(Logs.java:126) - at org.eclipse.recommenders.internal.models.rcp.EclipseModelIndex.suggest(EclipseModelIndex.java:211) - at org.eclipse.recommenders.models.SimpleModelProvider.acquireModel(SimpleModelProvider.java:70) - at org.eclipse.recommenders.models.PoolingModelProvider.access$0(PoolingModelProvider.java:1) - at org.eclipse.recommenders.models.PoolingModelProvider$ModelPoolFactoryMediator.makeObject(PoolingModelProvider.java:96) - at org.eclipse.recommenders.models.PoolingModelProvider$ModelPoolFactoryMediator.makeObject(PoolingModelProvider.java:1) - at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220) - at org.eclipse.recommenders.models.PoolingModelProvider.acquireModel(PoolingModelProvider.java:67) - at org.eclipse.recommenders.internal.calls.rcp.RcpCallModelProvider.acquireModel(RcpCallModelProvider.java:65) - at org.eclipse.recommenders.internal.calls.rcp.RcpCallModelProvider.acquireModel(RcpCallModelProvider.java:1) - at org.eclipse.recommenders.internal.models.rcp.PrefetchModelArchiveJob.run(PrefetchModelArchiveJob.java:43) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -!SESSION 2017-10-10 01:50:34.552 ----------------------------------------------- -eclipse.buildId=4.7.1.M20170906-1700 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-10-10 01:50:46.886 +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-03-22 19:42:10.566 ----------------------------------------------- +eclipse.buildId=4.6.2.M20161124-1400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-03-22 19:43:05.670 !MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.jface.text 2 0 2017-10-10 02:20:50.867 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-10-10 02:20:50.867 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' -!SESSION 2017-10-10 02:29:51.177 ----------------------------------------------- -eclipse.buildId=4.7.1.M20170906-1700 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-10-10 02:30:07.325 +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-03-22 20:24:11.451 ----------------------------------------------- +eclipse.buildId=4.6.2.M20161124-1400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-03-22 20:25:27.553 !MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.jface.text 2 0 2017-10-10 03:38:20.386 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-10-10 03:38:20.388 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' -!SESSION 2017-10-10 12:56:08.786 ----------------------------------------------- -eclipse.buildId=4.7.1.M20170906-1700 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-10-10 13:00:43.436 +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-03-24 02:26:49.142 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-03-24 02:28:34.087 !MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. -!SESSION 2017-10-10 13:42:15.633 ----------------------------------------------- -eclipse.buildId=4.7.1.M20170906-1700 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-10-10 13:42:25.865 +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. + +!ENTRY org.eclipse.e4.ui.workbench 2 0 2017-03-24 02:28:35.379 +!MESSAGE Removing part descriptor with the 'org.eclipse.wb.core.StructureView' id and the 'Structure' description. Points to the invalid 'bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView' class. + +!ENTRY org.eclipse.e4.ui.workbench 2 0 2017-03-24 02:28:35.380 +!MESSAGE Removing part descriptor with the 'org.eclipse.wb.core.PaletteView' id and the 'Palette' description. Points to the invalid 'bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView' class. + +!ENTRY org.eclipse.equinox.p2.transport.ecf 2 0 2017-03-24 02:50:40.841 +!MESSAGE Connection to http://mirror.ufs.ac.za/eclipse/releases/neon/201612211000/features/org.eclipse.wb.core.java.feature_1.9.0.jar failed on Connection timed out: connect. Retry attempt 0 started +!STACK 0 +java.net.ConnectException: Connection timed out: connect + at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) + at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) + at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) + at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) + at java.net.AbstractPlainSocketImpl.connect(Unknown Source) + at java.net.PlainSocketImpl.connect(Unknown Source) + at java.net.SocksSocketImpl.connect(Unknown Source) + at java.net.Socket.connect(Unknown Source) + at org.eclipse.ecf.internal.provider.filetransfer.httpclient4.ECFHttpClientProtocolSocketFactory.connectSocket(ECFHttpClientProtocolSocketFactory.java:86) + at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177) + at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144) + at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:131) + at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611) + at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446) + at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863) + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) + at org.eclipse.ecf.provider.filetransfer.httpclient4.HttpClientRetrieveFileTransfer.performConnect(HttpClientRetrieveFileTransfer.java:1084) + at org.eclipse.ecf.provider.filetransfer.httpclient4.HttpClientRetrieveFileTransfer.access$0(HttpClientRetrieveFileTransfer.java:1075) + at org.eclipse.ecf.provider.filetransfer.httpclient4.HttpClientRetrieveFileTransfer$1.performFileTransfer(HttpClientRetrieveFileTransfer.java:1071) + at org.eclipse.ecf.filetransfer.FileTransferJob.run(FileTransferJob.java:74) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) +!SESSION 2017-03-24 03:12:38.610 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -data file:/D:/jinyu/udt-java/ -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-03-24 08:01:57.906 !MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.jface.text 2 0 2017-10-10 13:56:22.280 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-10-10 13:56:22.281 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.ui 4 0 2017-10-10 16:54:00.854 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-10 16:54:25.730 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-10 16:54:26.169 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-10 17:03:56.819 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-10 17:04:00.948 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-10 17:40:17.833 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.jface.text 2 0 2017-10-10 17:40:47.310 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-10-10 17:40:47.312 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.ui 4 0 2017-10-10 18:12:36.668 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-10 18:12:56.341 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-10 18:15:18.030 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-10 18:26:10.217 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-10 18:26:21.050 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-10 18:26:21.541 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.jdt.debug 4 125 2017-10-10 19:21:24.419 -!MESSAGE Internal error logged from JDI Debug: -!STACK 1 -org.eclipse.debug.core.DebugException: Invalid stack frame - at org.eclipse.jdt.internal.debug.core.model.JDIStackFrame.getUnderlyingStackFrame(JDIStackFrame.java:1196) - at org.eclipse.jdt.internal.debug.core.model.JDIStackFrame.getUnderlyingThisObject(JDIStackFrame.java:834) - at org.eclipse.jdt.internal.debug.core.model.JDIStackFrame.getThis(JDIStackFrame.java:1250) - at org.eclipse.jdt.internal.debug.ui.JavaDebugHover.getHoverInfo2(JavaDebugHover.java:372) - at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:164) - at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:130) - at org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.getHoverInfo2(JavaEditorTextHoverProxy.java:86) - at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:166) -!SUBENTRY 1 org.eclipse.jdt.debug 4 100 2017-10-10 19:21:24.479 -!MESSAGE Invalid stack frame -!SESSION 2017-10-10 22:45:03.292 ----------------------------------------------- -eclipse.buildId=4.7.1.M20170906-1700 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.e4.ui.workbench 4 0 2017-10-10 22:49:11.958 -!MESSAGE Unable to load resource file:/E:/Study/java/judt/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi -!STACK 0 -org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.xml.sax.SAXParseExceptionpublicId: file:/E:/Study/java/judt/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi; systemId: file:/E:/Study/java/judt/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。 - at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319) - at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278) - at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406) - at org.eclipse.e4.ui.internal.workbench.ResourceHandler.getResource(ResourceHandler.java:286) - at org.eclipse.e4.ui.internal.workbench.ResourceHandler.loadResource(ResourceHandler.java:262) - at org.eclipse.e4.ui.internal.workbench.ResourceHandler.loadMostRecentModel(ResourceHandler.java:169) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application.loadApplicationModel(E4Application.java:378) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:253) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:614) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.xml.sax.SAXParseExceptionpublicId: file:/E:/Study/java/judt/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi; systemId: file:/E:/Study/java/judt/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。 - at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) - at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source) - at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175) - at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:261) - at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1518) - at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1297) - at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259) - at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274) - ... 23 more - -!ENTRY org.eclipse.e4.ui.workbench 4 0 2017-10-10 22:49:12.988 -!MESSAGE The persisted application model has no top-level window. Reinitializing with the default application model. -!STACK 0 -java.lang.Exception - at org.eclipse.e4.ui.internal.workbench.ResourceHandler.loadMostRecentModel(ResourceHandler.java:174) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application.loadApplicationModel(E4Application.java:378) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:253) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:614) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) - -!ENTRY org.eclipse.egit.ui 2 0 2017-10-10 22:50:56.469 +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-03-24 08:05:50.970 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -data file:/D:/jinyu/udt-java/ -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-03-24 08:06:24.151 !MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.jdt.ui 4 10001 2017-10-10 22:50:58.375 -!MESSAGE Internal Error -!STACK 1 -org.eclipse.jdt.internal.ui.JavaUIException: Problems reading information from XML 'OpenTypeHistory.xml' - at org.eclipse.jdt.internal.corext.util.History.createException(History.java:74) - at org.eclipse.jdt.internal.corext.util.History.load(History.java:263) - at org.eclipse.jdt.internal.corext.util.History.load(History.java:171) - at org.eclipse.jdt.internal.corext.util.OpenTypeHistory.(OpenTypeHistory.java:200) - at org.eclipse.jdt.internal.corext.util.OpenTypeHistory.getInstance(OpenTypeHistory.java:186) - at org.eclipse.jdt.internal.ui.JavaPlugin.initializeAfterLoad(JavaPlugin.java:420) - at org.eclipse.jdt.internal.ui.InitializeAfterLoadJob$RealJob.run(InitializeAfterLoadJob.java:37) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。 - at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) - at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) - at org.eclipse.jdt.internal.corext.util.History.load(History.java:261) - ... 6 more -!SUBENTRY 1 org.eclipse.jdt.ui 4 4 2017-10-10 22:50:58.375 -!MESSAGE Problems reading information from XML 'OpenTypeHistory.xml' -!STACK 0 -org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。 - at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) - at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) - at org.eclipse.jdt.internal.corext.util.History.load(History.java:261) - at org.eclipse.jdt.internal.corext.util.History.load(History.java:171) - at org.eclipse.jdt.internal.corext.util.OpenTypeHistory.(OpenTypeHistory.java:200) - at org.eclipse.jdt.internal.corext.util.OpenTypeHistory.getInstance(OpenTypeHistory.java:186) - at org.eclipse.jdt.internal.ui.JavaPlugin.initializeAfterLoad(JavaPlugin.java:420) - at org.eclipse.jdt.internal.ui.InitializeAfterLoadJob$RealJob.run(InitializeAfterLoadJob.java:37) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) - -!ENTRY org.eclipse.jdt.ui 4 10001 2017-10-10 22:51:46.179 -!MESSAGE Internal Error -!STACK 1 -org.eclipse.jdt.internal.ui.JavaUIException: Problems reading information from XML 'QualifiedTypeNameHistory.xml' - at org.eclipse.jdt.internal.corext.util.History.createException(History.java:74) - at org.eclipse.jdt.internal.corext.util.History.load(History.java:263) - at org.eclipse.jdt.internal.corext.util.History.load(History.java:171) - at org.eclipse.jdt.internal.corext.util.QualifiedTypeNameHistory.(QualifiedTypeNameHistory.java:33) - at org.eclipse.jdt.internal.corext.util.QualifiedTypeNameHistory.getDefault(QualifiedTypeNameHistory.java:26) - at org.eclipse.jdt.internal.ui.JavaPlugin.stop(JavaPlugin.java:511) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:835) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1) - at java.security.AccessController.doPrivileged(Native Method) - at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:828) - at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:947) - at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1669) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1588) - at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165) - at java.lang.Thread.run(Unknown Source) -Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。 - at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) - at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) - at org.eclipse.jdt.internal.corext.util.History.load(History.java:261) - ... 21 more -!SUBENTRY 1 org.eclipse.jdt.ui 4 4 2017-10-10 22:51:46.180 -!MESSAGE Problems reading information from XML 'QualifiedTypeNameHistory.xml' -!STACK 0 -org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。 - at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) - at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) - at org.eclipse.jdt.internal.corext.util.History.load(History.java:261) - at org.eclipse.jdt.internal.corext.util.History.load(History.java:171) - at org.eclipse.jdt.internal.corext.util.QualifiedTypeNameHistory.(QualifiedTypeNameHistory.java:33) - at org.eclipse.jdt.internal.corext.util.QualifiedTypeNameHistory.getDefault(QualifiedTypeNameHistory.java:26) - at org.eclipse.jdt.internal.ui.JavaPlugin.stop(JavaPlugin.java:511) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:835) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1) - at java.security.AccessController.doPrivileged(Native Method) - at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:828) - at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:947) - at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1669) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1588) - at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165) - at java.lang.Thread.run(Unknown Source) - -!ENTRY org.eclipse.core.jobs 4 2 2017-10-10 22:51:46.790 -!MESSAGE An internal error occurred during: "Setting VM arguments". -!STACK 0 -java.lang.NullPointerException - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolveVariables(AbstractBundleContainer.java:64) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveHomeLocation(ProfileBundleContainer.java:210) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.getLocation(ProfileBundleContainer.java:73) - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.getVMArguments(AbstractBundleContainer.java:230) - at org.eclipse.pde.internal.core.target.TargetPlatformService.getVMArguments(TargetPlatformService.java:637) - at org.eclipse.pde.internal.core.target.TargetPlatformService.access$0(TargetPlatformService.java:634) - at org.eclipse.pde.internal.core.target.TargetPlatformService$2.run(TargetPlatformService.java:617) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) - -!ENTRY org.eclipse.pde.core 4 0 2017-10-10 22:51:46.842 -!MESSAGE FrameworkEvent ERROR -!STACK 0 -org.osgi.framework.BundleException: Exception in org.eclipse.pde.internal.core.PDECore.stop() of bundle org.eclipse.pde.core. - at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:855) - at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:947) - at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1669) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1588) - at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165) - at java.lang.Thread.run(Unknown Source) -Caused by: java.lang.NullPointerException - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolveVariables(AbstractBundleContainer.java:64) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveHomeLocation(ProfileBundleContainer.java:210) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveBundles(ProfileBundleContainer.java:94) - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolve(AbstractBundleContainer.java:81) - at org.eclipse.pde.internal.core.target.TargetDefinition.resolve(TargetDefinition.java:282) - at org.eclipse.pde.internal.core.TargetPlatformHelper.getWorkspaceTargetResolved(TargetPlatformHelper.java:485) - at org.eclipse.pde.internal.core.PluginModelManager.getExternalBundles(PluginModelManager.java:615) - at org.eclipse.pde.internal.core.PluginModelManager.initializeTable(PluginModelManager.java:539) - at org.eclipse.pde.internal.core.PluginModelManager.getEntryTable(PluginModelManager.java:482) - at org.eclipse.pde.internal.core.PluginModelManager.findEntry(PluginModelManager.java:976) - at org.eclipse.pde.internal.core.PluginModelManager.findModel(PluginModelManager.java:1000) - at org.eclipse.pde.core.plugin.PluginRegistry.findModel(PluginRegistry.java:97) - at org.eclipse.pde.internal.core.JavaElementChangeListener.save(JavaElementChangeListener.java:129) - at org.eclipse.pde.internal.core.JavaElementChangeListener.shutdown(JavaElementChangeListener.java:41) - at org.eclipse.pde.internal.core.PDECore.stop(PDECore.java:312) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:835) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1) - at java.security.AccessController.doPrivileged(Native Method) - at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:828) - ... 13 more -Root exception: -java.lang.NullPointerException - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolveVariables(AbstractBundleContainer.java:64) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveHomeLocation(ProfileBundleContainer.java:210) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveBundles(ProfileBundleContainer.java:94) - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolve(AbstractBundleContainer.java:81) - at org.eclipse.pde.internal.core.target.TargetDefinition.resolve(TargetDefinition.java:282) - at org.eclipse.pde.internal.core.TargetPlatformHelper.getWorkspaceTargetResolved(TargetPlatformHelper.java:485) - at org.eclipse.pde.internal.core.PluginModelManager.getExternalBundles(PluginModelManager.java:615) - at org.eclipse.pde.internal.core.PluginModelManager.initializeTable(PluginModelManager.java:539) - at org.eclipse.pde.internal.core.PluginModelManager.getEntryTable(PluginModelManager.java:482) - at org.eclipse.pde.internal.core.PluginModelManager.findEntry(PluginModelManager.java:976) - at org.eclipse.pde.internal.core.PluginModelManager.findModel(PluginModelManager.java:1000) - at org.eclipse.pde.core.plugin.PluginRegistry.findModel(PluginRegistry.java:97) - at org.eclipse.pde.internal.core.JavaElementChangeListener.save(JavaElementChangeListener.java:129) - at org.eclipse.pde.internal.core.JavaElementChangeListener.shutdown(JavaElementChangeListener.java:41) - at org.eclipse.pde.internal.core.PDECore.stop(PDECore.java:312) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:835) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1) - at java.security.AccessController.doPrivileged(Native Method) - at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:828) - at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:947) - at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1669) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1588) - at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165) - at java.lang.Thread.run(Unknown Source) - -!ENTRY org.eclipse.core.jobs 2 2 2017-10-10 22:51:50.172 -!MESSAGE Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.Workbench$40 -!SESSION 2017-10-10 22:52:09.509 ----------------------------------------------- -eclipse.buildId=4.7.1.M20170906-1700 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-10-10 22:52:17.569 +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-03-26 01:18:44.784 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-03-26 01:19:15.899 !MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.debug.ui 4 120 2017-10-10 22:52:24.850 -!MESSAGE Error logged from Debug UI: -!STACK 0 -org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。 - at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) - at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) - at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager.restoreLaunchHistory(LaunchConfigurationManager.java:501) - at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager.loadLaunchHistories(LaunchConfigurationManager.java:1066) - at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager.getLaunchHistory(LaunchConfigurationManager.java:1038) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.internalGetHistory(AbstractLaunchHistoryAction.java:547) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.getToolTip(AbstractLaunchHistoryAction.java:233) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.updateTooltip(AbstractLaunchHistoryAction.java:198) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.initialize(AbstractLaunchHistoryAction.java:168) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.selectionChanged(AbstractLaunchHistoryAction.java:513) - at org.eclipse.ui.internal.PluginAction.refreshEnablement(PluginAction.java:206) - at org.eclipse.ui.internal.PluginAction.createDelegate(PluginAction.java:126) - at org.eclipse.ui.internal.WWinPluginAction.refreshActionList(WWinPluginAction.java:158) - at org.eclipse.ui.plugin.AbstractUIPlugin.lambda$0(AbstractUIPlugin.java:481) - at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37) - at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182) - at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4213) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3820) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:424) - at org.eclipse.jface.dialogs.MessageDialog.openInformation(MessageDialog.java:534) - at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:229) - at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:219) - at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565) - at org.eclipse.jface.action.ActionContributionItem.lambda$5(ActionContributionItem.java:436) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4238) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3817) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) - -!ENTRY org.eclipse.pde.core 4 0 2017-10-10 22:52:30.865 -!MESSAGE FrameworkEvent ERROR -!STACK 0 -org.osgi.framework.BundleException: Exception in org.eclipse.pde.internal.core.PDECore.stop() of bundle org.eclipse.pde.core. - at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:855) - at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:947) - at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1669) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1588) - at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165) - at java.lang.Thread.run(Unknown Source) -Caused by: java.lang.NullPointerException - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolveVariables(AbstractBundleContainer.java:64) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveHomeLocation(ProfileBundleContainer.java:210) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveBundles(ProfileBundleContainer.java:94) - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolve(AbstractBundleContainer.java:81) - at org.eclipse.pde.internal.core.target.TargetDefinition.resolve(TargetDefinition.java:282) - at org.eclipse.pde.internal.core.TargetPlatformHelper.getWorkspaceTargetResolved(TargetPlatformHelper.java:485) - at org.eclipse.pde.internal.core.PluginModelManager.getExternalBundles(PluginModelManager.java:615) - at org.eclipse.pde.internal.core.PluginModelManager.initializeTable(PluginModelManager.java:539) - at org.eclipse.pde.internal.core.PluginModelManager.getEntryTable(PluginModelManager.java:482) - at org.eclipse.pde.internal.core.PluginModelManager.findEntry(PluginModelManager.java:976) - at org.eclipse.pde.internal.core.PluginModelManager.findModel(PluginModelManager.java:1000) - at org.eclipse.pde.core.plugin.PluginRegistry.findModel(PluginRegistry.java:97) - at org.eclipse.pde.internal.core.JavaElementChangeListener.save(JavaElementChangeListener.java:129) - at org.eclipse.pde.internal.core.JavaElementChangeListener.shutdown(JavaElementChangeListener.java:41) - at org.eclipse.pde.internal.core.PDECore.stop(PDECore.java:312) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:835) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1) - at java.security.AccessController.doPrivileged(Native Method) - at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:828) - ... 13 more -Root exception: -java.lang.NullPointerException - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolveVariables(AbstractBundleContainer.java:64) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveHomeLocation(ProfileBundleContainer.java:210) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveBundles(ProfileBundleContainer.java:94) - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolve(AbstractBundleContainer.java:81) - at org.eclipse.pde.internal.core.target.TargetDefinition.resolve(TargetDefinition.java:282) - at org.eclipse.pde.internal.core.TargetPlatformHelper.getWorkspaceTargetResolved(TargetPlatformHelper.java:485) - at org.eclipse.pde.internal.core.PluginModelManager.getExternalBundles(PluginModelManager.java:615) - at org.eclipse.pde.internal.core.PluginModelManager.initializeTable(PluginModelManager.java:539) - at org.eclipse.pde.internal.core.PluginModelManager.getEntryTable(PluginModelManager.java:482) - at org.eclipse.pde.internal.core.PluginModelManager.findEntry(PluginModelManager.java:976) - at org.eclipse.pde.internal.core.PluginModelManager.findModel(PluginModelManager.java:1000) - at org.eclipse.pde.core.plugin.PluginRegistry.findModel(PluginRegistry.java:97) - at org.eclipse.pde.internal.core.JavaElementChangeListener.save(JavaElementChangeListener.java:129) - at org.eclipse.pde.internal.core.JavaElementChangeListener.shutdown(JavaElementChangeListener.java:41) - at org.eclipse.pde.internal.core.PDECore.stop(PDECore.java:312) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:835) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1) - at java.security.AccessController.doPrivileged(Native Method) - at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:828) - at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:947) - at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1669) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1588) - at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165) - at java.lang.Thread.run(Unknown Source) - -!ENTRY org.eclipse.core.jobs 4 2 2017-10-10 22:52:30.870 -!MESSAGE An internal error occurred during: "Setting VM arguments". -!STACK 0 -java.lang.NullPointerException - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolveVariables(AbstractBundleContainer.java:64) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveHomeLocation(ProfileBundleContainer.java:210) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.getLocation(ProfileBundleContainer.java:73) - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.getVMArguments(AbstractBundleContainer.java:230) - at org.eclipse.pde.internal.core.target.TargetPlatformService.getVMArguments(TargetPlatformService.java:637) - at org.eclipse.pde.internal.core.target.TargetPlatformService.access$0(TargetPlatformService.java:634) - at org.eclipse.pde.internal.core.target.TargetPlatformService$2.run(TargetPlatformService.java:617) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -!SESSION 2017-10-10 22:52:47.857 ----------------------------------------------- -eclipse.buildId=4.7.1.M20170906-1700 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-10-10 22:52:59.813 +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-03-26 11:08:10.027 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-03-26 11:09:44.150 !MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.pde.core 4 0 2017-10-10 22:54:22.404 -!MESSAGE FrameworkEvent ERROR -!STACK 0 -org.osgi.framework.BundleException: Exception in org.eclipse.pde.internal.core.PDECore.stop() of bundle org.eclipse.pde.core. - at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:855) - at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:947) - at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1669) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1588) - at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165) - at java.lang.Thread.run(Unknown Source) -Caused by: java.lang.NullPointerException - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolveVariables(AbstractBundleContainer.java:64) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveHomeLocation(ProfileBundleContainer.java:210) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveBundles(ProfileBundleContainer.java:94) - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolve(AbstractBundleContainer.java:81) - at org.eclipse.pde.internal.core.target.TargetDefinition.resolve(TargetDefinition.java:282) - at org.eclipse.pde.internal.core.TargetPlatformHelper.getWorkspaceTargetResolved(TargetPlatformHelper.java:485) - at org.eclipse.pde.internal.core.PluginModelManager.getExternalBundles(PluginModelManager.java:615) - at org.eclipse.pde.internal.core.PluginModelManager.initializeTable(PluginModelManager.java:539) - at org.eclipse.pde.internal.core.PluginModelManager.getEntryTable(PluginModelManager.java:482) - at org.eclipse.pde.internal.core.PluginModelManager.findEntry(PluginModelManager.java:976) - at org.eclipse.pde.internal.core.PluginModelManager.findModel(PluginModelManager.java:1000) - at org.eclipse.pde.core.plugin.PluginRegistry.findModel(PluginRegistry.java:97) - at org.eclipse.pde.internal.core.JavaElementChangeListener.save(JavaElementChangeListener.java:129) - at org.eclipse.pde.internal.core.JavaElementChangeListener.shutdown(JavaElementChangeListener.java:41) - at org.eclipse.pde.internal.core.PDECore.stop(PDECore.java:312) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:835) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1) - at java.security.AccessController.doPrivileged(Native Method) - at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:828) - ... 13 more -Root exception: -java.lang.NullPointerException - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolveVariables(AbstractBundleContainer.java:64) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveHomeLocation(ProfileBundleContainer.java:210) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveBundles(ProfileBundleContainer.java:94) - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolve(AbstractBundleContainer.java:81) - at org.eclipse.pde.internal.core.target.TargetDefinition.resolve(TargetDefinition.java:282) - at org.eclipse.pde.internal.core.TargetPlatformHelper.getWorkspaceTargetResolved(TargetPlatformHelper.java:485) - at org.eclipse.pde.internal.core.PluginModelManager.getExternalBundles(PluginModelManager.java:615) - at org.eclipse.pde.internal.core.PluginModelManager.initializeTable(PluginModelManager.java:539) - at org.eclipse.pde.internal.core.PluginModelManager.getEntryTable(PluginModelManager.java:482) - at org.eclipse.pde.internal.core.PluginModelManager.findEntry(PluginModelManager.java:976) - at org.eclipse.pde.internal.core.PluginModelManager.findModel(PluginModelManager.java:1000) - at org.eclipse.pde.core.plugin.PluginRegistry.findModel(PluginRegistry.java:97) - at org.eclipse.pde.internal.core.JavaElementChangeListener.save(JavaElementChangeListener.java:129) - at org.eclipse.pde.internal.core.JavaElementChangeListener.shutdown(JavaElementChangeListener.java:41) - at org.eclipse.pde.internal.core.PDECore.stop(PDECore.java:312) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:835) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1) - at java.security.AccessController.doPrivileged(Native Method) - at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:828) - at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:947) - at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1669) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1588) - at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165) - at java.lang.Thread.run(Unknown Source) - -!ENTRY org.eclipse.core.jobs 4 2 2017-10-10 22:54:22.410 -!MESSAGE An internal error occurred during: "Setting VM arguments". -!STACK 0 -java.lang.NullPointerException - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolveVariables(AbstractBundleContainer.java:64) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveHomeLocation(ProfileBundleContainer.java:210) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.getLocation(ProfileBundleContainer.java:73) - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.getVMArguments(AbstractBundleContainer.java:230) - at org.eclipse.pde.internal.core.target.TargetPlatformService.getVMArguments(TargetPlatformService.java:637) - at org.eclipse.pde.internal.core.target.TargetPlatformService.access$0(TargetPlatformService.java:634) - at org.eclipse.pde.internal.core.target.TargetPlatformService$2.run(TargetPlatformService.java:617) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -!SESSION 2017-10-10 22:54:05.165 ----------------------------------------------- -eclipse.buildId=4.7.1.M20170906-1700 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-10-10 22:54:36.685 +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-04-02 01:59:50.264 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-02 02:00:08.715 !MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.debug.ui 4 120 2017-10-10 22:54:40.332 -!MESSAGE Error logged from Debug UI: -!STACK 0 -org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。 - at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) - at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) - at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager.restoreLaunchHistory(LaunchConfigurationManager.java:501) - at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager.loadLaunchHistories(LaunchConfigurationManager.java:1066) - at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager.getLaunchHistory(LaunchConfigurationManager.java:1038) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.internalGetHistory(AbstractLaunchHistoryAction.java:547) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.getToolTip(AbstractLaunchHistoryAction.java:233) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.updateTooltip(AbstractLaunchHistoryAction.java:198) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.initialize(AbstractLaunchHistoryAction.java:168) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.selectionChanged(AbstractLaunchHistoryAction.java:513) - at org.eclipse.ui.internal.PluginAction.refreshEnablement(PluginAction.java:206) - at org.eclipse.ui.internal.PluginAction.createDelegate(PluginAction.java:126) - at org.eclipse.ui.internal.WWinPluginAction.refreshActionList(WWinPluginAction.java:158) - at org.eclipse.ui.plugin.AbstractUIPlugin.lambda$0(AbstractUIPlugin.java:481) - at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37) - at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182) - at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4213) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3820) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:424) - at org.eclipse.jface.dialogs.MessageDialog.openInformation(MessageDialog.java:534) - at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:229) - at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:219) - at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565) - at org.eclipse.jface.action.ActionContributionItem.lambda$5(ActionContributionItem.java:436) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4238) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3817) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) - -!ENTRY org.eclipse.pde.core 4 0 2017-10-10 22:55:15.557 -!MESSAGE FrameworkEvent ERROR -!STACK 0 -org.osgi.framework.BundleException: Exception in org.eclipse.pde.internal.core.PDECore.stop() of bundle org.eclipse.pde.core. - at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:855) - at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:947) - at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1669) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1588) - at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165) - at java.lang.Thread.run(Unknown Source) -Caused by: java.lang.NullPointerException - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolveVariables(AbstractBundleContainer.java:64) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveHomeLocation(ProfileBundleContainer.java:210) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveBundles(ProfileBundleContainer.java:94) - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolve(AbstractBundleContainer.java:81) - at org.eclipse.pde.internal.core.target.TargetDefinition.resolve(TargetDefinition.java:282) - at org.eclipse.pde.internal.core.TargetPlatformHelper.getWorkspaceTargetResolved(TargetPlatformHelper.java:485) - at org.eclipse.pde.internal.core.PluginModelManager.getExternalBundles(PluginModelManager.java:615) - at org.eclipse.pde.internal.core.PluginModelManager.initializeTable(PluginModelManager.java:539) - at org.eclipse.pde.internal.core.PluginModelManager.getEntryTable(PluginModelManager.java:482) - at org.eclipse.pde.internal.core.PluginModelManager.findEntry(PluginModelManager.java:976) - at org.eclipse.pde.internal.core.PluginModelManager.findModel(PluginModelManager.java:1000) - at org.eclipse.pde.core.plugin.PluginRegistry.findModel(PluginRegistry.java:97) - at org.eclipse.pde.internal.core.JavaElementChangeListener.save(JavaElementChangeListener.java:129) - at org.eclipse.pde.internal.core.JavaElementChangeListener.shutdown(JavaElementChangeListener.java:41) - at org.eclipse.pde.internal.core.PDECore.stop(PDECore.java:312) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:835) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1) - at java.security.AccessController.doPrivileged(Native Method) - at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:828) - ... 13 more -Root exception: -java.lang.NullPointerException - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolveVariables(AbstractBundleContainer.java:64) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveHomeLocation(ProfileBundleContainer.java:210) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveBundles(ProfileBundleContainer.java:94) - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolve(AbstractBundleContainer.java:81) - at org.eclipse.pde.internal.core.target.TargetDefinition.resolve(TargetDefinition.java:282) - at org.eclipse.pde.internal.core.TargetPlatformHelper.getWorkspaceTargetResolved(TargetPlatformHelper.java:485) - at org.eclipse.pde.internal.core.PluginModelManager.getExternalBundles(PluginModelManager.java:615) - at org.eclipse.pde.internal.core.PluginModelManager.initializeTable(PluginModelManager.java:539) - at org.eclipse.pde.internal.core.PluginModelManager.getEntryTable(PluginModelManager.java:482) - at org.eclipse.pde.internal.core.PluginModelManager.findEntry(PluginModelManager.java:976) - at org.eclipse.pde.internal.core.PluginModelManager.findModel(PluginModelManager.java:1000) - at org.eclipse.pde.core.plugin.PluginRegistry.findModel(PluginRegistry.java:97) - at org.eclipse.pde.internal.core.JavaElementChangeListener.save(JavaElementChangeListener.java:129) - at org.eclipse.pde.internal.core.JavaElementChangeListener.shutdown(JavaElementChangeListener.java:41) - at org.eclipse.pde.internal.core.PDECore.stop(PDECore.java:312) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:835) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1) - at java.security.AccessController.doPrivileged(Native Method) - at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:828) - at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:947) - at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1669) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1588) - at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165) - at java.lang.Thread.run(Unknown Source) - -!ENTRY org.eclipse.core.jobs 4 2 2017-10-10 22:55:15.562 -!MESSAGE An internal error occurred during: "Setting VM arguments". -!STACK 0 -java.lang.NullPointerException - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolveVariables(AbstractBundleContainer.java:64) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveHomeLocation(ProfileBundleContainer.java:210) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.getLocation(ProfileBundleContainer.java:73) - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.getVMArguments(AbstractBundleContainer.java:230) - at org.eclipse.pde.internal.core.target.TargetPlatformService.getVMArguments(TargetPlatformService.java:637) - at org.eclipse.pde.internal.core.target.TargetPlatformService.access$0(TargetPlatformService.java:634) - at org.eclipse.pde.internal.core.target.TargetPlatformService$2.run(TargetPlatformService.java:617) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -!SESSION 2017-10-10 22:55:16.423 ----------------------------------------------- -eclipse.buildId=4.7.1.M20170906-1700 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -data E:\Study\java\judt -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-10-10 22:55:23.208 +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. + +!ENTRY org.eclipse.epp.logging.aeri.ide 2 17 2017-04-02 02:00:13.612 +!MESSAGE Server ‘org.eclipse.epp.logging.aeri.ide.server’ failed with exception: Connect to dev.eclipse.org:443 [dev.eclipse.org/198.41.30.200] failed: Read timed out. ; version: 2.0.4.v20170307-1435 +!STACK 0 +org.apache.http.conn.ConnectTimeoutException: Connect to dev.eclipse.org:443 [dev.eclipse.org/198.41.30.200] failed: Read timed out + at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:134) + at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:319) + at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363) + at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219) + at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195) + at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86) + at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108) + at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57) + at org.apache.http.client.fluent.Executor.execute(Executor.java:206) + at org.eclipse.epp.internal.logging.aeri.ide.server.mars.IO.request(IO.java:206) + at org.eclipse.epp.internal.logging.aeri.ide.server.mars.IO.refreshConfiguration(IO.java:68) + at org.eclipse.epp.internal.logging.aeri.ide.server.mars.ServerConnection.startUp(ServerConnection.java:124) + at com.google.common.util.concurrent.AbstractIdleService$2$1.run(AbstractIdleService.java:54) + at com.google.common.util.concurrent.Callables$3.run(Callables.java:93) + at java.lang.Thread.run(Thread.java:745) +Caused by: java.net.SocketTimeoutException: Read timed out + at java.net.SocketInputStream.socketRead0(Native Method) + at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) + at java.net.SocketInputStream.read(SocketInputStream.java:171) + at java.net.SocketInputStream.read(SocketInputStream.java:141) + at sun.security.ssl.InputRecord.readFully(InputRecord.java:465) + at sun.security.ssl.InputRecord.read(InputRecord.java:503) + at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973) + at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) + at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) + at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) + at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:290) + at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:259) + at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:125) + ... 16 more + +!ENTRY org.eclipse.equinox.event 4 0 2017-04-02 03:51:07.175 +!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/widget/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@18ad543b (elementId: org.eclipse.e4.ui.compatibility.editor, tags: [Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer@56ed9270, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor, object: org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor@7aadd290, context: PartImpl (org.eclipse.e4.ui.compatibility.editor) Context, variables: [], label: UDTServerSocket.java, iconURI: platform:/plugin/org.eclipse.jdt.ui/icons/full/obj16/jcu_obj.png, tooltip: null, dirty: false, closeable: true, description: null), Widget=null, org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@18ad543b (elementId: org.eclipse.e4.ui.compatibility.editor, tags: [Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer@56ed9270, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor, object: org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor@7aadd290, context: PartImpl (org.eclipse.e4.ui.compatibility.editor) Context, variables: [], label: UDTServerSocket.java, iconURI: platform:/plugin/org.eclipse.jdt.ui/icons/full/obj16/jcu_obj.png, tooltip: null, dirty: false, closeable: true, description: null), AttName=widget, EventType=SET, OldValue=ContributedPartRenderer$2 {}, Widget=null}, AttName=widget, EventType=SET, OldValue=ContributedPartRenderer$2 {}} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@4ab909f4 +!STACK 0 +java.lang.NullPointerException + at org.eclipse.ui.internal.NavigationHistory.getDisplay(NavigationHistory.java:176) + at org.eclipse.ui.internal.NavigationHistory.markEditor(NavigationHistory.java:193) + at org.eclipse.ui.internal.WorkbenchPage.updateActiveEditorSources(WorkbenchPage.java:411) + at org.eclipse.ui.internal.WorkbenchPage.firePartClosed(WorkbenchPage.java:5164) + at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart$1.handleEvent(CompatibilityPart.java:102) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) + at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) + at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) + at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) + at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) + at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) + at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) + at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) + at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) + at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) + at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) + at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) + at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) + at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) + at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) + at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:151) + at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer$1.widgetDisposed(SWTPartRenderer.java:139) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Widget.release(Widget.java:836) + at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) + at org.eclipse.swt.widgets.Widget.release(Widget.java:839) + at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) + at org.eclipse.swt.widgets.Widget.release(Widget.java:839) + at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) + at org.eclipse.swt.widgets.Widget.release(Widget.java:839) + at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) + at org.eclipse.swt.widgets.Widget.release(Widget.java:839) + at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) + at org.eclipse.swt.widgets.Widget.release(Widget.java:839) + at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) + at org.eclipse.swt.widgets.Widget.release(Widget.java:839) + at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) + at org.eclipse.swt.widgets.Widget.release(Widget.java:839) + at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) + at org.eclipse.swt.widgets.Widget.release(Widget.java:839) + at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) + at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:171) + at org.eclipse.swt.widgets.Decorations.releaseChildren(Decorations.java:807) + at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:1368) + at org.eclipse.swt.widgets.Widget.release(Widget.java:839) + at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) + at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:459) + at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) + at org.eclipse.swt.widgets.Display.release(Display.java:3875) + at org.eclipse.swt.graphics.Device.dispose(Device.java:298) + at org.eclipse.swt.widgets.Display.messageProc(Display.java:3358) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4897) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) + at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3144) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3819) + at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) + at org.eclipse.jface.window.Window.open(Window.java:794) + at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) + at org.eclipse.jface.dialogs.MessageDialogWithToggle.open(MessageDialogWithToggle.java:115) + at org.eclipse.jface.dialogs.MessageDialogWithToggle.openOkCancelConfirm(MessageDialogWithToggle.java:210) + at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:213) + at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:165) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4410) + at org.eclipse.swt.widgets.Display.messageProc(Display.java:3371) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4897) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) + at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) + at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3144) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3819) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +!SESSION 2017-04-02 14:35:06.822 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-02 14:35:48.921 !MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.debug.ui 4 120 2017-10-10 22:55:44.706 -!MESSAGE Error logged from Debug UI: -!STACK 0 -org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。 - at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) - at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) - at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager.restoreLaunchHistory(LaunchConfigurationManager.java:501) - at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager.loadLaunchHistories(LaunchConfigurationManager.java:1066) - at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager.getLaunchHistory(LaunchConfigurationManager.java:1038) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.internalGetHistory(AbstractLaunchHistoryAction.java:547) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.getToolTip(AbstractLaunchHistoryAction.java:233) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.updateTooltip(AbstractLaunchHistoryAction.java:198) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.initialize(AbstractLaunchHistoryAction.java:168) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.selectionChanged(AbstractLaunchHistoryAction.java:513) - at org.eclipse.ui.internal.PluginAction.refreshEnablement(PluginAction.java:206) - at org.eclipse.ui.internal.PluginAction.createDelegate(PluginAction.java:126) - at org.eclipse.ui.internal.WWinPluginAction.refreshActionList(WWinPluginAction.java:158) - at org.eclipse.ui.plugin.AbstractUIPlugin.lambda$0(AbstractUIPlugin.java:481) - at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37) - at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182) - at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4213) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3820) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:424) - at org.eclipse.jface.dialogs.MessageDialog.openInformation(MessageDialog.java:534) - at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:229) - at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:219) - at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565) - at org.eclipse.jface.action.ActionContributionItem.lambda$5(ActionContributionItem.java:436) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4238) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3817) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) - -!ENTRY org.eclipse.pde.core 4 0 2017-10-10 22:55:49.354 -!MESSAGE FrameworkEvent ERROR -!STACK 0 -org.osgi.framework.BundleException: Exception in org.eclipse.pde.internal.core.PDECore.stop() of bundle org.eclipse.pde.core. - at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:855) - at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:947) - at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1669) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1588) - at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165) - at java.lang.Thread.run(Unknown Source) -Caused by: java.lang.NullPointerException - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolveVariables(AbstractBundleContainer.java:64) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveHomeLocation(ProfileBundleContainer.java:210) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveBundles(ProfileBundleContainer.java:94) - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolve(AbstractBundleContainer.java:81) - at org.eclipse.pde.internal.core.target.TargetDefinition.resolve(TargetDefinition.java:282) - at org.eclipse.pde.internal.core.TargetPlatformHelper.getWorkspaceTargetResolved(TargetPlatformHelper.java:485) - at org.eclipse.pde.internal.core.PluginModelManager.getExternalBundles(PluginModelManager.java:615) - at org.eclipse.pde.internal.core.PluginModelManager.initializeTable(PluginModelManager.java:539) - at org.eclipse.pde.internal.core.PluginModelManager.getEntryTable(PluginModelManager.java:482) - at org.eclipse.pde.internal.core.PluginModelManager.findEntry(PluginModelManager.java:976) - at org.eclipse.pde.internal.core.PluginModelManager.findModel(PluginModelManager.java:1000) - at org.eclipse.pde.core.plugin.PluginRegistry.findModel(PluginRegistry.java:97) - at org.eclipse.pde.internal.core.JavaElementChangeListener.save(JavaElementChangeListener.java:129) - at org.eclipse.pde.internal.core.JavaElementChangeListener.shutdown(JavaElementChangeListener.java:41) - at org.eclipse.pde.internal.core.PDECore.stop(PDECore.java:312) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:835) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1) - at java.security.AccessController.doPrivileged(Native Method) - at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:828) - ... 13 more -Root exception: -java.lang.NullPointerException - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolveVariables(AbstractBundleContainer.java:64) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveHomeLocation(ProfileBundleContainer.java:210) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveBundles(ProfileBundleContainer.java:94) - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolve(AbstractBundleContainer.java:81) - at org.eclipse.pde.internal.core.target.TargetDefinition.resolve(TargetDefinition.java:282) - at org.eclipse.pde.internal.core.TargetPlatformHelper.getWorkspaceTargetResolved(TargetPlatformHelper.java:485) - at org.eclipse.pde.internal.core.PluginModelManager.getExternalBundles(PluginModelManager.java:615) - at org.eclipse.pde.internal.core.PluginModelManager.initializeTable(PluginModelManager.java:539) - at org.eclipse.pde.internal.core.PluginModelManager.getEntryTable(PluginModelManager.java:482) - at org.eclipse.pde.internal.core.PluginModelManager.findEntry(PluginModelManager.java:976) - at org.eclipse.pde.internal.core.PluginModelManager.findModel(PluginModelManager.java:1000) - at org.eclipse.pde.core.plugin.PluginRegistry.findModel(PluginRegistry.java:97) - at org.eclipse.pde.internal.core.JavaElementChangeListener.save(JavaElementChangeListener.java:129) - at org.eclipse.pde.internal.core.JavaElementChangeListener.shutdown(JavaElementChangeListener.java:41) - at org.eclipse.pde.internal.core.PDECore.stop(PDECore.java:312) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:835) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1) - at java.security.AccessController.doPrivileged(Native Method) - at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:828) - at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:947) - at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1669) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1588) - at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165) - at java.lang.Thread.run(Unknown Source) - -!ENTRY org.eclipse.core.jobs 4 2 2017-10-10 22:55:49.387 -!MESSAGE An internal error occurred during: "Setting VM arguments". -!STACK 0 -java.lang.NullPointerException - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolveVariables(AbstractBundleContainer.java:64) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.resolveHomeLocation(ProfileBundleContainer.java:210) - at org.eclipse.pde.internal.core.target.ProfileBundleContainer.getLocation(ProfileBundleContainer.java:73) - at org.eclipse.pde.internal.core.target.AbstractBundleContainer.getVMArguments(AbstractBundleContainer.java:230) - at org.eclipse.pde.internal.core.target.TargetPlatformService.getVMArguments(TargetPlatformService.java:637) - at org.eclipse.pde.internal.core.target.TargetPlatformService.access$0(TargetPlatformService.java:634) - at org.eclipse.pde.internal.core.target.TargetPlatformService$2.run(TargetPlatformService.java:617) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -!SESSION 2017-10-10 22:57:35.640 ----------------------------------------------- -eclipse.buildId=4.7.1.M20170906-1700 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-10-10 22:57:44.073 +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. + +!ENTRY org.eclipse.e4.ui.workbench 4 0 2017-04-02 18:56:14.941 +!MESSAGE Error disposing widget for : org.eclipse.e4.ui.model.application.ui.menu.impl.MenuImpl null +!STACK 0 +org.eclipse.swt.SWTException: Graphic is disposed + at org.eclipse.swt.SWT.error(SWT.java:4533) + at org.eclipse.swt.SWT.error(SWT.java:4448) + at org.eclipse.swt.SWT.error(SWT.java:4419) + at org.eclipse.swt.graphics.Font.getFontData(Font.java:192) + at org.eclipse.swt.custom.CTabFolderRenderer.drawChevron(CTabFolderRenderer.java:909) + at org.eclipse.swt.custom.CTabFolderRenderer.draw(CTabFolderRenderer.java:605) + at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.draw(CTabRendering.java:252) + at org.eclipse.swt.custom.CTabFolder.createButtonImage(CTabFolder.java:721) + at org.eclipse.swt.custom.CTabFolder.setButtonBounds(CTabFolder.java:2541) + at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3766) + at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3697) + at org.eclipse.swt.custom.CTabFolder.onResize(CTabFolder.java:2090) + at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:340) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Control.sendResize(Control.java:3042) + at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1058) + at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1108) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3292) + at org.eclipse.swt.widgets.Control.setBounds(Control.java:3288) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:301) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:246) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:163) + at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) + at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1062) + at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1108) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) + at org.eclipse.swt.widgets.Control.setBounds(Control.java:3211) + at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) + at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) + at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) + at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) + at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3259) + at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1102) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3292) + at org.eclipse.swt.widgets.Control.setBounds(Control.java:3288) + at org.eclipse.swt.custom.StackLayout.layout(StackLayout.java:123) + at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) + at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) + at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) + at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3259) + at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1102) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3292) + at org.eclipse.swt.widgets.Control.setBounds(Control.java:3288) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:301) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:246) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:163) + at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) + at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) + at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) + at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3259) + at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1102) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) + at org.eclipse.swt.widgets.Control.setBounds(Control.java:3211) + at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) + at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) + at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) + at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) + at org.eclipse.swt.internal.win32.OS.EndDeferWindowPos(Native Method) + at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:1030) + at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:996) + at org.eclipse.swt.widgets.Composite.setResizeChildren(Composite.java:1210) + at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1801) + at org.eclipse.swt.widgets.Canvas.WM_SIZE(Canvas.java:492) + at org.eclipse.swt.widgets.Decorations.WM_SIZE(Decorations.java:1849) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) + at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) + at org.eclipse.swt.widgets.Canvas.WM_WINDOWPOSCHANGED(Canvas.java:499) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.SetMenu(Native Method) + at org.eclipse.swt.widgets.Decorations.setMenuBar(Decorations.java:1187) + at org.eclipse.swt.widgets.Menu.releaseParent(Menu.java:1206) + at org.eclipse.swt.widgets.Widget.release(Widget.java:844) + at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) + at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.disposeWidget(SWTPartRenderer.java:176) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeRemoveGui(PartRenderingEngine.java:918) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$1(PartRenderingEngine.java:846) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$3.run(PartRenderingEngine.java:841) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:825) + at org.eclipse.ui.internal.WorkbenchWindow$1.handleEvent(WorkbenchWindow.java:322) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) + at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) + at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) + at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) + at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) + at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) + at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) + at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) + at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) + at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) + at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) + at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) + at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) + at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) + at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) + at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:151) + at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer$1.widgetDisposed(SWTPartRenderer.java:139) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Widget.release(Widget.java:836) + at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) + at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:459) + at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) + at org.eclipse.swt.widgets.Display.release(Display.java:3875) + at org.eclipse.swt.graphics.Device.dispose(Device.java:298) + at org.eclipse.swt.widgets.Display.messageProc(Display.java:3358) + at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2446) + at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:483) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2197) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) + at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) + at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3144) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3819) + at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) + at org.eclipse.jface.window.Window.open(Window.java:794) + at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) + at org.eclipse.jface.dialogs.MessageDialogWithToggle.open(MessageDialogWithToggle.java:115) + at org.eclipse.jface.dialogs.MessageDialogWithToggle.openOkCancelConfirm(MessageDialogWithToggle.java:210) + at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:213) + at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:165) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4410) + at org.eclipse.swt.widgets.Display.messageProc(Display.java:3371) + at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2446) + at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:483) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2197) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) + at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) + at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3144) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3819) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +!SESSION 2017-04-02 23:54:19.701 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-02 23:59:27.171 !MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.debug.ui 4 120 2017-10-10 22:58:39.018 -!MESSAGE Error logged from Debug UI: -!STACK 0 -org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。 - at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) - at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) - at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) - at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager.restoreLaunchHistory(LaunchConfigurationManager.java:501) - at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager.loadLaunchHistories(LaunchConfigurationManager.java:1066) - at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager.getLaunchHistory(LaunchConfigurationManager.java:1038) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.internalGetHistory(AbstractLaunchHistoryAction.java:547) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.getToolTip(AbstractLaunchHistoryAction.java:233) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.updateTooltip(AbstractLaunchHistoryAction.java:198) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.initialize(AbstractLaunchHistoryAction.java:168) - at org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction.selectionChanged(AbstractLaunchHistoryAction.java:513) - at org.eclipse.ui.internal.PluginAction.refreshEnablement(PluginAction.java:206) - at org.eclipse.ui.internal.PluginAction.createDelegate(PluginAction.java:126) - at org.eclipse.ui.internal.WWinPluginAction.refreshActionList(WWinPluginAction.java:158) - at org.eclipse.ui.plugin.AbstractUIPlugin.lambda$0(AbstractUIPlugin.java:481) - at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37) - at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182) - at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4213) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3820) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) - at org.eclipse.jface.window.Window.open(Window.java:794) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) - at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:424) - at org.eclipse.jface.dialogs.MessageDialog.openInformation(MessageDialog.java:534) - at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:229) - at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:219) - at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565) - at org.eclipse.jface.action.ActionContributionItem.lambda$5(ActionContributionItem.java:436) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4238) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3817) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) - -!ENTRY org.eclipse.wst.jsdt.ui 4 10001 2017-10-10 23:01:07.309 -!MESSAGE Internal Error -!STACK 1 -org.eclipse.wst.jsdt.internal.ui.JavaUIException: Problems reading information from XML 'OpenTypeHistory.xml' - at org.eclipse.wst.jsdt.internal.corext.util.History.createException(History.java:65) - at org.eclipse.wst.jsdt.internal.corext.util.History.load(History.java:251) - at org.eclipse.wst.jsdt.internal.corext.util.History.load(History.java:161) - at org.eclipse.wst.jsdt.internal.corext.util.OpenTypeHistory.(OpenTypeHistory.java:190) - at org.eclipse.wst.jsdt.internal.corext.util.OpenTypeHistory.getInstance(OpenTypeHistory.java:176) - at org.eclipse.wst.jsdt.internal.ui.JavaScriptPlugin.initializeAfterLoad(JavaScriptPlugin.java:357) - at org.eclipse.wst.jsdt.internal.ui.InitializeAfterLoadJob$RealJob.run(InitializeAfterLoadJob.java:33) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) -Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。 - at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) - at org.eclipse.wst.jsdt.internal.corext.util.History.load(History.java:249) - ... 6 more -!SUBENTRY 1 org.eclipse.wst.jsdt.ui 4 4 2017-10-10 23:01:07.309 -!MESSAGE Problems reading information from XML 'OpenTypeHistory.xml' -!STACK 0 -org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。 - at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) - at org.eclipse.wst.jsdt.internal.corext.util.History.load(History.java:249) - at org.eclipse.wst.jsdt.internal.corext.util.History.load(History.java:161) - at org.eclipse.wst.jsdt.internal.corext.util.OpenTypeHistory.(OpenTypeHistory.java:190) - at org.eclipse.wst.jsdt.internal.corext.util.OpenTypeHistory.getInstance(OpenTypeHistory.java:176) - at org.eclipse.wst.jsdt.internal.ui.JavaScriptPlugin.initializeAfterLoad(JavaScriptPlugin.java:357) - at org.eclipse.wst.jsdt.internal.ui.InitializeAfterLoadJob$RealJob.run(InitializeAfterLoadJob.java:33) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) - -!ENTRY org.eclipse.wst.jsdt.ui 4 10001 2017-10-10 23:09:06.758 -!MESSAGE Internal Error -!STACK 1 -org.eclipse.wst.jsdt.internal.ui.JavaUIException: Problems reading information from XML 'QualifiedTypeNameHistory.xml' - at org.eclipse.wst.jsdt.internal.corext.util.History.createException(History.java:65) - at org.eclipse.wst.jsdt.internal.corext.util.History.load(History.java:251) - at org.eclipse.wst.jsdt.internal.corext.util.History.load(History.java:161) - at org.eclipse.wst.jsdt.internal.corext.util.QualifiedTypeNameHistory.(QualifiedTypeNameHistory.java:33) - at org.eclipse.wst.jsdt.internal.corext.util.QualifiedTypeNameHistory.getDefault(QualifiedTypeNameHistory.java:26) - at org.eclipse.wst.jsdt.internal.ui.JavaScriptPlugin.stop(JavaScriptPlugin.java:566) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:835) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1) - at java.security.AccessController.doPrivileged(Native Method) - at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:828) - at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:947) - at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1669) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1588) - at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165) - at java.lang.Thread.run(Unknown Source) -Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。 - at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) - at org.eclipse.wst.jsdt.internal.corext.util.History.load(History.java:249) - ... 21 more -!SUBENTRY 1 org.eclipse.wst.jsdt.ui 4 4 2017-10-10 23:09:06.758 -!MESSAGE Problems reading information from XML 'QualifiedTypeNameHistory.xml' -!STACK 0 -org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。 - at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) - at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) - at org.eclipse.wst.jsdt.internal.corext.util.History.load(History.java:249) - at org.eclipse.wst.jsdt.internal.corext.util.History.load(History.java:161) - at org.eclipse.wst.jsdt.internal.corext.util.QualifiedTypeNameHistory.(QualifiedTypeNameHistory.java:33) - at org.eclipse.wst.jsdt.internal.corext.util.QualifiedTypeNameHistory.getDefault(QualifiedTypeNameHistory.java:26) - at org.eclipse.wst.jsdt.internal.ui.JavaScriptPlugin.stop(JavaScriptPlugin.java:566) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:835) - at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1) - at java.security.AccessController.doPrivileged(Native Method) - at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:828) - at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:947) - at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1669) - at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1588) - at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147) - at org.eclipse.osgi.container.Module.doStop(Module.java:636) - at org.eclipse.osgi.container.Module.stop(Module.java:498) - at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202) - at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165) - at java.lang.Thread.run(Unknown Source) -!SESSION 2017-10-10 23:09:49.817 ----------------------------------------------- -eclipse.buildId=4.7.1.M20170906-1700 -java.version=1.8.0_144 -java.vendor=Oracle Corporation -BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN -Framework arguments: -product org.eclipse.epp.package.jee.product -Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product - -!ENTRY org.eclipse.egit.ui 2 0 2017-10-10 23:10:01.962 +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. + +!ENTRY org.eclipse.osgi 2 0 2017-04-02 23:59:37.584 +!MESSAGE While loading class "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber", thread "Thread[Worker-5,5,main]" timed out waiting (5007ms) for thread "Thread[Compiler Source File Reader,5,main]" to finish starting bundle "org.eclipse.wb.core_1.9.0.201608250402 [1137]". To avoid deadlock, thread "Thread[Worker-5,5,main]" is proceeding but "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber" may not be fully initialized. +!STACK 0 +org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="1.9.0.201608250402"; osgi.identity="org.eclipse.wb.core"; singleton:="true" [id=1137] STARTED [STARTED] + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) + at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) + at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) + at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) + at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) + at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) + at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) + at org.eclipse.core.internal.resources.File.getCharset(File.java:198) + at org.eclipse.core.internal.resources.File.getCharset(File.java:186) + at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) + at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) + at org.eclipse.jdt.internal.compiler.ReadManager.getContents(ReadManager.java:145) + at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:11374) + at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:11346) + at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:9760) + at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:815) + at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:385) + at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:431) + at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:417) + at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:368) + at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:179) + at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:305) + at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:61) + at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:256) + at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:175) + at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) + at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) + at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) + at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) + at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304) + at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360) + at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383) + at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144) + at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) +Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + ... 57 more +Root exception: +java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) + at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) + at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) + at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) + at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) + at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) + at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) + at org.eclipse.core.internal.resources.File.getCharset(File.java:198) + at org.eclipse.core.internal.resources.File.getCharset(File.java:186) + at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) + at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) + at org.eclipse.jdt.internal.compiler.ReadManager.getContents(ReadManager.java:145) + at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:11374) + at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:11346) + at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:9760) + at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:815) + at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:385) + at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:431) + at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:417) + at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:368) + at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:179) + at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:305) + at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:61) + at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:256) + at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:175) + at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) + at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) + at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) + at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) + at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304) + at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360) + at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383) + at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144) + at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) + +!ENTRY org.eclipse.osgi 2 0 2017-04-02 23:59:38.158 +!MESSAGE While loading class "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber", thread "Thread[Compiler Source File Reader,5,main]" timed out waiting (5007ms) for thread "Thread[Compiler Source File Reader,5,main]" to finish starting bundle "org.eclipse.wb.core_1.9.0.201608250402 [1137]". To avoid deadlock, thread "Thread[Compiler Source File Reader,5,main]" is proceeding but "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber" may not be fully initialized. +!STACK 0 +org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="1.9.0.201608250402"; osgi.identity="org.eclipse.wb.core"; singleton:="true" [id=1137] STARTED [STARTED] + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) + at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) + at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) + at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) + at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) + at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) + at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) + at org.eclipse.core.internal.resources.File.getCharset(File.java:198) + at org.eclipse.core.internal.resources.File.getCharset(File.java:186) + at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) + at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) + at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) + at java.lang.Thread.run(Thread.java:745) +Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + ... 33 more +Root exception: +java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) + at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) + at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) + at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) + at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) + at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) + at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) + at org.eclipse.core.internal.resources.File.getCharset(File.java:198) + at org.eclipse.core.internal.resources.File.getCharset(File.java:186) + at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) + at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) + at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) + at java.lang.Thread.run(Thread.java:745) + +!ENTRY org.eclipse.osgi 2 0 2017-04-02 23:59:38.159 +!MESSAGE While loading class "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber", thread "Thread[Compiler Source File Reader,5,main]" timed out waiting (5007ms) for thread "Thread[Compiler Source File Reader,5,main]" to finish starting bundle "org.eclipse.wb.core_1.9.0.201608250402 [1137]". To avoid deadlock, thread "Thread[Compiler Source File Reader,5,main]" is proceeding but "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber" may not be fully initialized. +!STACK 0 +org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="1.9.0.201608250402"; osgi.identity="org.eclipse.wb.core"; singleton:="true" [id=1137] STARTED [STARTED] + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) + at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) + at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) + at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) + at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) + at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) + at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) + at org.eclipse.core.internal.resources.File.getCharset(File.java:198) + at org.eclipse.core.internal.resources.File.getCharset(File.java:186) + at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) + at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) + at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) + at java.lang.Thread.run(Thread.java:745) +Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + ... 33 more +Root exception: +java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) + at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) + at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) + at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) + at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) + at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) + at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) + at org.eclipse.core.internal.resources.File.getCharset(File.java:198) + at org.eclipse.core.internal.resources.File.getCharset(File.java:186) + at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) + at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) + at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) + at java.lang.Thread.run(Thread.java:745) + +!ENTRY org.eclipse.osgi 2 0 2017-04-02 23:59:38.160 +!MESSAGE While loading class "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber", thread "Thread[Compiler Source File Reader,5,main]" timed out waiting (5007ms) for thread "Thread[Compiler Source File Reader,5,main]" to finish starting bundle "org.eclipse.wb.core_1.9.0.201608250402 [1137]". To avoid deadlock, thread "Thread[Compiler Source File Reader,5,main]" is proceeding but "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber" may not be fully initialized. +!STACK 0 +org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="1.9.0.201608250402"; osgi.identity="org.eclipse.wb.core"; singleton:="true" [id=1137] STARTED [STARTED] + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) + at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) + at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) + at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) + at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) + at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) + at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) + at org.eclipse.core.internal.resources.File.getCharset(File.java:198) + at org.eclipse.core.internal.resources.File.getCharset(File.java:186) + at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) + at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) + at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) + at java.lang.Thread.run(Thread.java:745) +Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + ... 33 more +Root exception: +java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) + at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) + at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) + at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) + at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) + at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) + at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) + at org.eclipse.core.internal.resources.File.getCharset(File.java:198) + at org.eclipse.core.internal.resources.File.getCharset(File.java:186) + at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) + at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) + at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) + at java.lang.Thread.run(Thread.java:745) + +!ENTRY org.eclipse.osgi 2 0 2017-04-02 23:59:38.161 +!MESSAGE While loading class "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber", thread "Thread[Compiler Source File Reader,5,main]" timed out waiting (5007ms) for thread "Thread[Compiler Source File Reader,5,main]" to finish starting bundle "org.eclipse.wb.core_1.9.0.201608250402 [1137]". To avoid deadlock, thread "Thread[Compiler Source File Reader,5,main]" is proceeding but "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber" may not be fully initialized. +!STACK 0 +org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="1.9.0.201608250402"; osgi.identity="org.eclipse.wb.core"; singleton:="true" [id=1137] STARTED [STARTED] + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) + at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) + at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) + at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) + at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) + at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) + at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) + at org.eclipse.core.internal.resources.File.getCharset(File.java:198) + at org.eclipse.core.internal.resources.File.getCharset(File.java:186) + at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) + at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) + at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) + at java.lang.Thread.run(Thread.java:745) +Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + ... 33 more +Root exception: +java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) + at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) + at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) + at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) + at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) + at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) + at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) + at org.eclipse.core.internal.resources.File.getCharset(File.java:198) + at org.eclipse.core.internal.resources.File.getCharset(File.java:186) + at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) + at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) + at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) + at java.lang.Thread.run(Thread.java:745) + +!ENTRY org.eclipse.osgi 2 0 2017-04-02 23:59:38.162 +!MESSAGE While loading class "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber", thread "Thread[Compiler Source File Reader,5,main]" timed out waiting (5007ms) for thread "Thread[Compiler Source File Reader,5,main]" to finish starting bundle "org.eclipse.wb.core_1.9.0.201608250402 [1137]". To avoid deadlock, thread "Thread[Compiler Source File Reader,5,main]" is proceeding but "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber" may not be fully initialized. +!STACK 0 +org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="1.9.0.201608250402"; osgi.identity="org.eclipse.wb.core"; singleton:="true" [id=1137] STARTED [STARTED] + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) + at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) + at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) + at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) + at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) + at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) + at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) + at org.eclipse.core.internal.resources.File.getCharset(File.java:198) + at org.eclipse.core.internal.resources.File.getCharset(File.java:186) + at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) + at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) + at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) + at java.lang.Thread.run(Thread.java:745) +Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + ... 33 more +Root exception: +java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) + at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) + at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) + at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) + at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) + at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) + at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) + at org.eclipse.core.internal.resources.File.getCharset(File.java:198) + at org.eclipse.core.internal.resources.File.getCharset(File.java:186) + at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) + at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) + at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) + at java.lang.Thread.run(Thread.java:745) + +!ENTRY org.eclipse.osgi 2 0 2017-04-02 23:59:38.163 +!MESSAGE While loading class "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber", thread "Thread[Compiler Source File Reader,5,main]" timed out waiting (5007ms) for thread "Thread[Compiler Source File Reader,5,main]" to finish starting bundle "org.eclipse.wb.core_1.9.0.201608250402 [1137]". To avoid deadlock, thread "Thread[Compiler Source File Reader,5,main]" is proceeding but "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber" may not be fully initialized. +!STACK 0 +org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="1.9.0.201608250402"; osgi.identity="org.eclipse.wb.core"; singleton:="true" [id=1137] STARTED [STARTED] + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) + at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) + at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) + at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) + at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) + at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) + at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) + at org.eclipse.core.internal.resources.File.getCharset(File.java:198) + at org.eclipse.core.internal.resources.File.getCharset(File.java:186) + at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) + at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) + at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) + at java.lang.Thread.run(Thread.java:745) +Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + ... 33 more +Root exception: +java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) + at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) + at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) + at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) + at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) + at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) + at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) + at org.eclipse.core.internal.resources.File.getCharset(File.java:198) + at org.eclipse.core.internal.resources.File.getCharset(File.java:186) + at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) + at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) + at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) + at java.lang.Thread.run(Thread.java:745) + +!ENTRY org.eclipse.osgi 2 0 2017-04-02 23:59:38.163 +!MESSAGE While loading class "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber", thread "Thread[Compiler Source File Reader,5,main]" timed out waiting (5007ms) for thread "Thread[Compiler Source File Reader,5,main]" to finish starting bundle "org.eclipse.wb.core_1.9.0.201608250402 [1137]". To avoid deadlock, thread "Thread[Compiler Source File Reader,5,main]" is proceeding but "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber" may not be fully initialized. +!STACK 0 +org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="1.9.0.201608250402"; osgi.identity="org.eclipse.wb.core"; singleton:="true" [id=1137] STARTED [STARTED] + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) + at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) + at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) + at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) + at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) + at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) + at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) + at org.eclipse.core.internal.resources.File.getCharset(File.java:198) + at org.eclipse.core.internal.resources.File.getCharset(File.java:186) + at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) + at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) + at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) + at java.lang.Thread.run(Thread.java:745) +Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + ... 33 more +Root exception: +java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) + at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) + at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) + at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) + at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) + at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) + at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) + at org.eclipse.core.internal.resources.File.getCharset(File.java:198) + at org.eclipse.core.internal.resources.File.getCharset(File.java:186) + at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) + at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) + at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) + at java.lang.Thread.run(Thread.java:745) + +!ENTRY org.eclipse.osgi 2 0 2017-04-02 23:59:38.164 +!MESSAGE While loading class "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber", thread "Thread[Compiler Source File Reader,5,main]" timed out waiting (5007ms) for thread "Thread[Compiler Source File Reader,5,main]" to finish starting bundle "org.eclipse.wb.core_1.9.0.201608250402 [1137]". To avoid deadlock, thread "Thread[Compiler Source File Reader,5,main]" is proceeding but "org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber" may not be fully initialized. +!STACK 0 +org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="1.9.0.201608250402"; osgi.identity="org.eclipse.wb.core"; singleton:="true" [id=1137] STARTED [STARTED] + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) + at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) + at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) + at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) + at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) + at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) + at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) + at org.eclipse.core.internal.resources.File.getCharset(File.java:198) + at org.eclipse.core.internal.resources.File.getCharset(File.java:186) + at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) + at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) + at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) + at java.lang.Thread.run(Thread.java:745) +Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + ... 33 more +Root exception: +java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) + at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:266) + at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:195) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:414) + at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:461) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:357) + at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:371) + at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:76) + at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:453) + at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:363) + at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:241) + at org.eclipse.core.internal.resources.File.getCharset(File.java:198) + at org.eclipse.core.internal.resources.File.getCharset(File.java:186) + at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1159) + at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79) + at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:174) + at java.lang.Thread.run(Thread.java:745) + +!ENTRY org.eclipse.equinox.event 4 0 2017-04-03 00:13:28.827 +!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@5e4b9f22 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@5e4b9f22 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@1cd9c2de +!STACK 0 +org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) + at org.eclipse.swt.SWT.error(SWT.java:4533) + at org.eclipse.swt.SWT.error(SWT.java:4448) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) + at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) + at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) + at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) + at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) + at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) + at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) + at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) + at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) + at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) + at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) + at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) + at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) + at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) + at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) + at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) + at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) + at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) + at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) + at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) + at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) + at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) + at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) + at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) + at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) + at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) + at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) + at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) + at java.io.FileInputStream.open0(Native Method) + at java.io.FileInputStream.open(FileInputStream.java:195) + at java.io.FileInputStream.(FileInputStream.java:138) + at java.io.FileInputStream.(FileInputStream.java:93) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) + ... 75 more + +!ENTRY org.eclipse.equinox.event 4 0 2017-04-03 00:13:47.986 +!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@1e695be6 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@1e695be6 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@1cd9c2de +!STACK 0 +org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) + at org.eclipse.swt.SWT.error(SWT.java:4533) + at org.eclipse.swt.SWT.error(SWT.java:4448) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) + at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) + at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) + at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) + at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) + at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) + at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) + at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) + at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) + at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) + at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) + at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) + at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) + at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) + at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) + at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) + at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) + at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) + at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) + at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) + at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) + at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) + at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) + at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) + at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) + at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) + at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) + at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) + at java.io.FileInputStream.open0(Native Method) + at java.io.FileInputStream.open(FileInputStream.java:195) + at java.io.FileInputStream.(FileInputStream.java:138) + at java.io.FileInputStream.(FileInputStream.java:93) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) + ... 75 more + +!ENTRY org.eclipse.jface.text 2 0 2017-04-03 00:14:05.541 +!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' + +!ENTRY org.eclipse.jface.text 2 0 2017-04-03 00:14:05.542 +!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' + +!ENTRY org.eclipse.jface.text 2 0 2017-04-03 00:14:06.351 +!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' + +!ENTRY org.eclipse.jface.text 2 0 2017-04-03 00:14:06.352 +!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' + +!ENTRY org.eclipse.equinox.event 4 0 2017-04-03 00:14:28.440 +!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@71bcc154 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@71bcc154 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@1cd9c2de +!STACK 0 +org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) + at org.eclipse.swt.SWT.error(SWT.java:4533) + at org.eclipse.swt.SWT.error(SWT.java:4448) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) + at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) + at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) + at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) + at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) + at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) + at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) + at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) + at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) + at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) + at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) + at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) + at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) + at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) + at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) + at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) + at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) + at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) + at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) + at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) + at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) + at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) + at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) + at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) + at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) + at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) + at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) + at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) + at java.io.FileInputStream.open0(Native Method) + at java.io.FileInputStream.open(FileInputStream.java:195) + at java.io.FileInputStream.(FileInputStream.java:138) + at java.io.FileInputStream.(FileInputStream.java:93) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) + ... 75 more + +!ENTRY org.eclipse.equinox.event 4 0 2017-04-03 00:14:41.129 +!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@4260f222 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@4260f222 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@1cd9c2de +!STACK 0 +org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) + at org.eclipse.swt.SWT.error(SWT.java:4533) + at org.eclipse.swt.SWT.error(SWT.java:4448) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) + at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) + at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) + at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) + at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) + at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) + at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) + at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) + at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) + at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) + at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) + at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) + at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) + at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) + at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) + at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) + at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) + at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) + at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) + at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) + at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) + at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) + at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) + at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) + at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) + at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) + at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) + at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) + at java.io.FileInputStream.open0(Native Method) + at java.io.FileInputStream.open(FileInputStream.java:195) + at java.io.FileInputStream.(FileInputStream.java:138) + at java.io.FileInputStream.(FileInputStream.java:93) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) + ... 75 more +!SESSION 2017-04-03 13:15:47.065 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.osgi 2 0 2017-04-03 13:20:48.672 +!MESSAGE While loading class "org.eclipse.egit.ui.internal.ConfigurationChecker$1$1", thread "Thread[Worker-0,5,main]" timed out waiting (5010ms) for thread "Thread[main,6,main]" to finish starting bundle "org.eclipse.egit.ui_4.6.1.201703071140-r [1025]". To avoid deadlock, thread "Thread[Worker-0,5,main]" is proceeding but "org.eclipse.egit.ui.internal.ConfigurationChecker$1$1" may not be fully initialized. +!STACK 0 +org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="4.6.1.201703071140-r"; osgi.identity="org.eclipse.egit.ui"; singleton:="true" [id=1025] STARTED [STARTED] + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:423) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.egit.ui.internal.ConfigurationChecker$1.run(ConfigurationChecker.java:45) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) +Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + ... 13 more +Root exception: +java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock. + at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334) + at org.eclipse.osgi.container.Module.start(Module.java:401) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:423) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.egit.ui.internal.ConfigurationChecker$1.run(ConfigurationChecker.java:45) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-03 13:23:48.986 !MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and EGit might behave differently since they see different configuration options. -This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. - -!ENTRY org.eclipse.jface.text 2 0 2017-10-11 01:21:16.159 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' - -!ENTRY org.eclipse.jface.text 2 0 2017-10-11 01:21:16.159 -!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' - -!ENTRY org.eclipse.ui 4 0 2017-10-11 02:18:35.240 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-11 02:18:35.782 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-11 02:18:36.224 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more - -!ENTRY org.eclipse.ui 4 0 2017-10-11 02:19:34.779 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:64) - at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) - at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) - at org.eclipse.swt.widgets.Display.syncExec(Display.java:4889) - at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) - at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:61) - at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) - at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) - at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) - at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) - at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) - at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) - at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) - at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) - at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) - at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) - at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:191) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:202) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:255) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:112) - at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1214) - at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.subscribeUIElementTopicAllRenderedVisibility(MenuManagerRenderer.java:200) - at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) - ... 64 more -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 78 more - -!ENTRY org.eclipse.ui 4 0 2017-10-11 02:19:34.871 -!MESSAGE Unhandled event loop exception -!STACK 0 -org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) - at org.eclipse.swt.SWT.error(SWT.java:4533) - at org.eclipse.swt.SWT.error(SWT.java:4448) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) - at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) - at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) - at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:80) - at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:54) - at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) - at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) - at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) - at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) - at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) - at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) - at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5204) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:4872) - at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) - at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1657) - at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178) - at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) - at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) - at org.eclipse.swt.widgets.Display.runPopups(Display.java:4279) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3811) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) - at org.eclipse.equinox.launcher.Main.run(Main.java:1499) -Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) - at java.io.FileInputStream.open0(Native Method) - at java.io.FileInputStream.open(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at java.io.FileInputStream.(Unknown Source) - at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) - ... 47 more +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-04-03 14:07:53.429 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-03 14:11:19.044 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-04-03 16:52:58.264 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-03 16:53:09.914 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-04-03 18:13:48.775 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-03 18:14:00.127 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-04-03 21:03:59.376 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-03 21:04:18.275 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-04-03 21:49:22.479 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-03 21:49:42.879 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-04-03 23:52:06.346 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-03 23:52:20.464 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-04-04 01:10:35.356 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-04 01:10:50.441 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. + +!ENTRY org.eclipse.jface.text 2 0 2017-04-04 01:25:16.037 +!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' + +!ENTRY org.eclipse.jface.text 2 0 2017-04-04 01:25:16.055 +!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' + +!ENTRY org.eclipse.e4.ui.workbench 4 0 2017-04-04 04:25:44.802 +!MESSAGE Error disposing widget for : org.eclipse.e4.ui.model.application.ui.menu.impl.MenuImpl null +!STACK 0 +java.lang.IllegalArgumentException: Argument not valid + at org.eclipse.swt.SWT.error(SWT.java:4514) + at org.eclipse.swt.SWT.error(SWT.java:4448) + at org.eclipse.swt.SWT.error(SWT.java:4419) + at org.eclipse.swt.graphics.GC.setFont(GC.java:4617) + at org.eclipse.swt.custom.CTabFolderRenderer.computeSize(CTabFolderRenderer.java:340) + at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.computeSize(CTabRendering.java:200) + at org.eclipse.swt.custom.CTabFolder.setItemSize(CTabFolder.java:2819) + at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3764) + at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3697) + at org.eclipse.swt.custom.CTabFolder.onResize(CTabFolder.java:2090) + at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:340) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Control.sendResize(Control.java:3042) + at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1058) + at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1108) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3292) + at org.eclipse.swt.widgets.Control.setBounds(Control.java:3288) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:301) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:246) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:163) + at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) + at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1062) + at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1108) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) + at org.eclipse.swt.widgets.Control.setBounds(Control.java:3211) + at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) + at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) + at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) + at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) + at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3259) + at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1102) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3292) + at org.eclipse.swt.widgets.Control.setBounds(Control.java:3288) + at org.eclipse.swt.custom.StackLayout.layout(StackLayout.java:123) + at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) + at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) + at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) + at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3259) + at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1102) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3292) + at org.eclipse.swt.widgets.Control.setBounds(Control.java:3288) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:301) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:246) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:163) + at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) + at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) + at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) + at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3259) + at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1102) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) + at org.eclipse.swt.widgets.Control.setBounds(Control.java:3211) + at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) + at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) + at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) + at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) + at org.eclipse.swt.internal.win32.OS.EndDeferWindowPos(Native Method) + at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:1030) + at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:996) + at org.eclipse.swt.widgets.Composite.setResizeChildren(Composite.java:1210) + at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1801) + at org.eclipse.swt.widgets.Canvas.WM_SIZE(Canvas.java:492) + at org.eclipse.swt.widgets.Decorations.WM_SIZE(Decorations.java:1849) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) + at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) + at org.eclipse.swt.widgets.Canvas.WM_WINDOWPOSCHANGED(Canvas.java:499) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.SetMenu(Native Method) + at org.eclipse.swt.widgets.Decorations.setMenuBar(Decorations.java:1187) + at org.eclipse.swt.widgets.Menu.releaseParent(Menu.java:1206) + at org.eclipse.swt.widgets.Widget.release(Widget.java:844) + at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) + at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.disposeWidget(SWTPartRenderer.java:176) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeRemoveGui(PartRenderingEngine.java:918) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$1(PartRenderingEngine.java:846) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$3.run(PartRenderingEngine.java:841) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:825) + at org.eclipse.ui.internal.WorkbenchWindow$1.handleEvent(WorkbenchWindow.java:322) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) + at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) + at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) + at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) + at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) + at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) + at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) + at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) + at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) + at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) + at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) + at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) + at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) + at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) + at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) + at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:151) + at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer$1.widgetDisposed(SWTPartRenderer.java:139) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Widget.release(Widget.java:836) + at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) + at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:459) + at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) + at org.eclipse.swt.widgets.Display.release(Display.java:3875) + at org.eclipse.swt.graphics.Device.dispose(Device.java:298) + at org.eclipse.swt.widgets.Display.messageProc(Display.java:3358) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4897) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) + at org.eclipse.swt.internal.win32.OS.VtblCall(Native Method) + at org.eclipse.swt.widgets.TaskItem.setOverlayImage(TaskItem.java:296) + at org.eclipse.ui.internal.progress.TaskBarProgressManager.updateImage(TaskBarProgressManager.java:159) + at org.eclipse.ui.internal.progress.TaskBarProgressManager.access$4(TaskBarProgressManager.java:153) + at org.eclipse.ui.internal.progress.TaskBarProgressManager$2.runInUIThread(TaskBarProgressManager.java:117) + at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:97) + at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) + at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182) + at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827) + at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) + at org.eclipse.jface.window.Window.open(Window.java:794) + at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) + at org.eclipse.jface.dialogs.MessageDialogWithToggle.open(MessageDialogWithToggle.java:115) + at org.eclipse.jface.dialogs.MessageDialogWithToggle.openOkCancelConfirm(MessageDialogWithToggle.java:210) + at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:213) + at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:165) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4410) + at org.eclipse.swt.widgets.Display.messageProc(Display.java:3371) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4897) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) + at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) + at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3144) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3819) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) + +!ENTRY org.eclipse.equinox.event 4 0 2017-04-04 04:25:44.955 +!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/widget/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@1eb906f3 (elementId: org.eclipse.e4.ui.compatibility.editor, tags: [Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer@2be89ba5, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor, object: org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor@33ef701e, context: PartImpl (org.eclipse.e4.ui.compatibility.editor) Context, variables: [], label: ClientSession.java, iconURI: platform:/plugin/org.eclipse.jdt.ui/icons/full/obj16/jcu_obj.png, tooltip: null, dirty: false, closeable: true, description: null), Widget=null, org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@1eb906f3 (elementId: org.eclipse.e4.ui.compatibility.editor, tags: [Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer@2be89ba5, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor, object: org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor@33ef701e, context: PartImpl (org.eclipse.e4.ui.compatibility.editor) Context, variables: [], label: ClientSession.java, iconURI: platform:/plugin/org.eclipse.jdt.ui/icons/full/obj16/jcu_obj.png, tooltip: null, dirty: false, closeable: true, description: null), AttName=widget, EventType=SET, OldValue=ContributedPartRenderer$2 {}, Widget=null}, AttName=widget, EventType=SET, OldValue=ContributedPartRenderer$2 {}} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@1ea3309a +!STACK 0 +java.lang.NullPointerException + at org.eclipse.ui.internal.NavigationHistory.getDisplay(NavigationHistory.java:176) + at org.eclipse.ui.internal.NavigationHistory.markEditor(NavigationHistory.java:193) + at org.eclipse.ui.internal.WorkbenchPage.updateActiveEditorSources(WorkbenchPage.java:411) + at org.eclipse.ui.internal.WorkbenchPage.firePartClosed(WorkbenchPage.java:5164) + at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart$1.handleEvent(CompatibilityPart.java:102) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) + at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) + at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) + at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) + at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) + at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) + at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) + at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) + at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) + at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) + at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) + at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) + at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) + at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) + at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) + at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:151) + at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer$1.widgetDisposed(SWTPartRenderer.java:139) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Widget.release(Widget.java:836) + at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) + at org.eclipse.swt.widgets.Widget.release(Widget.java:839) + at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) + at org.eclipse.swt.widgets.Widget.release(Widget.java:839) + at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) + at org.eclipse.swt.widgets.Widget.release(Widget.java:839) + at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) + at org.eclipse.swt.widgets.Widget.release(Widget.java:839) + at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) + at org.eclipse.swt.widgets.Widget.release(Widget.java:839) + at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) + at org.eclipse.swt.widgets.Widget.release(Widget.java:839) + at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) + at org.eclipse.swt.widgets.Widget.release(Widget.java:839) + at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) + at org.eclipse.swt.widgets.Widget.release(Widget.java:839) + at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:952) + at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:171) + at org.eclipse.swt.widgets.Decorations.releaseChildren(Decorations.java:807) + at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:1368) + at org.eclipse.swt.widgets.Widget.release(Widget.java:839) + at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) + at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:459) + at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) + at org.eclipse.swt.widgets.Display.release(Display.java:3875) + at org.eclipse.swt.graphics.Device.dispose(Device.java:298) + at org.eclipse.swt.widgets.Display.messageProc(Display.java:3358) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4897) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) + at org.eclipse.swt.internal.win32.OS.VtblCall(Native Method) + at org.eclipse.swt.widgets.TaskItem.setOverlayImage(TaskItem.java:296) + at org.eclipse.ui.internal.progress.TaskBarProgressManager.updateImage(TaskBarProgressManager.java:159) + at org.eclipse.ui.internal.progress.TaskBarProgressManager.access$4(TaskBarProgressManager.java:153) + at org.eclipse.ui.internal.progress.TaskBarProgressManager$2.runInUIThread(TaskBarProgressManager.java:117) + at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:97) + at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) + at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182) + at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827) + at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) + at org.eclipse.jface.window.Window.open(Window.java:794) + at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) + at org.eclipse.jface.dialogs.MessageDialogWithToggle.open(MessageDialogWithToggle.java:115) + at org.eclipse.jface.dialogs.MessageDialogWithToggle.openOkCancelConfirm(MessageDialogWithToggle.java:210) + at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:213) + at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:165) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4410) + at org.eclipse.swt.widgets.Display.messageProc(Display.java:3371) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4897) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) + at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) + at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3144) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3819) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +!SESSION 2017-04-04 17:28:24.334 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.core.resources 2 10035 2017-04-04 17:28:32.785 +!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-04 17:28:41.471 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. + +!ENTRY org.eclipse.jface.text 2 0 2017-04-04 17:32:45.473 +!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' + +!ENTRY org.eclipse.jface.text 2 0 2017-04-04 17:32:45.475 +!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' + +!ENTRY org.eclipse.equinox.event 4 0 2017-04-04 17:35:12.546 +!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@4e4f979f (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@440e2406, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@4e4f979f (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@440e2406, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@165abf1 +!STACK 0 +org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) + at org.eclipse.swt.SWT.error(SWT.java:4533) + at org.eclipse.swt.SWT.error(SWT.java:4448) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) + at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) + at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) + at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) + at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) + at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) + at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) + at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) + at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) + at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) + at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) + at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) + at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) + at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) + at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) + at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) + at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) + at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) + at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) + at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) + at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) + at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) + at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) + at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) + at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) + at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) + at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) + at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) + at java.io.FileInputStream.open0(Native Method) + at java.io.FileInputStream.open(FileInputStream.java:195) + at java.io.FileInputStream.(FileInputStream.java:138) + at java.io.FileInputStream.(FileInputStream.java:93) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) + ... 75 more + +!ENTRY org.eclipse.ui 4 0 2017-04-04 17:35:14.020 +!MESSAGE Unhandled event loop exception +!STACK 0 +org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) + at org.eclipse.swt.SWT.error(SWT.java:4533) + at org.eclipse.swt.SWT.error(SWT.java:4448) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) + at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) + at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) + at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) + at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) + at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) + at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) + at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) + at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) + at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) + at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) + at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) + at java.io.FileInputStream.open0(Native Method) + at java.io.FileInputStream.open(FileInputStream.java:195) + at java.io.FileInputStream.(FileInputStream.java:138) + at java.io.FileInputStream.(FileInputStream.java:93) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) + ... 47 more + +!ENTRY org.eclipse.equinox.event 4 0 2017-04-04 17:35:49.040 +!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@507f7caa (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@440e2406, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@507f7caa (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@440e2406, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@165abf1 +!STACK 0 +org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) + at org.eclipse.swt.SWT.error(SWT.java:4533) + at org.eclipse.swt.SWT.error(SWT.java:4448) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) + at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) + at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) + at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) + at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) + at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) + at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) + at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) + at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) + at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) + at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) + at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) + at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) + at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) + at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) + at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) + at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) + at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) + at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) + at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) + at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) + at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) + at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) + at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) + at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) + at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) + at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) + at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) + at java.io.FileInputStream.open0(Native Method) + at java.io.FileInputStream.open(FileInputStream.java:195) + at java.io.FileInputStream.(FileInputStream.java:138) + at java.io.FileInputStream.(FileInputStream.java:93) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) + ... 75 more + +!ENTRY org.eclipse.ui 4 0 2017-04-04 17:35:50.602 +!MESSAGE Unhandled event loop exception +!STACK 0 +org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) + at org.eclipse.swt.SWT.error(SWT.java:4533) + at org.eclipse.swt.SWT.error(SWT.java:4448) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) + at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) + at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) + at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) + at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) + at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) + at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) + at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) + at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) + at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) + at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) + at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) + at java.io.FileInputStream.open0(Native Method) + at java.io.FileInputStream.open(FileInputStream.java:195) + at java.io.FileInputStream.(FileInputStream.java:138) + at java.io.FileInputStream.(FileInputStream.java:93) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) + ... 47 more +!SESSION 2017-04-04 18:07:28.299 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-04 18:07:37.718 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-04-04 20:23:39.571 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-04 20:24:42.106 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. + +!ENTRY org.eclipse.jface.text 2 0 2017-04-05 01:23:19.257 +!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' + +!ENTRY org.eclipse.jface.text 2 0 2017-04-05 01:23:19.316 +!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' + +!ENTRY org.eclipse.jface.text 2 0 2017-04-05 01:43:16.807 +!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' + +!ENTRY org.eclipse.jface.text 2 0 2017-04-05 01:43:16.807 +!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' + +!ENTRY org.eclipse.e4.ui.workbench 4 0 2017-04-05 02:20:07.842 +!MESSAGE Error disposing widget for : org.eclipse.e4.ui.model.application.ui.menu.impl.MenuImpl null +!STACK 0 +java.lang.IllegalArgumentException: Argument not valid + at org.eclipse.swt.SWT.error(SWT.java:4514) + at org.eclipse.swt.SWT.error(SWT.java:4448) + at org.eclipse.swt.SWT.error(SWT.java:4419) + at org.eclipse.swt.graphics.GC.setFont(GC.java:4617) + at org.eclipse.swt.custom.CTabFolderRenderer.computeSize(CTabFolderRenderer.java:340) + at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.computeSize(CTabRendering.java:200) + at org.eclipse.swt.custom.CTabFolder.setItemSize(CTabFolder.java:2819) + at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3764) + at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3697) + at org.eclipse.swt.custom.CTabFolder.onResize(CTabFolder.java:2090) + at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:340) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Control.sendResize(Control.java:3042) + at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1058) + at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1108) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3292) + at org.eclipse.swt.widgets.Control.setBounds(Control.java:3288) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:301) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:246) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:163) + at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) + at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1062) + at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1108) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) + at org.eclipse.swt.widgets.Control.setBounds(Control.java:3211) + at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) + at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) + at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) + at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) + at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3259) + at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1102) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3292) + at org.eclipse.swt.widgets.Control.setBounds(Control.java:3288) + at org.eclipse.swt.custom.StackLayout.layout(StackLayout.java:123) + at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) + at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) + at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) + at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3259) + at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1102) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3292) + at org.eclipse.swt.widgets.Control.setBounds(Control.java:3288) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.setRectangle(SashLayout.java:301) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:246) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.tileSubNodes(SashLayout.java:289) + at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.layout(SashLayout.java:163) + at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) + at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) + at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method) + at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1482) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3259) + at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1102) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3220) + at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3216) + at org.eclipse.swt.widgets.Control.setBounds(Control.java:3211) + at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:204) + at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1386) + at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1797) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:88) + at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) + at org.eclipse.swt.internal.win32.OS.EndDeferWindowPos(Native Method) + at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:1030) + at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:996) + at org.eclipse.swt.widgets.Composite.setResizeChildren(Composite.java:1210) + at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1801) + at org.eclipse.swt.widgets.Canvas.WM_SIZE(Canvas.java:492) + at org.eclipse.swt.widgets.Decorations.WM_SIZE(Decorations.java:1849) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4874) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) + at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5699) + at org.eclipse.swt.widgets.Canvas.WM_WINDOWPOSCHANGED(Canvas.java:499) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4887) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.SetMenu(Native Method) + at org.eclipse.swt.widgets.Decorations.setMenuBar(Decorations.java:1187) + at org.eclipse.swt.widgets.Menu.releaseParent(Menu.java:1206) + at org.eclipse.swt.widgets.Widget.release(Widget.java:844) + at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) + at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.disposeWidget(SWTPartRenderer.java:176) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeRemoveGui(PartRenderingEngine.java:918) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$1(PartRenderingEngine.java:846) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$3.run(PartRenderingEngine.java:841) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:825) + at org.eclipse.ui.internal.WorkbenchWindow$1.handleEvent(WorkbenchWindow.java:322) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) + at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) + at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) + at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) + at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) + at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) + at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) + at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) + at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) + at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) + at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) + at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) + at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) + at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) + at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261) + at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.unbindWidget(SWTPartRenderer.java:151) + at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer$1.widgetDisposed(SWTPartRenderer.java:139) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Widget.release(Widget.java:836) + at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460) + at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:459) + at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737) + at org.eclipse.swt.widgets.Display.release(Display.java:3875) + at org.eclipse.swt.graphics.Device.dispose(Device.java:298) + at org.eclipse.swt.widgets.Display.messageProc(Display.java:3358) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4897) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) + at org.eclipse.swt.internal.win32.OS.VtblCall(Native Method) + at org.eclipse.swt.widgets.TaskItem.setOverlayImage(TaskItem.java:296) + at org.eclipse.ui.internal.progress.TaskBarProgressManager.updateImage(TaskBarProgressManager.java:159) + at org.eclipse.ui.internal.progress.TaskBarProgressManager.access$4(TaskBarProgressManager.java:153) + at org.eclipse.ui.internal.progress.TaskBarProgressManager$2.runInUIThread(TaskBarProgressManager.java:117) + at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:97) + at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) + at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182) + at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827) + at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) + at org.eclipse.jface.window.Window.open(Window.java:794) + at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396) + at org.eclipse.jface.dialogs.MessageDialogWithToggle.open(MessageDialogWithToggle.java:115) + at org.eclipse.jface.dialogs.MessageDialogWithToggle.openOkCancelConfirm(MessageDialogWithToggle.java:210) + at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:213) + at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$1.handleEvent(IDEWorkbenchAdvisor.java:165) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4410) + at org.eclipse.swt.widgets.Display.messageProc(Display.java:3371) + at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) + at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2547) + at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:506) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4897) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123) + at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) + at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3144) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3819) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +!SESSION 2017-04-05 22:26:22.175 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.core.resources 2 10035 2017-04-05 22:26:29.318 +!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-05 22:26:36.687 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-04-06 00:47:18.247 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-06 00:47:50.832 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-04-06 02:03:23.389 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-06 02:03:44.687 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. + +!ENTRY org.eclipse.equinox.event 4 0 2017-04-06 02:04:07.770 +!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@78fdc1bb (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@75707f05, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@78fdc1bb (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@75707f05, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@6fffad6d +!STACK 0 +org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) + at org.eclipse.swt.SWT.error(SWT.java:4533) + at org.eclipse.swt.SWT.error(SWT.java:4448) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) + at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) + at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) + at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) + at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) + at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) + at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) + at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) + at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) + at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) + at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) + at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) + at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) + at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) + at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) + at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) + at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) + at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) + at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) + at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) + at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) + at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) + at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) + at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) + at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) + at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) + at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) + at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) + at java.io.FileInputStream.open0(Native Method) + at java.io.FileInputStream.open(FileInputStream.java:195) + at java.io.FileInputStream.(FileInputStream.java:138) + at java.io.FileInputStream.(FileInputStream.java:93) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) + ... 75 more + +!ENTRY org.eclipse.ui 4 0 2017-04-06 02:04:10.005 +!MESSAGE Unhandled event loop exception +!STACK 0 +org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) + at org.eclipse.swt.SWT.error(SWT.java:4533) + at org.eclipse.swt.SWT.error(SWT.java:4448) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) + at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) + at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) + at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) + at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) + at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) + at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) + at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) + at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) + at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) + at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) + at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) + at java.io.FileInputStream.open0(Native Method) + at java.io.FileInputStream.open(FileInputStream.java:195) + at java.io.FileInputStream.(FileInputStream.java:138) + at java.io.FileInputStream.(FileInputStream.java:93) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) + ... 47 more +!SESSION 2017-04-06 02:08:17.558 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-06 02:08:38.242 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. + +!ENTRY org.eclipse.equinox.event 4 0 2017-04-06 02:08:41.170 +!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@3d45ea17 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@6971f5f4, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@3d45ea17 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@6971f5f4, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@562b791b +!STACK 0 +org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) + at org.eclipse.swt.SWT.error(SWT.java:4533) + at org.eclipse.swt.SWT.error(SWT.java:4448) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) + at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) + at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) + at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) + at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) + at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) + at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) + at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) + at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) + at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) + at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) + at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) + at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) + at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) + at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) + at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) + at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) + at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) + at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) + at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) + at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) + at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) + at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) + at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) + at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) + at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) + at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) + at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) + at java.io.FileInputStream.open0(Native Method) + at java.io.FileInputStream.open(FileInputStream.java:195) + at java.io.FileInputStream.(FileInputStream.java:138) + at java.io.FileInputStream.(FileInputStream.java:93) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) + ... 75 more + +!ENTRY org.eclipse.ui 4 0 2017-04-06 02:08:44.687 +!MESSAGE Unhandled event loop exception +!STACK 0 +org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) + at org.eclipse.swt.SWT.error(SWT.java:4533) + at org.eclipse.swt.SWT.error(SWT.java:4448) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) + at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) + at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) + at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) + at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) + at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) + at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) + at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) + at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) + at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) + at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) + at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) + at java.io.FileInputStream.open0(Native Method) + at java.io.FileInputStream.open(FileInputStream.java:195) + at java.io.FileInputStream.(FileInputStream.java:138) + at java.io.FileInputStream.(FileInputStream.java:93) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) + ... 47 more + +!ENTRY org.eclipse.ui 4 0 2017-04-06 02:08:44.787 +!MESSAGE Unhandled event loop exception +!STACK 0 +java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 + at java.util.ArrayList.rangeCheck(ArrayList.java:653) + at java.util.ArrayList.get(ArrayList.java:429) + at org.eclipse.jdt.internal.ui.wizards.buildpaths.newsourcepage.ConfigureBuildPathAction.run(ConfigureBuildPathAction.java:63) + at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) + at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565) + at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) + +!ENTRY org.eclipse.equinox.event 4 0 2017-04-06 02:08:49.521 +!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@6896ef29 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@6971f5f4, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@6896ef29 (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@6971f5f4, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@562b791b +!STACK 0 +org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) + at org.eclipse.swt.SWT.error(SWT.java:4533) + at org.eclipse.swt.SWT.error(SWT.java:4448) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) + at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) + at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) + at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) + at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) + at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) + at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) + at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) + at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) + at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) + at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) + at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) + at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) + at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) + at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) + at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) + at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) + at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) + at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) + at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) + at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) + at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) + at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) + at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) + at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) + at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) + at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) + at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) + at java.io.FileInputStream.open0(Native Method) + at java.io.FileInputStream.open(FileInputStream.java:195) + at java.io.FileInputStream.(FileInputStream.java:138) + at java.io.FileInputStream.(FileInputStream.java:93) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) + ... 75 more +!SESSION 2017-04-06 02:21:00.143 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-06 02:21:23.640 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. + +!ENTRY org.eclipse.jface.text 2 0 2017-04-06 02:28:12.434 +!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' + +!ENTRY org.eclipse.jface.text 2 0 2017-04-06 02:28:12.437 +!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' + +!ENTRY org.eclipse.equinox.event 4 0 2017-04-06 02:31:03.685 +!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@3afbd1fd (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@10007fdc, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@3afbd1fd (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@10007fdc, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@5e31ad69 +!STACK 0 +org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) + at org.eclipse.swt.SWT.error(SWT.java:4533) + at org.eclipse.swt.SWT.error(SWT.java:4448) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) + at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) + at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) + at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) + at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) + at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) + at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) + at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) + at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) + at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) + at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) + at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) + at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) + at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) + at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) + at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) + at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) + at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) + at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) + at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) + at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) + at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) + at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) + at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) + at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) + at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) + at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) + at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) + at java.io.FileInputStream.open0(Native Method) + at java.io.FileInputStream.open(FileInputStream.java:195) + at java.io.FileInputStream.(FileInputStream.java:138) + at java.io.FileInputStream.(FileInputStream.java:93) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) + ... 75 more + +!ENTRY org.eclipse.ui 4 0 2017-04-06 02:31:05.552 +!MESSAGE Unhandled event loop exception +!STACK 0 +org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) + at org.eclipse.swt.SWT.error(SWT.java:4533) + at org.eclipse.swt.SWT.error(SWT.java:4448) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) + at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) + at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) + at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) + at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) + at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) + at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) + at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:472) + at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) + at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) + at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) + at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) + at java.io.FileInputStream.open0(Native Method) + at java.io.FileInputStream.open(FileInputStream.java:195) + at java.io.FileInputStream.(FileInputStream.java:138) + at java.io.FileInputStream.(FileInputStream.java:93) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) + ... 47 more +!SESSION 2017-04-06 02:49:58.774 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-06 02:50:15.871 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-04-06 02:50:30.453 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-06 02:50:42.826 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. + +!ENTRY org.eclipse.jface.text 2 0 2017-04-06 03:01:55.359 +!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number' + +!ENTRY org.eclipse.jface.text 2 0 2017-04-06 03:01:55.361 +!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round' + +!ENTRY org.eclipse.equinox.event 4 0 2017-04-06 03:04:22.938 +!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@116c5bfa (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), org.eclipse.e4.data={ChangedElement=org.eclipse.e4.ui.model.application.ui.menu.impl.MenuSeparatorImpl@116c5bfa (elementId: additions, tags: [org.eclipse.jface.action.GroupMarker.GroupMarker(String)], contributorURI: null) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer@2ff2a096, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, mnemonics: null), AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true}, AttName=visible, EventType=SET, OldValue=false, Widget=null, NewValue=true} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@456839ee +!STACK 0 +org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。)) + at org.eclipse.swt.SWT.error(SWT.java:4533) + at org.eclipse.swt.SWT.error(SWT.java:4448) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:175) + at org.eclipse.tm.terminal.view.ui.local.showin.ExternalExecutablesManager.loadImage(ExternalExecutablesManager.java:264) + at org.eclipse.tm.terminal.view.ui.local.showin.DynamicContributionItems.getContributionItems(DynamicContributionItems.java:77) + at org.eclipse.ui.actions.CompoundContributionItem.getContributionItemsToFill(CompoundContributionItem.java:86) + at org.eclipse.ui.actions.CompoundContributionItem.fill(CompoundContributionItem.java:59) + at org.eclipse.ui.internal.menus.DynamicMenuContributionItem.fill(DynamicMenuContributionItem.java:147) + at org.eclipse.jface.action.MenuManager.doItemFill(MenuManager.java:728) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:810) + at org.eclipse.jface.action.MenuManager.update(MenuManager.java:669) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.scheduleManagerUpdate(MenuManagerRenderer.java:1185) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.access$3(MenuManagerRenderer.java:1180) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer$3.handleEvent(MenuManagerRenderer.java:247) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) + at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) + at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) + at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) + at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) + at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) + at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) + at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) + at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) + at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) + at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) + at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) + at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) + at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) + at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) + at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) + at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setVisible(UIElementImpl.java:345) + at org.eclipse.e4.ui.workbench.renderers.swt.ContributionRecord.updateVisibility(ContributionRecord.java:110) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:189) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRendererFilter.updateElementVisibility(MenuManagerRendererFilter.java:200) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.showMenu(MenuManagerShowProcessor.java:232) + at org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor.menuAboutToHide(MenuManagerShowProcessor.java:114) + at org.eclipse.jface.internal.MenuManagerEventHelper.showEventPostHelper(MenuManagerEventHelper.java:92) + at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:471) + at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465) + at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:497) + at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:256) + at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) + at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103) + at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084) + at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:5160) + at org.eclipse.swt.widgets.Control.windowProc(Control.java:4828) + at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359) + at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656) + at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199) + at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110) + at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) + at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:262) + at org.eclipse.swt.widgets.Display.runPopups(Display.java:4277) + at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3818) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) + at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) + at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) + at org.eclipse.equinox.launcher.Main.run(Main.java:1519) +Caused by: java.io.FileNotFoundException: d:\Program Files\Git\mingw64\share\git\git-for-windows.ico (系统找不到指定的路径。) + at java.io.FileInputStream.open0(Native Method) + at java.io.FileInputStream.open(FileInputStream.java:195) + at java.io.FileInputStream.(FileInputStream.java:138) + at java.io.FileInputStream.(FileInputStream.java:93) + at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:172) + ... 75 more +!SESSION 2017-04-17 03:24:29.378 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-17 03:24:51.826 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-04-17 03:25:49.972 ----------------------------------------------- +eclipse.buildId=4.6.3.M20170301-0400 +java.version=1.8.0_121 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-04-17 03:25:58.567 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-08-28 00:39:00.693 ----------------------------------------------- +eclipse.buildId=4.7.0.I20170612-0950 +java.version=1.8.0_144 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-08-28 00:39:15.622 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-08-28 00:40:50.014 ----------------------------------------------- +eclipse.buildId=4.7.0.I20170612-0950 +java.version=1.8.0_144 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-08-28 00:41:00.718 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-08-28 00:42:12.549 ----------------------------------------------- +eclipse.buildId=4.7.0.I20170612-0950 +java.version=1.8.0_144 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-08-28 00:42:24.071 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-08-28 00:43:41.933 ----------------------------------------------- +eclipse.buildId=4.7.0.I20170612-0950 +java.version=1.8.0_144 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-08-28 00:43:52.374 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2017-08-28 00:49:21.174 ----------------------------------------------- +eclipse.buildId=4.7.0.I20170612-0950 +java.version=1.8.0_144 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2017-08-28 00:49:54.423 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\jinyu'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. diff --git a/.metadata/.mylyn/.tasks.xml.zip b/.metadata/.mylyn/.tasks.xml.zip index ed2df7d..c66159b 100644 Binary files a/.metadata/.mylyn/.tasks.xml.zip and b/.metadata/.mylyn/.tasks.xml.zip differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/0/209a8eaa21ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/0/209a8eaa21ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 7b15fab..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/0/209a8eaa21ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,290 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public boolean getCloseState() -{ - return isClose; -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readData() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} -public String getRemoteHost() { -return socket.getSession().getDestination().getAddress().getHostName(); - -} -public int getRemotePort() { - return socket.getSession().getDestination().getPort(); -} -public long getID() { - - return socketID; -} - - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/0/c0b151e22dac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/0/c0b151e22dac001710ff8a7c6bda0fb8 deleted file mode 100644 index 3daf557..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/0/c0b151e22dac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,99 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=20; - - /** - * ָ - * @param data - * @return - */ - public static byte[][] splitData(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize>0?1:0; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,infobytes.length,PackagetCharSet.CharSet); - if(!serverinfp.equals("initServer:"+f.getName())) - { - client.close(); - return; - } - //client.decreNum(); - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - //ByteBuffer buffer=ByteBuffer.wrap(buf); - - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count+name.length+4]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - } - - } - client.close(); - dis.close(); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1/e085ced59aad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/1/e085ced59aad0017181ed9113883eda9 deleted file mode 100644 index 4cb59bf..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/1/e085ced59aad0017181ed9113883eda9 +++ /dev/null @@ -1,502 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) -// { -// //ȵǰͰ cd -// lastAckSequenceNumber=ackNumber; -// } - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1/f0f3e82c6fa800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/1/f0f3e82c6fa800171a8482560d609ceb deleted file mode 100644 index a5ca7b7..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/1/f0f3e82c6fa800171a8482560d609ceb +++ /dev/null @@ -1,104 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ConcurrentHashMap; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); -// private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - int num=0; - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - // - if(!list.isEmpty()) - { - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - } - log.info(":"+); - } - client.close(); - dis.close(); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/10/709e69df58ac00171c63d91e40f02a62 b/.metadata/.plugins/org.eclipse.core.resources/.history/10/709e69df58ac00171c63d91e40f02a62 deleted file mode 100644 index d76732b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/10/709e69df58ac00171c63d91e40f02a62 +++ /dev/null @@ -1,152 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.UnsupportedEncodingException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=20*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - //client.decreNum(); - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - //ByteBuffer buffer=ByteBuffer.wrap(buf); - - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count+name.length+4]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - } - - } - client.close(); - dis.close(); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/10/d0aa129d98ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/10/d0aa129d98ad0017181ed9113883eda9 deleted file mode 100644 index f809a3a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/10/d0aa129d98ad0017181ed9113883eda9 +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.IOException; -import java.util.logging.Logger; - - - - -/** - * @author jinyu - * - */ -public class TestRecFiles { - private static Logger log=Logger.getLogger(TestRecFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //192.168.30.128 - RecviceFiles rec=new RecviceFiles(); - String dir="F://dbfile"; - rec.setDir(dir); - rec.start("192.168.30.128", 5555); - log.info("ļ"); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/10/f0565a8d18ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/10/f0565a8d18ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 2452ee7..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/10/f0565a8d18ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,12 +0,0 @@ -/** - * - */ -package judp; - -/** - * @author jinyu - * - */ -public class PackagetSub { - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/12/90ddb49ea2ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/12/90ddb49ea2ad0017181ed9113883eda9 deleted file mode 100644 index 0df1509..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/12/90ddb49ea2ad0017181ed9113883eda9 +++ /dev/null @@ -1,103 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.StringReader; -import java.net.URL; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; -import org.w3c.dom.NodeList; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - -/** - * @author jinyu - * - */ -public class ReadXml { - public static String getPath() { - URL url = ReadXml.class.getProtectionDomain().getCodeSource().getLocation(); - String filePath = null; - try { - filePath = URLDecoder.decode(url.getPath(), "utf-8");// תΪutf-8 - } catch (Exception e) { - e.printStackTrace(); - } - if (filePath.endsWith(".jar")) {// ִjarеĽ".jar" - // ȡ·еjar - filePath = filePath.substring(0, filePath.lastIndexOf("/") + 1); - } - - File file = new File(filePath); - - // /If this abstract pathname is already absolute, then the pathname - // string is simply returned as if by the getPath method. If this - // abstract pathname is the empty abstract pathname then the pathname - // string of the current user directory, which is named by the system - // property user.dir, is returned. - filePath = file.getAbsolutePath();//õwindowsµȷ· - return filePath; - } -public String readXml(String file) -{ - File f=new File(file); - if(!f.exists()) - { - return ""; - } - // - String xmlStr= readFile(file); - StringReader sr = new StringReader(xmlStr); - InputSource is = new InputSource(sr); - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - DocumentBuilder builder = null; - try { - builder = factory.newDocumentBuilder(); - } catch (ParserConfigurationException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - Document doc = null; - try { - doc = (Document) builder.parse(is); - } catch (SAXException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - NodeList list=doc.getElementsByTagName("IP"); - String ip= list.item(0).getTextContent(); - list=doc.getElementsByTagName("Port"); - String port=list.item(0).getTextContent(); - list=doc.getElementsByTagName("Dir"); - String dir=list.item(0).getTextContent(); - String strxml=ip+","+port+","+dir; - return strxml; - } -private String readFile(String file) -{ - StringBuilder result = new StringBuilder(); - try{ - BufferedReader br = new BufferedReader(new FileReader(file));//һBufferedReaderȡļ - String s = null; - while((s = br.readLine())!=null){//ʹreadLineһζһ - result.append(System.lineSeparator()+s); - } - br.close(); - }catch(Exception e){ - e.printStackTrace(); - } - return result.toString(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/12/e051f64398ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/12/e051f64398ad0017181ed9113883eda9 deleted file mode 100644 index 377ac17..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/12/e051f64398ad0017181ed9113883eda9 +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - */ -package net.File; - -import java.util.logging.Logger; - -import net.File.FileMonitor; -import net.File.FilesWatch; - - - - -/** - * @author jinyu - * - */ -public class TestSendFiles { - private static Logger log=Logger.getLogger(TestSendFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //SendFiles send=new SendFiles("192.168.9.152", 5555); - //192.168.30.128 - SendFiles send=new SendFiles("192.168.30.128", 5555); - FilesWatch watch=new FilesWatch(); - String dir="F:/monitor"; - watch.setWatch(dir); - watch.start(); - while(true) - { - FileMonitor ff= watch.take(); - log.info(ff.file); - if(ff.file.endsWith(".tmp")) - { - continue; - } - send.sendFile(dir+"/"+ff.file); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/13/10bc98feb5ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/13/10bc98feb5ac001716b9ca6d5abb90bc deleted file mode 100644 index eba3680..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/13/10bc98feb5ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,192 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.DatagramPacket; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.KeepAlive; -import udt.packets.Shutdown; - -/** - * server side session in client-server mode - */ -public class ServerSession extends UDTSession { - - private static final Logger logger=Logger.getLogger(ServerSession.class.getName()); - - private final UDPEndPoint endPoint; - - //last received packet (for testing purposes) - private UDTPacket lastPacket; - - - public ServerSession(DatagramPacket dp, UDPEndPoint endPoint)throws SocketException,UnknownHostException{ - super("ServerSession localPort="+endPoint.getLocalPort()+" peer="+dp.getAddress()+":"+dp.getPort(),new Destination(dp.getAddress(),dp.getPort())); - this.endPoint=endPoint; - logger.info("Created "+toString()+" talking to "+dp.getAddress()+":"+dp.getPort()); - } - - int n_handshake=0; - - @Override - public void received(UDTPacket packet, Destination peer){ - lastPacket=packet; - - if(packet instanceof ConnectionHandshake) { - ConnectionHandshake connectionHandshake=(ConnectionHandshake)packet; - logger.info("Received "+connectionHandshake); - - if (getState()<=ready){ - destination.setSocketID(connectionHandshake.getSocketID()); - - if(getState()<=handshaking){ - setState(handshaking); - } - try{ - handleHandShake(connectionHandshake); - n_handshake++; - try{ - setState(ready); - socket=new UDTSocket(endPoint, this); - cc.init(); - }catch(Exception uhe){ - //session is invalid - logger.log(Level.SEVERE,"",uhe); - setState(invalid); - } - }catch(IOException ex){ - //session invalid - logger.log(Level.WARNING,"Error processing ConnectionHandshake",ex); - setState(invalid); - } - return; - } - - }else if(packet instanceof KeepAlive) { - socket.getReceiver().resetEXPTimer(); - active = true; - return; - } - - if(getState()== ready) { - active = true; - - if (packet instanceof KeepAlive) { - //nothing to do here - return; - }else if (packet instanceof Shutdown) { - try{ - socket.getReceiver().stop(); - }catch(IOException ex){ - logger.log(Level.WARNING,"",ex); - } - setState(shutdown); - System.out.println("SHUTDOWN ***"); - active = false; - logger.info("Connection shutdown initiated by the other side."); - return; - } - - else{ - try{ - long seqNo=packet.getPacketSequenceNumber(); - logger.info("DataPacket:"+seqNo); - if(packet.forSender()){ - socket.getSender().receive(packet); - }else{ - socket.getReceiver().receive(packet); - } - }catch(Exception ex){ - //session invalid - logger.log(Level.SEVERE,"",ex); - setState(invalid); - } - } - return; - - } - - - } - - /** - * for testing use only - */ - UDTPacket getLastPacket(){ - return lastPacket; - } - - /** - * handle the connection handshake:
- *
    - *
  • set initial sequence number
  • - *
  • send response handshake
  • - *
- * @param handshake - * @param peer - * @throws IOException - */ - protected void handleHandShake(ConnectionHandshake handshake)throws IOException{ - ConnectionHandshake responseHandshake = new ConnectionHandshake(); - //compare the packet size and choose minimun - long clientBufferSize=handshake.getPacketSize(); - long myBufferSize=getDatagramSize(); - long bufferSize=Math.min(clientBufferSize, myBufferSize); - long initialSequenceNumber=handshake.getInitialSeqNo(); - setInitialSequenceNumber(initialSequenceNumber); - setDatagramSize((int)bufferSize); - responseHandshake.setPacketSize(bufferSize); - responseHandshake.setUdtVersion(4); - responseHandshake.setInitialSeqNo(initialSequenceNumber); - responseHandshake.setConnectionType(-1); - responseHandshake.setMaxFlowWndSize(handshake.getMaxFlowWndSize()); - //tell peer what the socket ID on this side is - responseHandshake.setSocketID(mySocketID); - responseHandshake.setDestinationID(this.getDestination().getSocketID()); - responseHandshake.setSession(this); - logger.info("Sending reply "+responseHandshake); - endPoint.doSend(responseHandshake); - } - - - - -} - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/13/e0517759cbac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/13/e0517759cbac001716b9ca6d5abb90bc deleted file mode 100644 index 3a6e18d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/13/e0517759cbac001716b9ca6d5abb90bc +++ /dev/null @@ -1,194 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - //this.position=new HashSet(size); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - buffer[insert]=data; - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else return null; - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - /** - * ظ - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/14/0005620c24ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/14/0005620c24ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 4afc100..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/14/0005620c24ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,328 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public boolean getCloseState() -{ - return isClose; -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readData() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪread[] - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(isClose) - { - return false; - } - byte[][]result=PackagetSub.split(data); - for(int i=0;i position; - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.position=new HashSet(size); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - buffer[insert]=data; - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else return null; - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - /** - * ظ - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/14/c081423d1cac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/14/c081423d1cac001710ff8a7c6bda0fb8 deleted file mode 100644 index e7800ce..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/14/c081423d1cac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,32 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] data; -public long id; -public DataStruct(int num) -{ - data=new byte[num][]; -} -public boolean addData(byte[]data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - int index=buf.getInt(); - dataLen=buf.getInt(); - byte[] tmp=new byte[buf.limit()-buf.position()]; - buf.get(tmp); - data[index]=tmp; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/15/503d09ac4fac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/15/503d09ac4fac001710ff8a7c6bda0fb8 deleted file mode 100644 index 93433e1..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/15/503d09ac4fac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,246 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public int dataLen=0; - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData=null; - if(dataLen==0) - { - sendData=PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - sendData=sub.split(data, dataLen); - } - for(int i=0;i - * - */ -public class SocketReference extends WeakReference { - private long socketid=-1; - public SocketReference(T referent) { - super(referent); - - } - public SocketReference(T referent,long id) { - super(referent); - this.socketid=id; - } - public SocketReference(judpSocket socket, long socketID2, ReferenceQueue q) { - - } - public long getid() - { - return socketid; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/16/109c5e88d6ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/16/109c5e88d6ac001716b9ca6d5abb90bc deleted file mode 100644 index 952c0ed..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/16/109c5e88d6ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,288 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡҲҪⲿٶȡ - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(islagerRead) - { - // cd Ϊݶȡ׼ - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - } - else - { - //ԭ룬Сݽȫ - buffer[insert]=data; - numValidChunks.incrementAndGet(); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - - if(this.islagerRead) - { - //cd - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(this.islagerRead) - { - // cd - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - - if(readPosition==size) - {readPosition=0; - if(this.islagerRead) - { - //cd - clearDeHash(this.size-leftNum); - } - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } - - /** - * ô - * @param islarge - */ - public void setlargeRead(boolean islarge) - { - this.islagerRead=islarge; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/16/406135d6daac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/16/406135d6daac001716b9ca6d5abb90bc deleted file mode 100644 index ab96466..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/16/406135d6daac001716b9ca6d5abb90bc +++ /dev/null @@ -1,284 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public int dataLen=0; - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - System.out.println("sendBlocking start"); - client.sendBlocking(data); - r=data.length; - sumLen+=r; - System.out.println("sendBlocking end"); - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData=null; - if(dataLen==0) - { - sendData=PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - sendData=sub.split(data, dataLen); - } - for(int i=0;i hashMap=new WeakHashMap (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("socket"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/17/30f8db4bd8ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/17/30f8db4bd8ac001716b9ca6d5abb90bc deleted file mode 100644 index b510793..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/17/30f8db4bd8ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,338 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public void setRecBufferSize(int size) -{ - bufSize=size; -} -public boolean getCloseState() -{ - //ײѾر - return isClose|socket.isClose(); -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(getCloseState()) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - while(true) - { - if(getCloseState()) - { - return null; - } - r=readData(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } - - return result; -} - - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(getCloseState()) - { - return false; - } - try { - - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(getCloseState()) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;i fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/timespan/1000; - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/17/80cd43731aac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/17/80cd43731aac001710ff8a7c6bda0fb8 deleted file mode 100644 index 4f568b8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/17/80cd43731aac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,73 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=16; - public static byte[][] split(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i0?1:0; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;isendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;s0) - { - if(lastAckSequenceNumber/10000!=ackNumber/10000) - { - // - //ackNumber رȫɾرСһɾ - if(lastAckSequenceNumberthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - // - } - } - } - } - - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/18/006c2690d8ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/18/006c2690d8ac001716b9ca6d5abb90bc deleted file mode 100644 index f45ab0f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/18/006c2690d8ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,368 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public void setRecBufferSize(int size) -{ - bufSize=size; -} -public boolean getCloseState() -{ - //ײѾر - return isClose|socket.isClose(); -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(getCloseState()) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - while(true) - { - if(getCloseState()) - { - return null; - } - r=readData(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } - - return result; -} - - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(getCloseState()) - { - return false; - } - try { - - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(getCloseState()) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;i hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - // TODO Auto-generated method stub - - } - - }) - -} - -public static synchronized SocketControls getInstance() { - - if (instance == null) { - - instance = new SocketControls(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/18/6065932703ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/18/6065932703ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 04c314e..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/18/6065932703ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,16 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; - -/** - * @author jinyu - * @param - * - */ -public class SocketReference extends WeakReference { - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/18/c05c601f6da800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/18/c05c601f6da800171a8482560d609ceb deleted file mode 100644 index 9361825..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/18/c05c601f6da800171a8482560d609ceb +++ /dev/null @@ -1,42 +0,0 @@ -/** - * ļTestRecFile.java - * - * 汾Ϣ - * ڣ2017827 - * Copyright Corporation 2017 - * Ȩ - * - */ -package Test; - -import java.io.IOException; - -import judp.judpRecviceFile; - -/** - * - * Ŀƣjudp - * ƣTestRecFile - * - * ˣjinyu - * ʱ䣺2017827 6:32:42 - * ޸ˣjinyu - * ޸ʱ䣺2017827 6:32:42 - * ޸ıע - * @version - * - */ -public class TestRecFiles { - - public static void main(String[] args) { - judpRecviceFile rec=new judpRecviceFile("127.0.0.1", 5555, "E:\\Study\\java\\filesudt\\send\\12.rmvb", "E:\\Study\\java\\filesudt\\rec\\1.rmvb"); - rec.start(); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/18/f0e7afc269a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/18/f0e7afc269a800171a8482560d609ceb deleted file mode 100644 index 6c21308..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/18/f0e7afc269a800171a8482560d609ceb +++ /dev/null @@ -1,114 +0,0 @@ -/** - * - */ -package judp; - -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.SynchronousQueue; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean Start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - //judpSocket jsocket=new judpSocket(csocket); - - //SocketManager.getInstance().addGC(jsocket,csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ -try { - UDTSocket socket=SocketControls.getInstance().getSocket(); - judpSocket jsocket= sessionHandoff.take(); - return jsocket; -} catch (InterruptedException e) { - logger.info("judpSocketжϣ"+e.getMessage()); - e.printStackTrace(); -} -return null; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/19/00d683551aac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/19/00d683551aac001710ff8a7c6bda0fb8 deleted file mode 100644 index a08d983..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/19/00d683551aac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,77 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=16; - public static byte[][] split(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - byte[][] result=new byte[num][]; - for(int i=0;i hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ - buffer[insert]=data; - } - else if(!isRWMaster) - { - //Ը - buffer[insert]=data; - } - buffer[insert]=data; - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else return null; - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/19/60d4a2c04fac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/19/60d4a2c04fac001710ff8a7c6bda0fb8 deleted file mode 100644 index 95cee2d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/19/60d4a2c04fac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,139 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.UnsupportedEncodingException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=20*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i hash=new ConcurrentHashMap(); - private ConcurrentLinkedQueue queue=new ConcurrentLinkedQueue(); -public boolean addData(byte[] data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - DataStruct struct=hash.get(id); - if(struct==null) - { - struct=new DataStruct(num); - hash.put(id, struct); - } - boolean r= struct.addData(data); - if(r) - { - byte[]result =struct.getData(); - byte[] tmp=new byte[result.length]; - System.arraycopy(result, 0, tmp, 0, tmp.length); - queue.offer(tmp); - struct.clear(); - } - return r; - -} -public byte[] getData() -{ - return queue.poll(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1a/f0fb59a4a1ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/1a/f0fb59a4a1ad0017181ed9113883eda9 deleted file mode 100644 index cea913a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/1a/f0fb59a4a1ad0017181ed9113883eda9 +++ /dev/null @@ -1,50 +0,0 @@ -/** - * - */ -package net.File; - -import java.util.logging.Logger; - -import net.File.FileMonitor; -import net.File.FilesWatch; - - - - -/** - * @author jinyu - * - */ -public class TestSendFiles { - private static Logger log=Logger.getLogger(TestSendFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //SendFiles send=new SendFiles("192.168.9.152", 5555); - //192.168.30.128 - ReadXml rd=new ReadXml(); - String xml= rd.readXml("config.xml"); - String[] config=null; - if(xml!=null) - { - config=xml.split(","); - } - SendFiles send=new SendFiles(config[0], Integer.valueOf(config[1])); - FilesWatch watch=new FilesWatch(); - String dir=config[2]; - watch.setWatch(dir); - watch.start(); - while(true) - { - FileMonitor ff= watch.take(); - log.info(ff.file); - if(ff.file.endsWith(".tmp")) - { - continue; - } - send.sendFile(dir+"/"+ff.file); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1b/201f78bc6da800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/1b/201f78bc6da800171a8482560d609ceb deleted file mode 100644 index 9842219..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/1b/201f78bc6da800171a8482560d609ceb +++ /dev/null @@ -1,56 +0,0 @@ -/** - * ļTestSendFile.java - * - * 汾Ϣ - * ڣ2017827 - * Copyright Corporation 2017 - * Ȩ - * - */ -package Test; - -import java.io.IOException; - -import judp.judpSendFile; - -/** - * - * Ŀƣjudp - * ƣTestSendFile - * - * ˣjinyu - * ʱ䣺2017827 6:32:25 - * ޸ˣjinyu - * ޸ʱ䣺2017827 6:32:25 - * ޸ıע - * @version - * - */ -public class TestSendFile { - - /** - - * TODO( C ѡ) - - * @param name - - * @return - - * - - - */ - public static void main(String[] args) { - judpSendFile jsend=new judpSendFile("192.168.10.86",5555); - jsend.startSend(); - - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1c/404d73a415ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/1c/404d73a415ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 65a5a4a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/1c/404d73a415ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.IOException; -import java.util.logging.Logger; - - - - -/** - * @author jinyu - * - */ -public class TestRecFiles { - private static Logger log=Logger.getLogger(TestRecFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - RecviceFiles rec=new RecviceFiles(); - String dir="F://dbfile"; - rec.setDir(dir); - rec.start("127.0.0.1", 5555); - log.info("ļ"); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1c/509f6ba4c9ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/1c/509f6ba4c9ac001716b9ca6d5abb90bc deleted file mode 100644 index 922b432..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/1c/509f6ba4c9ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,193 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.DatagramPacket; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.KeepAlive; -import udt.packets.Shutdown; - -/** - * server side session in client-server mode - */ -public class ServerSession extends UDTSession { - - private static final Logger logger=Logger.getLogger(ServerSession.class.getName()); - - private final UDPEndPoint endPoint; - - //last received packet (for testing purposes) - private UDTPacket lastPacket; - - - public ServerSession(DatagramPacket dp, UDPEndPoint endPoint)throws SocketException,UnknownHostException{ - super("ServerSession localPort="+endPoint.getLocalPort()+" peer="+dp.getAddress()+":"+dp.getPort(),new Destination(dp.getAddress(),dp.getPort())); - this.endPoint=endPoint; - logger.info("Created "+toString()+" talking to "+dp.getAddress()+":"+dp.getPort()); - } - - int n_handshake=0; - - @Override - public void received(UDTPacket packet, Destination peer){ - lastPacket=packet; - - if(packet instanceof ConnectionHandshake) { - ConnectionHandshake connectionHandshake=(ConnectionHandshake)packet; - logger.info("Received "+connectionHandshake); - - if (getState()<=ready){ - destination.setSocketID(connectionHandshake.getSocketID()); - - if(getState()<=handshaking){ - setState(handshaking); - } - try{ - handleHandShake(connectionHandshake); - n_handshake++; - try{ - setState(ready); - socket=new UDTSocket(endPoint, this); - cc.init(); - }catch(Exception uhe){ - //session is invalid - logger.log(Level.SEVERE,"",uhe); - setState(invalid); - } - }catch(IOException ex){ - //session invalid - logger.log(Level.WARNING,"Error processing ConnectionHandshake",ex); - setState(invalid); - } - return; - } - - }else if(packet instanceof KeepAlive) { - socket.getReceiver().resetEXPTimer(); - active = true; - return; - } - - if(getState()== ready) { - active = true; - - if (packet instanceof KeepAlive) { - //nothing to do here - return; - }else if (packet instanceof Shutdown) { - try{ - socket.getReceiver().stop(); - }catch(IOException ex){ - logger.log(Level.WARNING,"",ex); - } - setState(shutdown); - System.out.println("SHUTDOWN ***"); - active = false; - logger.info("Connection shutdown initiated by the other side."); - return; - } - - else{ - try{ - long seqNo=packet.getPacketSequenceNumber(); - if(seqNo!=-1) - logger.info("DataPacket session:"+seqNo); - if(packet.forSender()){ - socket.getSender().receive(packet); - }else{ - socket.getReceiver().receive(packet); - } - }catch(Exception ex){ - //session invalid - logger.log(Level.SEVERE,"",ex); - setState(invalid); - } - } - return; - - } - - - } - - /** - * for testing use only - */ - UDTPacket getLastPacket(){ - return lastPacket; - } - - /** - * handle the connection handshake:
- *
    - *
  • set initial sequence number
  • - *
  • send response handshake
  • - *
- * @param handshake - * @param peer - * @throws IOException - */ - protected void handleHandShake(ConnectionHandshake handshake)throws IOException{ - ConnectionHandshake responseHandshake = new ConnectionHandshake(); - //compare the packet size and choose minimun - long clientBufferSize=handshake.getPacketSize(); - long myBufferSize=getDatagramSize(); - long bufferSize=Math.min(clientBufferSize, myBufferSize); - long initialSequenceNumber=handshake.getInitialSeqNo(); - setInitialSequenceNumber(initialSequenceNumber); - setDatagramSize((int)bufferSize); - responseHandshake.setPacketSize(bufferSize); - responseHandshake.setUdtVersion(4); - responseHandshake.setInitialSeqNo(initialSequenceNumber); - responseHandshake.setConnectionType(-1); - responseHandshake.setMaxFlowWndSize(handshake.getMaxFlowWndSize()); - //tell peer what the socket ID on this side is - responseHandshake.setSocketID(mySocketID); - responseHandshake.setDestinationID(this.getDestination().getSocketID()); - responseHandshake.setSession(this); - logger.info("Sending reply "+responseHandshake); - endPoint.doSend(responseHandshake); - } - - - - -} - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1d/d09bb2d219ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/1d/d09bb2d219ac001710ff8a7c6bda0fb8 deleted file mode 100644 index aab63e6..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/1d/d09bb2d219ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,74 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=20; - public static byte[][] split(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - byte[][] data=new byte[num][]; - for(int i=0;i fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData(byte[] data) - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - byte[]tmp=recQueue.poll(); - if(writeFile(tmp)) - { - ss.close(); - break; - } - } - - } - - }); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1e/6080d540c8ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/1e/6080d540c8ac001716b9ca6d5abb90bc deleted file mode 100644 index 86114b4..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/1e/6080d540c8ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,195 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - //private final HashSet position; - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.position=new HashSet(size); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - buffer[insert]=data; - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else return null; - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - /** - * ظ - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1e/c080de4460ac00171ca19969f19d2325 b/.metadata/.plugins/org.eclipse.core.resources/.history/1e/c080de4460ac00171ca19969f19d2325 deleted file mode 100644 index be396f8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/1e/c080de4460ac00171ca19969f19d2325 +++ /dev/null @@ -1,238 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; -import java.io.IOException; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.nio.ByteBuffer; -import java.util.concurrent.TimeUnit; - -import udt.packets.DataPacket; - -/** - * UDTSocket is analogous to a normal java.net.Socket, it provides input and - * output streams for the application - * - * TODO is it possible to actually extend java.net.Socket ? - * - * - */ -public class UDTSocket { - //һsessionӦһudtsocket - //endpoint - private final UDPEndPoint endpoint; - - private volatile boolean active; - - private volatile boolean close=false;//رձʶcd - - //processing received data - private UDTReceiver receiver; - private UDTSender sender; - - private final UDTSession session; - - private UDTInputStream inputStream; - private UDTOutputStream outputStream; - - /** - * @param host - * @param port - * @param endpoint - * @throws SocketException,UnknownHostException - */ - public UDTSocket(UDPEndPoint endpoint, UDTSession session)throws SocketException,UnknownHostException{ - this.endpoint=endpoint; - this.session=session; - this.receiver=new UDTReceiver(session,endpoint); - this.sender=new UDTSender(session,endpoint); - } - - public UDTReceiver getReceiver() { - return receiver; - } - - public void setReceiver(UDTReceiver receiver) { - this.receiver = receiver; - } - - public UDTSender getSender() { - return sender; - } - - public void setSender(UDTSender sender) { - this.sender = sender; - } - - public void setActive(boolean active) { - this.active = active; - } - - public boolean isActive() { - return active; - } - - public UDPEndPoint getEndpoint() { - return endpoint; - } - - public boolean isClose() - { - return close; - } - /** - * get the input stream for reading from this socket - * @return - */ - public synchronized UDTInputStream getInputStream()throws IOException{ - if(inputStream==null){ - inputStream=new UDTInputStream(this); - } - return inputStream; - } - - /** - * get the output stream for writing to this socket - * @return - */ - public synchronized UDTOutputStream getOutputStream(){ - if(outputStream==null){ - outputStream=new UDTOutputStream(this); - } - return outputStream; - } - - public final UDTSession getSession(){ - return session; - } - - /** - * write single block of data without waiting for any acknowledgement - * @param data - */ - protected void doWrite(byte[]data)throws IOException{ - doWrite(data, 0, data.length); - - } - - /** - * write the given data - * @param data - the data array - * @param offset - the offset into the array - * @param length - the number of bytes to write - * @throws IOException - */ - protected void doWrite(byte[]data, int offset, int length)throws IOException{ - try{ - doWrite(data, offset, length, Integer.MAX_VALUE, TimeUnit.MILLISECONDS); - }catch(InterruptedException ie){ - IOException io=new IOException(); - io.initCause(ie); - throw io; - } - } - - /** - * write the given data, waiting at most for the specified time if the queue is full - * @param data - * @param offset - * @param length - * @param timeout - * @param units - * @throws IOException - if data cannot be sent - * @throws InterruptedException - */ - protected void doWrite(byte[]data, int offset, int length, int timeout, TimeUnit units)throws IOException,InterruptedException{ - int chunksize=session.getDatagramSize()-24;//need some bytes for the header - ByteBuffer bb=ByteBuffer.wrap(data,offset,length); - long seqNo=0; - while(bb.remaining()>0){ - int len=Math.min(bb.remaining(),chunksize); - byte[]chunk=new byte[len]; - bb.get(chunk); - DataPacket packet=new DataPacket(); - seqNo=sender.getNextSequenceNumber(); - packet.setPacketSequenceNumber(seqNo); - packet.setSession(session); - packet.setDestinationID(session.getDestination().getSocketID()); - packet.setData(chunk); - System.out.println("sender sendUdtPacket1"); - //put the packet into the send queue - if(!sender.sendUdtPacket(packet, timeout, units)){ - throw new IOException("Queue full"); - } - System.out.println("sender sendUdtPacket2"); - } - if(length>0)active=true; - System.out.println("sender sendUdtPacket out"); - } - /** - * will block until the outstanding packets have really been sent out - * and acknowledged - */ - protected void flush() throws InterruptedException{ - if(!active)return; - final long seqNo=sender.getCurrentSequenceNumber(); - if(seqNo<0)throw new IllegalStateException(); - while(!sender.isSentOut(seqNo)){ - Thread.sleep(5); - } - if(seqNo>-1){ - //wait until data has been sent out and acknowledged - while(active && !sender.haveAcknowledgementFor(seqNo)){ - sender.waitForAck(seqNo); - } - } - //TODO need to check if we can pause the sender... - //sender.pause(); - } - - //writes and wait for ack - protected void doWriteBlocking(byte[]data)throws IOException, InterruptedException{ - doWrite(data); - System.out.println("flush"); - flush(); - } - - /** - * close the connection - * @throws IOException - */ - public void close()throws IOException{ - if(inputStream!=null)inputStream.close(); - if(outputStream!=null)outputStream.close(); - active=false; - close=true; - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1e/e06c053c27ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/1e/e06c053c27ac001710ff8a7c6bda0fb8 deleted file mode 100644 index b853b8c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/1e/e06c053c27ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,328 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public boolean getCloseState() -{ - return isClose; -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(isClose) - { - return false; - } - byte[][]result=PackagetSub.splitData(data); - for(int i=0;i hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - // - if(!list.isEmpty()) - { - for(int i=0;i fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - - /** - * дļ - */ - private void recData() - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - byte[]tmp=recQueue.poll(); - if(tmp==null) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - continue; - } - if(writeFile(tmp)) - { - isStop=true; - break; - } - } - - } - - }); - fileW.setDaemon(true); - fileW.setName(fileName+"_Thread"); - fileW.start(); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - else - { - recData(); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - // - ss.close(); - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1f/c0c69f405ca800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/1f/c0c69f405ca800171a8482560d609ceb deleted file mode 100644 index c61f259..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/1f/c0c69f405ca800171a8482560d609ceb +++ /dev/null @@ -1,211 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.UDTStatistics; - -public class UDTClient { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - private final UDPEndPoint clientEndpoint; - private ClientSession clientSession; - private boolean close=false; - private Thread closeThread=null;//cd - public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address,localport); - logger.info("Created client endpoint on port "+localport); - } - - public UDTClient(InetAddress address)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address); - logger.info("Created client endpoint on port "+clientEndpoint.getLocalPort()); - } - - public UDTClient(UDPEndPoint endpoint)throws SocketException, UnknownHostException{ - clientEndpoint=endpoint; - } - - /** - * establishes a connection to the given server. - * Starts the sender thread. - * @param host - * @param port - * @throws UnknownHostException - */ - public void connect(String host, int port)throws InterruptedException, UnknownHostException, IOException{ - InetAddress address=InetAddress.getByName(host); - Destination destination=new Destination(address,port); - //create client session... - clientSession=new ClientSession(clientEndpoint,destination); - clientEndpoint.addSession(clientSession.getSocketID(), clientSession); - - clientEndpoint.start(); - clientSession.connect(); - //wait for handshake - while(!clientSession.isReady()){ - Thread.sleep(500); - } - logger.info("The UDTClient is connected"); - Thread.sleep(500); - } - - /** - * sends the given data asynchronously - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - public void send(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWrite(data); - } - - public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWriteBlocking(data); - } - - public int read(byte[]data)throws IOException, InterruptedException{ - return clientSession.getSocket().getInputStream().read(data); - } - - /** - * flush outstanding data (and make sure it is acknowledged) - * @throws IOException - * @throws InterruptedException - */ - public void flush()throws IOException, InterruptedException{ - clientSession.getSocket().flush(); - } - - - public void shutdown()throws IOException{ - - if (clientSession.isReady()&& clientSession.active==true) - { - Shutdown shutdown = new Shutdown(); - shutdown.setDestinationID(clientSession.getDestination().getSocketID()); - shutdown.setSession(clientSession); - try{ - clientEndpoint.doSend(shutdown); - TimeUnit.MILLISECONDS.sleep(100); - } - catch(Exception e) - { - logger.log(Level.SEVERE,"ERROR: Connection could not be stopped!",e); - } - clientSession.getSocket().getReceiver().stop(); - clientEndpoint.stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - close=true; - } - } - - public UDTInputStream getInputStream()throws IOException{ - return clientSession.getSocket().getInputStream(); - } - - public UDTOutputStream getOutputStream()throws IOException{ - return clientSession.getSocket().getOutputStream(); - } - - public UDPEndPoint getEndpoint()throws IOException{ - return clientEndpoint; - } - - public UDTStatistics getStatistics(){ - return clientSession.getStatistics(); - } - - public long getSocketID() - { - //cd - return clientSession.getSocketID(); - } - - /** - * ͬر - * ȴݷɺٹر - * ֻȴ10ss - */ - public synchronized void close() - { - close=true; - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - if(clientSession.getSocket().getSender().isSenderEmpty()) - { - try { - shutdown(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - else - { - TimeUnit.MILLISECONDS.sleep(100); - } - } - - } - - }); - } - - } - - public boolean isClose() - { - return close; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1f/e004bd9ee7ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/1f/e004bd9ee7ac001716b9ca6d5abb90bc deleted file mode 100644 index f809a3a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/1f/e004bd9ee7ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.IOException; -import java.util.logging.Logger; - - - - -/** - * @author jinyu - * - */ -public class TestRecFiles { - private static Logger log=Logger.getLogger(TestRecFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //192.168.30.128 - RecviceFiles rec=new RecviceFiles(); - String dir="F://dbfile"; - rec.setDir(dir); - rec.start("192.168.30.128", 5555); - log.info("ļ"); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2/b0e3a7446ba800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/2/b0e3a7446ba800171a8482560d609ceb deleted file mode 100644 index 5276bfb..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2/b0e3a7446ba800171a8482560d609ceb +++ /dev/null @@ -1,112 +0,0 @@ -/** - * - */ -package judp; - -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -//private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean Start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - //judpSocket jsocket=new judpSocket(csocket); - - //SocketManager.getInstance().addGC(jsocket,csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=SocketControls.getInstance().getSocket(); - } - judpSocket jsocket=new judpSocket(socket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/20/4057838a1aac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/20/4057838a1aac001710ff8a7c6bda0fb8 deleted file mode 100644 index e69de29..0000000 diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/20/602e70256da800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/20/602e70256da800171a8482560d609ceb deleted file mode 100644 index 6d9a951..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/20/602e70256da800171a8482560d609ceb +++ /dev/null @@ -1,56 +0,0 @@ -/** - * ļTestSendFile.java - * - * 汾Ϣ - * ڣ2017827 - * Copyright Corporation 2017 - * Ȩ - * - */ -package Test; - -import java.io.IOException; - -import judp.judpSendFile; - -/** - * - * Ŀƣjudp - * ƣTestSendFile - * - * ˣjinyu - * ʱ䣺2017827 6:32:25 - * ޸ˣjinyu - * ޸ʱ䣺2017827 6:32:25 - * ޸ıע - * @version - * - */ -public class TestSendFiles { - - /** - - * TODO( C ѡ) - - * @param name - - * @return - - * - - - */ - public static void main(String[] args) { - judpSendFile jsend=new judpSendFile("192.168.10.86",5555); - jsend.startSend(); - - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/20/c06bb2f50eac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/20/c06bb2f50eac001710ff8a7c6bda0fb8 deleted file mode 100644 index 5de1ac4..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/20/c06bb2f50eac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,101 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.util.HashMap; -import java.util.WeakHashMap; - -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - @SuppressWarnings("rawtypes") - private final ReferenceQueue q = new ReferenceQueue(); - private volatile long num=0; - /** - * ʹ - */ - private final WeakHashMap hashMap=new WeakHashMap (); - private final HashMap,Long> map=new HashMap,Long> (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @SuppressWarnings("unchecked") - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - map.remove(k); - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("socket"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - map.put(tmp, socket.getSocketID()); - if(num%10==0) - { - System.gc(); - } - num++; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/21/10bf9d62dbac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/21/10bf9d62dbac001716b9ca6d5abb90bc deleted file mode 100644 index 767dffd..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/21/10bf9d62dbac001716b9ca6d5abb90bc +++ /dev/null @@ -1,368 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public void setRecBufferSize(int size) -{ - bufSize=size; -} -public boolean getCloseState() -{ - //ײѾر - return isClose|socket.isClose(); -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(getCloseState()) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - while(true) - { - if(getCloseState()) - { - return null; - } - r=readData(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - // readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } - - return result; -} - - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(getCloseState()) - { - return false; - } - try { - - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(getCloseState()) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;isendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - // cd - private volatile int bufferNum=0; - private volatile boolean isModify=true; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - // - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/21/f0f57f2ec5ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/21/f0f57f2ec5ad0017181ed9113883eda9 deleted file mode 100644 index dda5990..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/21/f0f57f2ec5ad0017181ed9113883eda9 +++ /dev/null @@ -1,520 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - // cd - private volatile int bufferNum=0; - private volatile boolean isModify=true; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - // - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/22/3024d0d16da800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/22/3024d0d16da800171a8482560d609ceb deleted file mode 100644 index c3f6f9b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/22/3024d0d16da800171a8482560d609ceb +++ /dev/null @@ -1,42 +0,0 @@ -/** - * - */ -package net.File; - -import java.util.logging.Logger; - -import net.File.FileMonitor; -import net.File.FilesWatch; - - - - -/** - * @author jinyu - * - */ -public class TestSendFiles { - private static Logger log=Logger.getLogger(Test.TestSendFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //SendFiles send=new SendFiles("192.168.9.152", 5555); - SendFiles send=new SendFiles("127.0.0.1", 5555); - FilesWatch watch=new FilesWatch(); - String dir="F:/monitor"; - watch.setWatch(dir); - watch.start(); - while(true) - { - FileMonitor ff= watch.take(); - log.info(ff.file); - if(ff.file.endsWith(".tmp")) - { - continue; - } - send.sendFile(dir+"/"+ff.file); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/22/40a8ff391bac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/22/40a8ff391bac001710ff8a7c6bda0fb8 deleted file mode 100644 index 29298ec..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/22/40a8ff391bac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,15 +0,0 @@ -/** - * - */ -package judp; - -/** - * @author jinyu - * - */ -public class PackagetCombin { -public static void addData(byte[] data) -{ - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/22/70ca7fc634ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/22/70ca7fc634ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 5bb2e1a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/22/70ca7fc634ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,333 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public boolean getCloseState() -{ - //ײѾر - return isClose|socket.isClose(); -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(getCloseState()) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - while(true) - { - if(getCloseState()) - { - return null; - } - r=readData(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } - - return result; -} - - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(getCloseState()) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(getCloseState()) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;i hashMap=new WeakHashMap (); - private final HashMap,Long> map=new HashMap,Long> (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @SuppressWarnings("unchecked") - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - map.remove(k); - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("socket"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - - /** - * - * @param point - * @return - */ - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - - /** - * judpSocket - * @param socket - */ - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - map.put(tmp, socket.getSocketID()); - if(num%10==0) - { - System.gc(); - } - num++; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/23/00e997b8a2ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/23/00e997b8a2ad0017181ed9113883eda9 deleted file mode 100644 index 0f32eca..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/23/00e997b8a2ad0017181ed9113883eda9 +++ /dev/null @@ -1,55 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.File; -import java.util.logging.Logger; - -import net.File.FileMonitor; -import net.File.FilesWatch; - - - - -/** - * @author jinyu - * - */ -public class TestSendFiles { - private static Logger log=Logger.getLogger(TestSendFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //SendFiles send=new SendFiles("192.168.9.152", 5555); - //192.168.30.128 - String path = TestSendFiles.class.getProtectionDomain().getCodeSource().getLocation().getFile(); - int firstIndex = path.lastIndexOf(System.getProperty("path.separator")) + 1; - int lastIndex = path.lastIndexOf(File.separator) + 1; - path = path.substring(firstIndex, lastIndex); - ReadXml rd=new ReadXml(); - String xml= rd.readXml(path+"/config.xml"); - String[] config=null; - if(xml!=null) - { - config=xml.split(","); - } - SendFiles send=new SendFiles(config[0], Integer.valueOf(config[1])); - FilesWatch watch=new FilesWatch(); - String dir=config[2]; - watch.setWatch(dir); - watch.start(); - while(true) - { - FileMonitor ff= watch.take(); - log.info(ff.file); - if(ff.file.endsWith(".tmp")) - { - continue; - } - send.sendFile(dir+"/"+ff.file); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/23/301509806da800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/23/301509806da800171a8482560d609ceb deleted file mode 100644 index 1c2c391..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/23/301509806da800171a8482560d609ceb +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.IOException; -import java.util.logging.Logger; - - - - -/** - * @author jinyu - * - */ -public class TestRecFile { - private static Logger log=Logger.getLogger(TestRecFile.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - RecviceFiles rec=new RecviceFiles(); - String dir="F://dbfile"; - rec.setDir(dir); - rec.start("127.0.0.1", 5555); - log.info("ļ"); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/23/a089455d57ac00171c63d91e40f02a62 b/.metadata/.plugins/org.eclipse.core.resources/.history/23/a089455d57ac00171c63d91e40f02a62 deleted file mode 100644 index 9bab3f7..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/23/a089455d57ac00171c63d91e40f02a62 +++ /dev/null @@ -1,152 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.UnsupportedEncodingException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=20*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,infobytes.length,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - //client.decreNum(); - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - //ByteBuffer buffer=ByteBuffer.wrap(buf); - - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count+name.length+4]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - } - - } - client.close(); - dis.close(); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/23/d00f297c26ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/23/d00f297c26ac001710ff8a7c6bda0fb8 deleted file mode 100644 index b73e40b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/23/d00f297c26ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,87 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=16; - public static byte[][] splitData(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - while((k = (SocketReference) q.remove()) != null) { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - - } - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - private void startThread() { - - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/24/70abceb2e0ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/24/70abceb2e0ac001716b9ca6d5abb90bc deleted file mode 100644 index a3319cf..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/24/70abceb2e0ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,151 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=10*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - long startTime=System.currentTimeMillis(); - while((count=dis.read(buf,0, bufSize))!=-1) - { - - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - - } - long endTime=System.currentTimeMillis(); - client.close(); - dis.close(); - long speed=fLen/((endTime-startTime)/1000); - log.info("ɣ"+f.getName()+",ƽٶȣ"+speed/1024/1024); - - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/24/d09c215ae5ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/24/d09c215ae5ac001716b9ca6d5abb90bc deleted file mode 100644 index 3ca6cea..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/24/d09c215ae5ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,247 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - - /** - * дļ - */ - private void recData() - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - byte[]tmp=recQueue.poll(); - if(tmp==null) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - continue; - } - if(writeFile(tmp)) - { - isStop=true; - break; - } - } - - } - - }); - fileW.setDaemon(true); - fileW.setName(fileName+"_Thread"); - fileW.start(); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - // - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - //ļ - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - else - { - recData(); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - // - ss.close(); - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/25/c0e0b2fbe2ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/25/c0e0b2fbe2ac001716b9ca6d5abb90bc deleted file mode 100644 index 2a96245..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/25/c0e0b2fbe2ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,199 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/26/204e38905bac00171c63d91e40f02a62 b/.metadata/.plugins/org.eclipse.core.resources/.history/26/204e38905bac00171c63d91e40f02a62 deleted file mode 100644 index 55ea144..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/26/204e38905bac00171c63d91e40f02a62 +++ /dev/null @@ -1,246 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public int dataLen=0; - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData=null; - if(dataLen==0) - { - sendData=PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - sendData=sub.split(data, dataLen); - } - for(int i=0;isendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/27/6089d24d1aac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/27/6089d24d1aac001710ff8a7c6bda0fb8 deleted file mode 100644 index c78e323..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/27/6089d24d1aac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,77 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=16; - public static byte[][] split(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - byte[][] result=new byte[num][]; - for(int i=0;i=buffer.length) - { - //ɹ - if(sumLen==dataLen) - { - //ʼ - result=new byte[dataLen]; - ByteBuffer cur=ByteBuffer.wrap(result); - for(int i=0;isendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - // - } - - } - - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/27/f03094536aa800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/27/f03094536aa800171a8482560d609ceb deleted file mode 100644 index c577d9f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/27/f03094536aa800171a8482560d609ceb +++ /dev/null @@ -1,16 +0,0 @@ -/** - * - */ -package net.File; - - -import java.nio.file.WatchEvent.Kind; - -/** - * @author jinyu - * - */ -public class FileMonitor { -public String file; -public Kind kind; -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/28/20611a6ec3ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/28/20611a6ec3ad0017181ed9113883eda9 deleted file mode 100644 index 7d3ddd7..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/28/20611a6ec3ad0017181ed9113883eda9 +++ /dev/null @@ -1,492 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/28/b08c10a81fac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/28/b08c10a81fac001710ff8a7c6bda0fb8 deleted file mode 100644 index 156b628..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/28/b08c10a81fac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,38 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -/** - * @author jinyu - * - */ -public class PackagetCombin { - private static ConcurrentHashMap hash=new ConcurrentHashMap(); - private ConcurrentLinkedQueue queue=new ConcurrentLinkedQueue(); -public boolean addData(byte[] data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - DataStruct struct=hash.get(id); - if(struct==null) - { - struct=new DataStruct(num); - hash.put(id, struct); - } - boolean r= struct.addData(data); - if(r) - { - byte[]result =struct.getData(); - byte[] tmp=new byte[result.length]; - System.arraycopy(result, 0, tmp, 0, tmp.length); - queue.offer(struct.getData()); - } - return r; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/29/306a36aed6ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/29/306a36aed6ac001716b9ca6d5abb90bc deleted file mode 100644 index 8d74cec..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/29/306a36aed6ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,289 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡҲҪⲿٶȡ - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(islagerRead) - { - // cd Ϊݶȡ׼ - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - } - else - { - //ԭ룬Сݽȫ - buffer[insert]=data; - numValidChunks.incrementAndGet(); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - - if(this.islagerRead) - { - //cd - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(this.islagerRead) - { - // cd - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - - if(readPosition==size) - {readPosition=0; - if(this.islagerRead) - { - //cd - clearDeHash(this.size-leftNum); - } - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } - - /** - * ôݶȡ - * Ĭ false - * @param islarge - */ - public void setLargeRead(boolean islarge) - { - this.islagerRead=islarge; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2a/507d3e2903ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/2a/507d3e2903ac001710ff8a7c6bda0fb8 deleted file mode 100644 index f2b2a40..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2a/507d3e2903ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,21 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; - -/** - * @author jinyu - * @param - * - */ -public class SocketReference extends WeakReference { - - public SocketReference(T referent) { - super(referent); - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2a/b06d26c4cfac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/2a/b06d26c4cfac001716b9ca6d5abb90bc deleted file mode 100644 index 354bd7b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2a/b06d26c4cfac001716b9ca6d5abb90bc +++ /dev/null @@ -1,233 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ cd - if(highestReadSequenceNumber+1 hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - hasSocket.put(socket); - } - } - } - } - - }); - processSocket.setDaemon(true); - processSocket.setName("processSocket"); - processSocket.start(); - -} - -public static synchronized SocketControls getInstance() { - - if (instance == null) { - - instance = new SocketControls(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2b/b0ae6971bcac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/2b/b0ae6971bcac001716b9ca6d5abb90bc deleted file mode 100644 index c65c632..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2b/b0ae6971bcac001716b9ca6d5abb90bc +++ /dev/null @@ -1,604 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.ControlPacket; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.packets.Shutdown; -import udt.packets.ControlPacket.ControlPacketType; -import udt.receiver.AckHistoryEntry; -import udt.receiver.AckHistoryWindow; -import udt.receiver.PacketHistoryWindow; -import udt.receiver.PacketPairWindow; -import udt.receiver.ReceiverLossList; -import udt.receiver.ReceiverLossListEntry; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - -/** - * receiver part of a UDT entity - * @see UDTSender - */ -public class UDTReceiver { - - private static final Logger logger=Logger.getLogger(UDTReceiver.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //record seqNo of detected lostdata and latest feedback time - private final ReceiverLossList receiverLossList; - - //record each sent ACK and the sent time - private final AckHistoryWindow ackHistoryWindow; - - //Packet history window that stores the time interval between the current and the last seq. - private final PacketHistoryWindow packetHistoryWindow; - - //for storing the arrival time of the last received data packet - private volatile long lastDataPacketArrivalTime=0; - - //largest received data packet sequence number(LRSN) - private volatile long largestReceivedSeqNumber=0; - - //ACK event related - - //last Ack number - private long lastAckNumber=0; - - //largest Ack number ever acknowledged by ACK2 - private volatile long largestAcknowledgedAckNumber=-1; - - //EXP event related - - //a variable to record number of continuous EXP time-out events - private volatile long expCount=0; - - /*records the time interval between each probing pair - compute the median packet pair interval of the last - 16 packet pair intervals (PI) and the estimate link capacity.(packet/s)*/ - private final PacketPairWindow packetPairWindow; - - //estimated link capacity - long estimateLinkCapacity; - // the packet arrival rate - long packetArrivalSpeed; - - //round trip time, calculated from ACK/ACK2 pairs - long roundTripTime=0; - //round trip time variance - long roundTripTimeVar=roundTripTime/2; - - //to check the ACK, NAK, or EXP timer - private long nextACK; - //microseconds to next ACK event - private long ackTimerInterval=Util.getSYNTime(); - - private long nextNAK; - //microseconds to next NAK event - private long nakTimerInterval=Util.getSYNTime(); - - private long nextEXP; - //microseconds to next EXP event - private long expTimerInterval=100*Util.getSYNTime(); - - //instant when the session was created (for expiry checking) - private final long sessionUpSince; - //milliseconds to timeout a new session that stays idle - private final long IDLE_TIMEOUT = 3*60*1000; - - //buffer size for storing data - private final long bufferSize; - - //stores received packets to be sent - private final BlockingQueuehandoffQueue; - - private Thread receiverThread; - - private volatile boolean stopped=false; - - //(optional) ack interval (see CongestionControl interface) - private volatile long ackInterval=-1; - - /** - * if set to true connections will not expire, but will only be - * closed by a Shutdown message - */ - public static boolean connectionExpiryDisabled=false; - - private final boolean storeStatistics; - - - - /** - * create a receiver with a valid {@link UDTSession} - * @param session - */ - public UDTReceiver(UDTSession session,UDPEndPoint endpoint){ - this.endpoint = endpoint; - this.session=session; - this.sessionUpSince=System.currentTimeMillis(); - this.statistics=session.getStatistics(); - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - ackHistoryWindow = new AckHistoryWindow(16); - packetHistoryWindow = new PacketHistoryWindow(16); - receiverLossList = new ReceiverLossList(); - packetPairWindow = new PacketPairWindow(16); - largestReceivedSeqNumber=session.getInitialSequenceNumber()-1; - bufferSize=session.getReceiveBufferSize(); - handoffQueue=new ArrayBlockingQueue(4*session.getFlowWindowSize()); - storeStatistics=Boolean.getBoolean("udt.receiver.storeStatistics"); - initMetrics(); - start(); - } - - private MeanValue dgReceiveInterval; - private MeanValue dataPacketInterval; - private MeanValue processTime; - private MeanValue dataProcessTime; - private void initMetrics(){ - if(!storeStatistics)return; - dgReceiveInterval=new MeanValue("UDT receive interval"); - statistics.addMetric(dgReceiveInterval); - dataPacketInterval=new MeanValue("Data packet interval"); - statistics.addMetric(dataPacketInterval); - processTime=new MeanValue("UDT packet process time"); - statistics.addMetric(processTime); - dataProcessTime=new MeanValue("Data packet process time"); - statistics.addMetric(dataProcessTime); - } - - - //starts the sender algorithm - private void start(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - nextACK=Util.getCurrentTime()+ackTimerInterval; - nextNAK=(long)(Util.getCurrentTime()+1.5*nakTimerInterval); - nextEXP=Util.getCurrentTime()+2*expTimerInterval; - ackInterval=session.getCongestionControl().getAckInterval(); - while(!stopped){ - receiverAlgorithm(); - } - } - catch(Exception ex){ - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING RECEIVER for "+session); - } - }; - receiverThread=UDTThreadFactory.get().newThread(r); - receiverThread.start(); - } - - /* - * packets are written by the endpoint - */ - protected void receive(UDTPacket p)throws IOException{ - if(storeStatistics)dgReceiveInterval.end(); - handoffQueue.offer(p); - if(storeStatistics)dgReceiveInterval.begin(); - } - - /** - * receiver algorithm - * see specification P11. - */ - public void receiverAlgorithm()throws InterruptedException,IOException{ - //check ACK timer - long currentTime=Util.getCurrentTime(); - if(nextACKseqNumbers=receiverLossList.getFilteredSequenceNumbers(roundTripTime,true); - sendNAK(seqNumbers); - } - - /** - * process EXP event (see spec. p 13) - */ - protected void processEXPEvent()throws IOException{ - if(session.getSocket()==null)return; - UDTSender sender=session.getSocket().getSender(); - //put all the unacknowledged packets in the senders loss list - sender.putUnacknowledgedPacketsIntoLossList(); - if(expCount>16 && System.currentTimeMillis()-sessionUpSince > IDLE_TIMEOUT){ - if(!connectionExpiryDisabled &&!stopped){ - sendShutdown(); - stop(); - logger.info("Session "+session+" expired."); - return; - } - } - if(!sender.haveLostPackets()){ - sendKeepAlive(); - } - expCount++; - } - - protected void processUDTPacket(UDTPacket p)throws IOException{ - //(3).Check the packet type and process it according to this. - - if(!p.isControlPacket()){ - DataPacket dp=(DataPacket)p; - if(storeStatistics){ - dataPacketInterval.end(); - dataProcessTime.begin(); - } - onDataPacketReceived(dp); - if(storeStatistics){ - dataProcessTime.end(); - dataPacketInterval.begin(); - } - logger.info("DataPacket udt:"+p.getPacketSequenceNumber()); - } - - else if (p.getControlPacketType()==ControlPacketType.ACK2.ordinal()){ - Acknowledgment2 ack2=(Acknowledgment2)p; - onAck2PacketReceived(ack2); - } - - else if (p instanceof Shutdown){ - onShutdown(); - } - - } - - //every nth packet will be discarded... for testing only of course - public static int dropRate=0; - - //number of received data packets - private int n=0; - - protected void onDataPacketReceived(DataPacket dp)throws IOException{ - long currentSequenceNumber = dp.getPacketSequenceNumber(); - - //for TESTING : check whether to drop this packet -// n++; -// //if(dropRate>0 && n % dropRate == 0){ -// if(n % 1111 == 0){ -// logger.info("**** TESTING:::: DROPPING PACKET "+currentSequenceNumber+" FOR TESTING"); -// return; -// } -// //} - boolean OK=session.getSocket().getInputStream().haveNewData(currentSequenceNumber,dp.getData()); - if(!OK){ - //need to drop packet... - return; - } - - long currentDataPacketArrivalTime = Util.getCurrentTime(); - - /*(4).if the seqNo of the current data packet is 16n+1,record the - time interval between this packet and the last data packet - in the packet pair window*/ - if((currentSequenceNumber%16)==1 && lastDataPacketArrivalTime>0){ - long interval=currentDataPacketArrivalTime -lastDataPacketArrivalTime; - packetPairWindow.add(interval); - } - - //(5).record the packet arrival time in the PKT History Window. - packetHistoryWindow.add(currentDataPacketArrivalTime); - - - //store current time - lastDataPacketArrivalTime=currentDataPacketArrivalTime; - - - //(6).number of detected lossed packet - /*(6.a).if the number of the current data packet is greater than LSRN+1, - put all the sequence numbers between (but excluding) these two values - into the receiver's loss list and send them to the sender in an NAK packet*/ - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber+1)>0){ - sendNAK(currentSequenceNumber); - logger.info("sendNAK:"+currentSequenceNumber); - } - else if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)<0){ - /*(6.b).if the sequence number is less than LRSN,remove it from - * the receiver's loss list - */ - receiverLossList.remove(currentSequenceNumber); - logger.info("receiverLossList remove:"+currentSequenceNumber); - } - - statistics.incNumberOfReceivedDataPackets(); - - //(7).Update the LRSN - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)>0){ - largestReceivedSeqNumber=currentSequenceNumber; - } - - //(8) need to send an ACK? Some cc algorithms use this - if(ackInterval>0){ - if(n % ackInterval == 0)processACKEvent(false); - } - } - - /** - * write a NAK triggered by a received sequence number that is larger than - * the largestReceivedSeqNumber + 1 - * @param currentSequenceNumber - the currently received sequence number - * @throws IOException - */ - protected void sendNAK(long currentSequenceNumber)throws IOException{ - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(largestReceivedSeqNumber+1, currentSequenceNumber); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - //put all the sequence numbers between (but excluding) these two values into the - //receiver loss list - for(long i=largestReceivedSeqNumber+1;isequenceNumbers)throws IOException{ - if(sequenceNumbers.size()==0)return; - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(sequenceNumbers); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(nAckPacket); - statistics.incNumberOfNAKSent(); - logger.info("sendNAK List:"+sequenceNumbers.size()); - } - - protected long sendLightAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt=buildLightAcknowledgement(ackNumber); - endpoint.doSend(acknowledgmentPkt); - statistics.incNumberOfACKSent(); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - protected long sendAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); - //set the estimate link capacity - estimateLinkCapacity=packetPairWindow.getEstimatedLinkCapacity(); - acknowledgmentPkt.setEstimatedLinkCapacity(estimateLinkCapacity); - //set the packet arrival rate - packetArrivalSpeed=packetHistoryWindow.getPacketArrivalSpeed(); - acknowledgmentPkt.setPacketReceiveRate(packetArrivalSpeed); - - endpoint.doSend(acknowledgmentPkt); - - statistics.incNumberOfACKSent(); - statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - //builds a "light" Acknowledgement - private Acknowledgement buildLightAcknowledgement(long ackNumber){ - Acknowledgement acknowledgmentPkt = new Acknowledgement(); - //the packet sequence number to which all the packets have been received - acknowledgmentPkt.setAckNumber(ackNumber); - //assign this ack a unique increasing ACK sequence number - acknowledgmentPkt.setAckSequenceNumber(++ackSequenceNumber); - acknowledgmentPkt.setRoundTripTime(roundTripTime); - acknowledgmentPkt.setRoundTripTimeVar(roundTripTimeVar); - //set the buffer size - acknowledgmentPkt.setBufferSize(bufferSize); - - acknowledgmentPkt.setDestinationID(session.getDestination().getSocketID()); - acknowledgmentPkt.setSession(session); - - return acknowledgmentPkt; - } - - /** - * spec p. 13:
- 1) Locate the related ACK in the ACK History Window according to the - ACK sequence number in this ACK2.
- 2) Update the largest ACK number ever been acknowledged.
- 3) Calculate new rtt according to the ACK2 arrival time and the ACK - departure time, and update the RTT value as: RTT = (RTT * 7 + - rtt) / 8.
- 4) Update RTTVar by: RTTVar = (RTTVar * 3 + abs(RTT - rtt)) / 4.
- 5) Update both ACK and NAK period to 4 * RTT + RTTVar + SYN.
- */ - protected void onAck2PacketReceived(Acknowledgment2 ack2){ - AckHistoryEntry entry=ackHistoryWindow.getEntry(ack2.getAckSequenceNumber()); - if(entry!=null){ - long ackNumber=entry.getAckNumber(); - largestAcknowledgedAckNumber=Math.max(ackNumber, largestAcknowledgedAckNumber); - - long rtt=entry.getAge(); - if(roundTripTime>0)roundTripTime = (roundTripTime*7 + rtt)/8; - else roundTripTime = rtt; - roundTripTimeVar = (roundTripTimeVar* 3 + Math.abs(roundTripTimeVar- rtt)) / 4; - ackTimerInterval=4*roundTripTime+roundTripTimeVar+Util.getSYNTime(); - nakTimerInterval=ackTimerInterval; - statistics.setRTT(roundTripTime, roundTripTimeVar); - } - } - - protected void sendKeepAlive()throws IOException{ - KeepAlive ka=new KeepAlive(); - ka.setDestinationID(session.getDestination().getSocketID()); - ka.setSession(session); - endpoint.doSend(ka); - } - - protected void sendShutdown()throws IOException{ - Shutdown s=new Shutdown(); - s.setDestinationID(session.getDestination().getSocketID()); - s.setSession(session); - endpoint.doSend(s); - } - - private volatile long ackSequenceNumber=0; - - protected void resetEXPTimer(){ - nextEXP=Util.getCurrentTime()+expTimerInterval; - expCount=0; - } - - protected void resetEXPCount(){ - expCount=0; - } - - public void setAckInterval(long ackInterval){ - this.ackInterval=ackInterval; - } - - protected void onShutdown()throws IOException{ - stop(); - } - - public void stop()throws IOException{ - stopped=true; - session.getSocket().close(); - //stop our sender as well - session.getSocket().getSender().stop(); - } - - @Override - public String toString(){ - StringBuilder sb=new StringBuilder(); - sb.append("UDTReceiver ").append(session).append("\n"); - sb.append("LossList: "+receiverLossList); - return sb.toString(); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2c/00da54ff0eac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/2c/00da54ff0eac001710ff8a7c6bda0fb8 deleted file mode 100644 index 0eb5a70..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2c/00da54ff0eac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,107 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.util.HashMap; -import java.util.WeakHashMap; - -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - @SuppressWarnings("rawtypes") - private final ReferenceQueue q = new ReferenceQueue(); - private volatile long num=0; - /** - * ʹ - */ - private final WeakHashMap hashMap=new WeakHashMap (); - private final HashMap,Long> map=new HashMap,Long> (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @SuppressWarnings("unchecked") - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - map.remove(k); - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("socket"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - - /** - * - * @param point - * @return - */ - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - map.put(tmp, socket.getSocketID()); - if(num%10==0) - { - System.gc(); - } - num++; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2c/30197d17d7ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/2c/30197d17d7ac001716b9ca6d5abb90bc deleted file mode 100644 index 8f0cb60..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2c/30197d17d7ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,270 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.io.InputStream; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; -import udt.util.ReceiveBuffer; - -/** - * The UDTInputStream receives data blocks from the {@link UDTSocket} - * as they become available, and places them into an ordered, - * bounded queue (the flow window) for reading by the application - * - * - */ -public class UDTInputStream extends InputStream { - - //the socket owning this inputstream - private final UDTSocket socket; - - private final ReceiveBuffer receiveBuffer; - - //set to 'false' by the receiver when it gets a shutdown signal from the peer - //see the noMoreData() method - private final AtomicBoolean expectMoreData=new AtomicBoolean(true); - - private volatile boolean closed=false; - - private volatile boolean blocking=true; - - private volatile boolean hasData=false;//cd - - - - /** - * create a new {@link UDTInputStream} connected to the given socket - * @param socket - the {@link UDTSocket} - * @throws IOException - */ - public UDTInputStream(UDTSocket socket)throws IOException{ - this.socket=socket; - int capacity=socket!=null? 2 * socket.getSession().getFlowWindowSize() : 128 ; - long initialSequenceNum=socket!=null?socket.getSession().getInitialSequenceNumber():1; - receiveBuffer=new ReceiveBuffer(capacity,initialSequenceNum); - } - - private final byte[]single=new byte[1]; - - @Override - public int read()throws IOException{ - int b=0; - while(b==0) - b=read(single); - - if(b>0){ - return single[0]; - } - else { - return b; - } - } - - private AppData currentChunk=null; - //offset into currentChunk - int offset=0; - long id=-1; - @Override - public int read(byte[]target)throws IOException{ - try{ - int read=0; - updateCurrentChunk(false); - while(currentChunk!=null){ - byte[]data=currentChunk.data; - int length=Math.min(target.length-read,data.length-offset); - System.arraycopy(data, offset, target, read, length); - read+=length; - offset+=length; - //check if chunk has been fully read - if(offset>=data.length){ - currentChunk=null; - offset=0; - } - - //if no more space left in target, exit now - if(read==target.length){ - return read; - } - - updateCurrentChunk(blocking && read==0); - } - - if(read>0)return read; - if(closed)return -1; - if(expectMoreData.get() || !receiveBuffer.isEmpty())return 0; - //no more data - return -1; - - }catch(Exception ex){ - IOException e= new IOException(); - e.initCause(ex); - throw e; - } - } - - /** - * Reads the next valid chunk of application data from the queue
- * - * In blocking mode,this method will block until data is available or the socket is closed, - * otherwise it will wait for at most 10 milliseconds. - * - * @throws InterruptedException - */ - private void updateCurrentChunk(boolean block)throws IOException{ - if(currentChunk!=null)return; - - while(true){ - try{ - if(block){ - currentChunk=receiveBuffer.poll(1, TimeUnit.MILLISECONDS); - while (!closed && currentChunk==null){ - currentChunk=receiveBuffer.poll(1000, TimeUnit.MILLISECONDS); - } - } - else currentChunk=receiveBuffer.poll(10, TimeUnit.MILLISECONDS); - - }catch(InterruptedException ie){ - IOException ex=new IOException(); - ex.initCause(ie); - throw ex; - } - return; - } - } - - /** - * new application data - * @param data - * - */ - protected boolean haveNewData(long sequenceNumber,byte[]data)throws IOException{ - hasData=true; - return receiveBuffer.offer(new AppData(sequenceNumber,data)); - } - - @Override - public void close()throws IOException{ - if(closed)return; - closed=true; - noMoreData(); - } - - public UDTSocket getSocket(){ - return socket; - } - - /** - * sets the blocking mode - * @param block - */ - public void setBlocking(boolean block){ - this.blocking=block; - } - - public int getReceiveBufferSize(){ - return receiveBuffer.getSize(); - } - - /** - * notify the input stream that there is no more data - * @throws IOException - */ - protected void noMoreData()throws IOException{ - expectMoreData.set(false); - } - - /** - * жûݽ - * cd - * @return - */ - public boolean isHasData() - { - return hasData; - } - - /** - * used for storing application data and the associated - * sequence number in the queue in ascending order - */ - public static class AppData implements Comparable{ - final long sequenceNumber; - final byte[] data; - public AppData(long sequenceNumber, byte[]data){ - this.sequenceNumber=sequenceNumber; - this.data=data; - } - - @Override - public int compareTo(AppData o) { - return (int)(sequenceNumber-o.sequenceNumber); - } - - @Override - public String toString(){ - return sequenceNumber+"["+data.length+"]"; - } - - public long getSequenceNumber(){ - return sequenceNumber; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result - + (int) (sequenceNumber ^ (sequenceNumber >>> 32)); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - AppData other = (AppData) obj; - if (sequenceNumber != other.sequenceNumber) - return false; - return true; - } - - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2c/801fec2f59ac00171c63d91e40f02a62 b/.metadata/.plugins/org.eclipse.core.resources/.history/2c/801fec2f59ac00171c63d91e40f02a62 deleted file mode 100644 index d3acdc8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2c/801fec2f59ac00171c63d91e40f02a62 +++ /dev/null @@ -1,152 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.UnsupportedEncodingException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=20*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - log.info(":"+sum); - } - client.close(); - dis.close(); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2c/b041f93e67a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/2c/b041f93e67a800171a8482560d609ceb deleted file mode 100644 index 18970fd..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2c/b041f93e67a800171a8482560d609ceb +++ /dev/null @@ -1,64 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public UDTSocket getSocket() -{ - UDTSocket find=null; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(find==null) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳر - find=list.get(i); - i=-1;//± - } - } - else - { - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - return null; - -} -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2c/d0baafa565a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/2c/d0baafa565a800171a8482560d609ceb deleted file mode 100644 index 89ec2b8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2c/d0baafa565a800171a8482560d609ceb +++ /dev/null @@ -1,25 +0,0 @@ -/** - * - */ -package judp; - -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} -public -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2d/10bf61d937ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/2d/10bf61d937ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 5d7ec3d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2d/10bf61d937ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,100 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=20; - - /** - * ָ - * @param data - * @return - */ - public static byte[][] splitData(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize>0?1:0; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i0?1:0; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(len); - for(int i=0;iwaitDataLen&&readLen==0) - { - //ȴʱ䳤ȣûз͹չݣ˳ - logger.info("ʱ䵽˳ȡ:"+socketID); - return -1; - } - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readData() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - - -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - flushTime=System.currentTimeMillis(); - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} -public String getRemoteHost() { -return socket.getSession().getDestination().getAddress().getHostName(); - -} -public int getRemotePort() { - return socket.getSession().getDestination().getPort(); -} -public long getID() { - - return socketID; -} - - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2d/60a67df369a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/2d/60a67df369a800171a8482560d609ceb deleted file mode 100644 index 11c8053..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2d/60a67df369a800171a8482560d609ceb +++ /dev/null @@ -1,113 +0,0 @@ -/** - * - */ -package judp; - -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.SynchronousQueue; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean Start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - //judpSocket jsocket=new judpSocket(csocket); - - //SocketManager.getInstance().addGC(jsocket,csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=accept(); - } - judpSocket jsocket=new judpSocket(socket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2d/60cfdf2409ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/2d/60cfdf2409ac001710ff8a7c6bda0fb8 deleted file mode 100644 index d44ad69..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2d/60cfdf2409ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,99 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; - -import java.util.WeakHashMap; - -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - @SuppressWarnings("rawtypes") - private final ReferenceQueue q = new ReferenceQueue(); - private volatile long num=0; - /** - * ʹ - */ - private final WeakHashMap hashMap=new WeakHashMap (); - private final HashMap map=new HashMap (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @SuppressWarnings("unchecked") - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("socket"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - if(num%200==0) - { - System.gc(); - } - num++; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2e/200d3c4164a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/2e/200d3c4164a800171a8482560d609ceb deleted file mode 100644 index a3f8f02..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2e/200d3c4164a800171a8482560d609ceb +++ /dev/null @@ -1,45 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private SocketControls (){ - startThread(); - startGC(); - } - - public static synchronized SocketManager getInstance() { - - if (instance == null) { - - instance = new SocketManager(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2e/30535d40c5ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/2e/30535d40c5ad0017181ed9113883eda9 deleted file mode 100644 index 41c4b96..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2e/30535d40c5ad0017181ed9113883eda9 +++ /dev/null @@ -1,522 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - // cd - private volatile int bufferNum=0; - private volatile boolean isModify=true; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - // - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2e/4043e9f84fac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/2e/4043e9f84fac001710ff8a7c6bda0fb8 deleted file mode 100644 index 75e9fa8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2e/4043e9f84fac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,146 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.UnsupportedEncodingException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=20*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i20) - { - //10ʱ - - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else - { - break; - } - } - String serverinfp=new String(infobytes,0,infobytes.length,PackagetCharSet.CharSet); - if(!serverinfp.equals("initServer:"+f.getName())) - { - client.close(); - return; - } - //client.decreNum(); - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - //ByteBuffer buffer=ByteBuffer.wrap(buf); - - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count+name.length+4]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - } - - } - client.close(); - dis.close(); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2e/603775eeb3ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/2e/603775eeb3ad0017181ed9113883eda9 deleted file mode 100644 index 332af7c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2e/603775eeb3ad0017181ed9113883eda9 +++ /dev/null @@ -1,515 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - onAcknowledge(acknowledgement); - } - - } - - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2e/6047b62203ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/2e/6047b62203ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 98d3488..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2e/6047b62203ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,22 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; - -/** - * @author jinyu - * @param - * - */ -public class SocketReference extends WeakReference { - public SocketQueue(T referent) { - super(referent); - - } - - - public -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2e/b08f394dc5ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/2e/b08f394dc5ad0017181ed9113883eda9 deleted file mode 100644 index 5a0a0b0..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2e/b08f394dc5ad0017181ed9113883eda9 +++ /dev/null @@ -1,522 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - // cd - private volatile int bufferNum=0; - private volatile boolean isModify=true; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - // - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2e/c0aa731ac5ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/2e/c0aa731ac5ad0017181ed9113883eda9 deleted file mode 100644 index c53b0c3..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2e/c0aa731ac5ad0017181ed9113883eda9 +++ /dev/null @@ -1,516 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - // cd - private volatile int bufferNum=0; - private volatile boolean isModify=true; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - // - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2e/f0a141dda3ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/2e/f0a141dda3ad0017181ed9113883eda9 deleted file mode 100644 index 088da1b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2e/f0a141dda3ad0017181ed9113883eda9 +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.IOException; -import java.util.logging.Logger; - - - - -/** - * @author jinyu - * - */ -public class TestRecFiles { - private static Logger log=Logger.getLogger(TestRecFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //192.168.30.128 - ReadXml rd=new ReadXml(); - String xml= rd.readXml(ReadXml.getPath()+"/config.xml"); - String[] config=null; - if(xml!=null) - { - config=xml.split(","); - } - RecviceFiles rec=new RecviceFiles(); - String dir="F://dbfile"; - rec.setDir(dir); - rec.start("127.0.0.1", 5555); - log.info("ļ"); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2f/1088bc2468a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/2f/1088bc2468a800171a8482560d609ceb deleted file mode 100644 index cbf26ff..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2f/1088bc2468a800171a8482560d609ceb +++ /dev/null @@ -1,77 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public UDTSocket getSocket() -{ - - int index=-1; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(index==-1) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳ - i=-1;//± - index=i; - } - } - else - { - // - if(i==index) - { - continue; - } - else - { - list.get(i).close(); - long id=list.get(i).getSession().getSocketID(); - list.get(i).getEndpoint().removeSession(id); - - } - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - return null; - -} -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2f/2054ba4000ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/2f/2054ba4000ac001710ff8a7c6bda0fb8 deleted file mode 100644 index f5b7641..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2f/2054ba4000ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,14 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; - -/** - * @author jinyu - * - */ -public class SocketQueue extends ReferenceQueue { - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2f/20ad410dc5ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/2f/20ad410dc5ad0017181ed9113883eda9 deleted file mode 100644 index ad5c2f1..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2f/20ad410dc5ad0017181ed9113883eda9 +++ /dev/null @@ -1,516 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - // cd - private volatile int bufferNum=0; - private volatile boolean isModify=true; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - // - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2f/804aa08d21ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/2f/804aa08d21ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 7a018d7..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2f/804aa08d21ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,288 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public boolean getCloseState() -{ - return isClose; -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readData() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - - -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - flushTime=System.currentTimeMillis(); - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} -public String getRemoteHost() { -return socket.getSession().getDestination().getAddress().getHostName(); - -} -public int getRemotePort() { - return socket.getSession().getDestination().getPort(); -} -public long getID() { - - return socketID; -} - - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/3/60d321ea61ac00171ca19969f19d2325 b/.metadata/.plugins/org.eclipse.core.resources/.history/3/60d321ea61ac00171ca19969f19d2325 deleted file mode 100644 index 1264aed..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/3/60d321ea61ac00171ca19969f19d2325 +++ /dev/null @@ -1,248 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public int dataLen=0; - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - System.out.println("sendBlocking start"); - client.send(data); - r=data.length; - sumLen+=r; - System.out.println("sendBlocking end"); - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData=null; - if(dataLen==0) - { - sendData=PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - sendData=sub.split(data, dataLen); - } - for(int i=0;isessions=new ConcurrentHashMap(); - - //last received packet - private UDTPacket lastPacket; - - //if the endpoint is configured for a server socket, - //this queue is used to handoff new UDTSessions to the application - private final SynchronousQueue sessionHandoff=new SynchronousQueue(); - - private boolean serverSocketMode=false; - - //has the endpoint been stopped? - private volatile boolean stopped=false; - - public static final int DATAGRAM_SIZE=1400; - - private volatile int sessionnum=0;//cd ʱͳ - - /** - * create an endpoint on the given socket - * - * @param socket - a UDP datagram socket - */ - public UDPEndPoint(DatagramSocket socket){ - this.dgSocket=socket; - port=dgSocket.getLocalPort(); - } - - /** - * bind to any local port on the given host address - * @param localAddress - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress)throws SocketException, UnknownHostException{ - this(localAddress,0); - } - - /** - * Bind to the given address and port - * @param localAddress - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress, int localPort)throws SocketException, UnknownHostException{ - if(localAddress==null){ - dgSocket=new DatagramSocket(localPort, localAddress); - }else{ - dgSocket=new DatagramSocket(localPort); - } - if(localPort>0)this.port = localPort; - else port=dgSocket.getLocalPort(); - - //set a time out to avoid blocking in doReceive() - dgSocket.setSoTimeout(100000); - //buffer size - dgSocket.setReceiveBufferSize(128*1024); - } - - /** - * bind to the default network interface on the machine - * - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(int localPort)throws SocketException, UnknownHostException{ - this(null,localPort); - } - - /** - * bind to an ephemeral port on the default network interface on the machine - * - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint()throws SocketException, UnknownHostException{ - this(null,0); - } - - /** - * start the endpoint. If the serverSocketModeEnabled flag is true, - * a new connection can be handed off to an application. The application needs to - * call #accept() to get the socket - * @param serverSocketModeEnabled - */ - public void start(boolean serverSocketModeEnabled){ - serverSocketMode=serverSocketModeEnabled; - //start receive thread - Runnable receive=new Runnable(){ - @Override - public void run(){ - try{ - doReceive(); - }catch(Exception ex){ - logger.log(Level.WARNING,"",ex); - } - } - }; - Thread t=UDTThreadFactory.get().newThread(receive); - t.setDaemon(true); - t.start(); - logger.info("UDTEndpoint started."); - } - - public void start(){ - start(false); - } - - public void stop(){ - stopped=true; - dgSocket.close(); - } - - /** - * @return the port which this client is bound to - */ - public int getLocalPort() { - return this.dgSocket.getLocalPort(); - } - /** - * @return Gets the local address to which the socket is bound - */ - public InetAddress getLocalAddress(){ - return this.dgSocket.getLocalAddress(); - } - - DatagramSocket getSocket(){ - return dgSocket; - } - - UDTPacket getLastPacket(){ - return lastPacket; - } - - public void addSession(Long destinationID,UDTSession session){ - logger.info("Storing session <"+destinationID+">"); - sessionnum++; - sessions.put(destinationID, session); - } - - public UDTSession getSession(Long destinationID){ - return sessions.get(destinationID); - } - - /** - * Ƴsession - * cd - * @param socketid - * @return - */ - public UDTSession removeSession(long socketid) - { - //cd - sessionnum--; - logger.info("Storing Sessionnum:"+sessionnum); - return sessions.remove(socketid); - } - public Collection getSessions(){ - return sessions.values(); - } - - /** - * wait the given time for a new connection - * @param timeout - the time to wait - * @param unit - the {@link TimeUnit} - * @return a new {@link UDTSession} - * @throws InterruptedException - */ - protected UDTSession accept(long timeout, TimeUnit unit)throws InterruptedException{ - return sessionHandoff.poll(timeout, unit); - } - - - final DatagramPacket dp= new DatagramPacket(new byte[DATAGRAM_SIZE],DATAGRAM_SIZE); - - /** - * single receive, run in the receiverThread, see {@link #start()} - *
    - *
  • Receives UDP packets from the network
  • - *
  • Converts them to UDT packets
  • - *
  • dispatches the UDT packets according to their destination ID.
  • - *
- * @throws IOException - */ - private long lastDestID=-1; - private UDTSession lastSession; - - //MeanValue v=new MeanValue("receiver processing ",true, 256); - - private int n=0; - - private final Object lock=new Object(); - - protected void doReceive()throws IOException{ - while(!stopped){ - try{ - try{ - //v.end(); - - //will block until a packet is received or timeout has expired - dgSocket.receive(dp); - - //v.begin(); - - Destination peer=new Destination(dp.getAddress(), dp.getPort()); - int l=dp.getLength(); - UDTPacket packet=PacketFactory.createPacket(dp.getData(),l); - lastPacket=packet; - - //handle connection handshake - if(packet.isConnectionHandshake()){ - synchronized(lock){ - Long id=Long.valueOf(packet.getDestinationID()); - UDTSession session=sessions.get(id); - if(session==null){ - session=new ServerSession(dp,this); - addSession(session.getSocketID(),session); - //TODO need to check peer to avoid duplicate server session - if(serverSocketMode){ - logger.fine("Pooling new request."); - sessionHandoff.put(session); - logger.fine("Request taken for processing."); - } - } - peer.setSocketID(((ConnectionHandshake)packet).getSocketID()); - session.received(packet,peer); - } - } - else{ - //dispatch to existing session - long dest=packet.getDestinationID(); - UDTSession session; - if(dest==lastDestID){ - session=lastSession; - } - else{ - session=sessions.get(dest); - lastSession=session; - lastDestID=dest; - } - if(session==null){ - n++; - if(n%100==1){ - logger.warning("Unknown session <"+dest+"> requested from <"+peer+"> packet type "+packet.getClass().getName()); - } - } - else{ - session.received(packet,peer); - } - } - }catch(SocketException ex){ - if(ex.getMessage().equals("socket closed")&&stopped) - { - //Ѿر - } - else - { - logger.log(Level.INFO, "SocketException: "+ex.getMessage()); - } - }catch(SocketTimeoutException ste){ - //can safely ignore... we will retry until the endpoint is stopped - } - - }catch(Exception ex){ - logger.log(Level.WARNING, "Got: "+ex.getMessage(),ex); - } - } - } - - protected void doSend(UDTPacket packet)throws IOException{ - byte[]data=packet.getEncoded(); - DatagramPacket dgp = packet.getSession().getDatagram(); - dgp.setData(data); - dgSocket.send(dgp); - } - - @Override - public String toString(){ - return "UDPEndpoint port="+port; - } - - public void sendRaw(DatagramPacket p)throws IOException{ - dgSocket.send(p); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/30/4057ad45c5ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/30/4057ad45c5ad0017181ed9113883eda9 deleted file mode 100644 index fdb132c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/30/4057ad45c5ad0017181ed9113883eda9 +++ /dev/null @@ -1,522 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - // cd - private volatile int bufferNum=0; - private volatile boolean isModify=true; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - // - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/30/a07a6f8a9aad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/30/a07a6f8a9aad0017181ed9113883eda9 deleted file mode 100644 index 71c0dcf..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/30/a07a6f8a9aad0017181ed9113883eda9 +++ /dev/null @@ -1,502 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/30/c0f68a50d7ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/30/c0f68a50d7ac001716b9ca6d5abb90bc deleted file mode 100644 index 231b1be..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/30/c0f68a50d7ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,284 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public int dataLen=0; - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - System.out.println("sendBlocking start"); - client.sendBlocking(data); - r=data.length; - sumLen+=r; - System.out.println("sendBlocking end"); - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData=null; - if(dataLen==0) - { - sendData=PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - sendData=sub.split(data, dataLen); - } - for(int i=0;i20) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - break; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else - { - break; - } - } - String serverinfp=new String(infobytes,0,infobytes.length,PackagetCharSet.CharSet); - if(!serverinfp.equals("initServer:"+f.getName())) - { - client.close(); - return; - } - //client.decreNum(); - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - //ByteBuffer buffer=ByteBuffer.wrap(buf); - - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count+name.length+4]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - } - - } - client.close(); - dis.close(); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/31/106f933126ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/31/106f933126ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 3acfe86..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/31/106f933126ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,89 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=16; - public static byte[][] split(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;ihandoffQueue; - - private Thread receiverThread; - - private volatile boolean stopped=false; - - //(optional) ack interval (see CongestionControl interface) - private volatile long ackInterval=-1; - - /** - * if set to true connections will not expire, but will only be - * closed by a Shutdown message - */ - public static boolean connectionExpiryDisabled=false; - - private final boolean storeStatistics; - - - - /** - * create a receiver with a valid {@link UDTSession} - * @param session - */ - public UDTReceiver(UDTSession session,UDPEndPoint endpoint){ - this.endpoint = endpoint; - this.session=session; - this.sessionUpSince=System.currentTimeMillis(); - this.statistics=session.getStatistics(); - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - ackHistoryWindow = new AckHistoryWindow(16); - packetHistoryWindow = new PacketHistoryWindow(16); - receiverLossList = new ReceiverLossList(); - packetPairWindow = new PacketPairWindow(16); - largestReceivedSeqNumber=session.getInitialSequenceNumber()-1; - bufferSize=session.getReceiveBufferSize(); - handoffQueue=new ArrayBlockingQueue(4*session.getFlowWindowSize()); - storeStatistics=Boolean.getBoolean("udt.receiver.storeStatistics"); - initMetrics(); - start(); - } - - private MeanValue dgReceiveInterval; - private MeanValue dataPacketInterval; - private MeanValue processTime; - private MeanValue dataProcessTime; - private void initMetrics(){ - if(!storeStatistics)return; - dgReceiveInterval=new MeanValue("UDT receive interval"); - statistics.addMetric(dgReceiveInterval); - dataPacketInterval=new MeanValue("Data packet interval"); - statistics.addMetric(dataPacketInterval); - processTime=new MeanValue("UDT packet process time"); - statistics.addMetric(processTime); - dataProcessTime=new MeanValue("Data packet process time"); - statistics.addMetric(dataProcessTime); - } - - - //starts the sender algorithm - private void start(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - nextACK=Util.getCurrentTime()+ackTimerInterval; - nextNAK=(long)(Util.getCurrentTime()+1.5*nakTimerInterval); - nextEXP=Util.getCurrentTime()+2*expTimerInterval; - ackInterval=session.getCongestionControl().getAckInterval(); - while(!stopped){ - receiverAlgorithm(); - } - } - catch(Exception ex){ - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING RECEIVER for "+session); - } - }; - receiverThread=UDTThreadFactory.get().newThread(r); - receiverThread.start(); - } - - /* - * packets are written by the endpoint - */ - protected void receive(UDTPacket p)throws IOException{ - if(storeStatistics)dgReceiveInterval.end(); - handoffQueue.offer(p); - if(storeStatistics)dgReceiveInterval.begin(); - } - - /** - * receiver algorithm - * see specification P11. - */ - public void receiverAlgorithm()throws InterruptedException,IOException{ - //check ACK timer - long currentTime=Util.getCurrentTime(); - if(nextACKseqNumbers=receiverLossList.getFilteredSequenceNumbers(roundTripTime,true); - sendNAK(seqNumbers); - } - - /** - * process EXP event (see spec. p 13) - */ - protected void processEXPEvent()throws IOException{ - if(session.getSocket()==null)return; - UDTSender sender=session.getSocket().getSender(); - //put all the unacknowledged packets in the senders loss list - sender.putUnacknowledgedPacketsIntoLossList(); - if(expCount>16 && System.currentTimeMillis()-sessionUpSince > IDLE_TIMEOUT){ - if(!connectionExpiryDisabled &&!stopped){ - sendShutdown(); - stop(); - logger.info("Session "+session+" expired."); - return; - } - } - if(!sender.haveLostPackets()){ - sendKeepAlive(); - } - expCount++; - } - - protected void processUDTPacket(UDTPacket p)throws IOException{ - //(3).Check the packet type and process it according to this. - - if(!p.isControlPacket()){ - DataPacket dp=(DataPacket)p; - if(storeStatistics){ - dataPacketInterval.end(); - dataProcessTime.begin(); - } - onDataPacketReceived(dp); - if(storeStatistics){ - dataProcessTime.end(); - dataPacketInterval.begin(); - } - logger.info("DataPacket udt:"+p.getPacketSequenceNumber()); - } - - else if (p.getControlPacketType()==ControlPacketType.ACK2.ordinal()){ - Acknowledgment2 ack2=(Acknowledgment2)p; - onAck2PacketReceived(ack2); - } - - else if (p instanceof Shutdown){ - onShutdown(); - } - - } - - //every nth packet will be discarded... for testing only of course - public static int dropRate=0; - - //number of received data packets - private int n=0; - - protected void onDataPacketReceived(DataPacket dp)throws IOException{ - long currentSequenceNumber = dp.getPacketSequenceNumber(); - - //for TESTING : check whether to drop this packet -// n++; -// //if(dropRate>0 && n % dropRate == 0){ -// if(n % 1111 == 0){ -// logger.info("**** TESTING:::: DROPPING PACKET "+currentSequenceNumber+" FOR TESTING"); -// return; -// } -// //} - boolean OK=session.getSocket().getInputStream().haveNewData(currentSequenceNumber,dp.getData()); - if(!OK){ - logger.info("haveNewData:ʧ"); - //need to drop packet... - return; - } - - long currentDataPacketArrivalTime = Util.getCurrentTime(); - - /*(4).if the seqNo of the current data packet is 16n+1,record the - time interval between this packet and the last data packet - in the packet pair window*/ - if((currentSequenceNumber%16)==1 && lastDataPacketArrivalTime>0){ - long interval=currentDataPacketArrivalTime -lastDataPacketArrivalTime; - packetPairWindow.add(interval); - } - - //(5).record the packet arrival time in the PKT History Window. - packetHistoryWindow.add(currentDataPacketArrivalTime); - - - //store current time - lastDataPacketArrivalTime=currentDataPacketArrivalTime; - logger.info("largestReceivedSeqNumber:"+largestReceivedSeqNumber); - - //(6).number of detected lossed packet - /*(6.a).if the number of the current data packet is greater than LSRN+1, - put all the sequence numbers between (but excluding) these two values - into the receiver's loss list and send them to the sender in an NAK packet*/ - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber+1)>0){ - sendNAK(currentSequenceNumber); - logger.info("sendNAK:"+currentSequenceNumber); - } - else if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)<0){ - /*(6.b).if the sequence number is less than LRSN,remove it from - * the receiver's loss list - */ - receiverLossList.remove(currentSequenceNumber); - logger.info("receiverLossList remove:"+currentSequenceNumber); - } - - statistics.incNumberOfReceivedDataPackets(); - - //(7).Update the LRSN - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)>0){ - largestReceivedSeqNumber=currentSequenceNumber; - } - - //(8) need to send an ACK? Some cc algorithms use this - if(ackInterval>0){ - if(n % ackInterval == 0)processACKEvent(false); - } - } - - /** - * write a NAK triggered by a received sequence number that is larger than - * the largestReceivedSeqNumber + 1 - * @param currentSequenceNumber - the currently received sequence number - * @throws IOException - */ - protected void sendNAK(long currentSequenceNumber)throws IOException{ - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(largestReceivedSeqNumber+1, currentSequenceNumber); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - //put all the sequence numbers between (but excluding) these two values into the - //receiver loss list - for(long i=largestReceivedSeqNumber+1;isequenceNumbers)throws IOException{ - if(sequenceNumbers.size()==0)return; - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(sequenceNumbers); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(nAckPacket); - statistics.incNumberOfNAKSent(); - logger.info("sendNAK List:"+sequenceNumbers.size()); - } - - protected long sendLightAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt=buildLightAcknowledgement(ackNumber); - endpoint.doSend(acknowledgmentPkt); - statistics.incNumberOfACKSent(); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - protected long sendAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); - //set the estimate link capacity - estimateLinkCapacity=packetPairWindow.getEstimatedLinkCapacity(); - acknowledgmentPkt.setEstimatedLinkCapacity(estimateLinkCapacity); - //set the packet arrival rate - packetArrivalSpeed=packetHistoryWindow.getPacketArrivalSpeed(); - acknowledgmentPkt.setPacketReceiveRate(packetArrivalSpeed); - - endpoint.doSend(acknowledgmentPkt); - - statistics.incNumberOfACKSent(); - statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - //builds a "light" Acknowledgement - private Acknowledgement buildLightAcknowledgement(long ackNumber){ - Acknowledgement acknowledgmentPkt = new Acknowledgement(); - //the packet sequence number to which all the packets have been received - acknowledgmentPkt.setAckNumber(ackNumber); - //assign this ack a unique increasing ACK sequence number - acknowledgmentPkt.setAckSequenceNumber(++ackSequenceNumber); - acknowledgmentPkt.setRoundTripTime(roundTripTime); - acknowledgmentPkt.setRoundTripTimeVar(roundTripTimeVar); - //set the buffer size - acknowledgmentPkt.setBufferSize(bufferSize); - - acknowledgmentPkt.setDestinationID(session.getDestination().getSocketID()); - acknowledgmentPkt.setSession(session); - - return acknowledgmentPkt; - } - - /** - * spec p. 13:
- 1) Locate the related ACK in the ACK History Window according to the - ACK sequence number in this ACK2.
- 2) Update the largest ACK number ever been acknowledged.
- 3) Calculate new rtt according to the ACK2 arrival time and the ACK - departure time, and update the RTT value as: RTT = (RTT * 7 + - rtt) / 8.
- 4) Update RTTVar by: RTTVar = (RTTVar * 3 + abs(RTT - rtt)) / 4.
- 5) Update both ACK and NAK period to 4 * RTT + RTTVar + SYN.
- */ - protected void onAck2PacketReceived(Acknowledgment2 ack2){ - AckHistoryEntry entry=ackHistoryWindow.getEntry(ack2.getAckSequenceNumber()); - if(entry!=null){ - long ackNumber=entry.getAckNumber(); - largestAcknowledgedAckNumber=Math.max(ackNumber, largestAcknowledgedAckNumber); - - long rtt=entry.getAge(); - if(roundTripTime>0)roundTripTime = (roundTripTime*7 + rtt)/8; - else roundTripTime = rtt; - roundTripTimeVar = (roundTripTimeVar* 3 + Math.abs(roundTripTimeVar- rtt)) / 4; - ackTimerInterval=4*roundTripTime+roundTripTimeVar+Util.getSYNTime(); - nakTimerInterval=ackTimerInterval; - statistics.setRTT(roundTripTime, roundTripTimeVar); - } - } - - protected void sendKeepAlive()throws IOException{ - KeepAlive ka=new KeepAlive(); - ka.setDestinationID(session.getDestination().getSocketID()); - ka.setSession(session); - endpoint.doSend(ka); - } - - protected void sendShutdown()throws IOException{ - Shutdown s=new Shutdown(); - s.setDestinationID(session.getDestination().getSocketID()); - s.setSession(session); - endpoint.doSend(s); - } - - private volatile long ackSequenceNumber=0; - - protected void resetEXPTimer(){ - nextEXP=Util.getCurrentTime()+expTimerInterval; - expCount=0; - } - - protected void resetEXPCount(){ - expCount=0; - } - - public void setAckInterval(long ackInterval){ - this.ackInterval=ackInterval; - } - - protected void onShutdown()throws IOException{ - stop(); - } - - public void stop()throws IOException{ - stopped=true; - session.getSocket().close(); - //stop our sender as well - session.getSocket().getSender().stop(); - } - - @Override - public String toString(){ - StringBuilder sb=new StringBuilder(); - sb.append("UDTReceiver ").append(session).append("\n"); - sb.append("LossList: "+receiverLossList); - return sb.toString(); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/33/b04561b206ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/33/b04561b206ac001710ff8a7c6bda0fb8 deleted file mode 100644 index b4327ab..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/33/b04561b206ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,96 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; - -import java.util.WeakHashMap; - -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private final ReferenceQueue q = new ReferenceQueue(); - private long num=0; - /** - * ʹ - */ - private final WeakHashMap hashMap=new WeakHashMap (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("socket"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - if(num%200==0) - { - System.gc(); - } - num++; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/34/b06540c026ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/34/b06540c026ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 6d00dfb..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/34/b06540c026ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,234 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - private int len=0; - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData= PackagetSub.splitData(data); - for(int i=0;i list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public UDTSocket getSocket() -{ - - int index=-1; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(index==-1) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳ - index=i; - i=-1;//± - - } - } - else - { - // - if(i==index) - { - continue; - } - else - { - list.get(i).close(); - long id=list.get(i).getSession().getSocketID(); - list.get(i).getEndpoint().removeSession(id); - list.get(i).getReceiver().stop(); - list.get(i).getSender().stop(); - } - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - if(index!=-1) - { - return list.get(index); - } - return null; - -} -/** - * socket - */ -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/35/8092462f1eac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/35/8092462f1eac001710ff8a7c6bda0fb8 deleted file mode 100644 index f4e86f8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/35/8092462f1eac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,27 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -/** - * @author jinyu - * - */ -public class PackagetCombin { - private static ConcurrentHashMap hash=new ConcurrentHashMap(); -public DataStruct addData(byte[] data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - DataStruct struct=hash.get(id); - if(struct==null) - { - struct=new DataStruct(num); - hash.put(id, struct); - } - struct.addData(data); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/36/106b6f256da800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/36/106b6f256da800171a8482560d609ceb deleted file mode 100644 index 6d9a951..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/36/106b6f256da800171a8482560d609ceb +++ /dev/null @@ -1,56 +0,0 @@ -/** - * ļTestSendFile.java - * - * 汾Ϣ - * ڣ2017827 - * Copyright Corporation 2017 - * Ȩ - * - */ -package Test; - -import java.io.IOException; - -import judp.judpSendFile; - -/** - * - * Ŀƣjudp - * ƣTestSendFile - * - * ˣjinyu - * ʱ䣺2017827 6:32:25 - * ޸ˣjinyu - * ޸ʱ䣺2017827 6:32:25 - * ޸ıע - * @version - * - */ -public class TestSendFiles { - - /** - - * TODO( C ѡ) - - * @param name - - * @return - - * - - - */ - public static void main(String[] args) { - judpSendFile jsend=new judpSendFile("192.168.10.86",5555); - jsend.startSend(); - - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/36/406a1f2526ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/36/406a1f2526ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 07081d8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/36/406a1f2526ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,54 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=16; - public static byte[][] split(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData(byte[] data) - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - byte[]tmp=recQueue.poll(); - if(tmp==null) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - continue; - } - if(writeFile(tmp)) - { - isStop=true; - ss.close(); - break; - } - } - - } - - }); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/36/d0590bba1bac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/36/d0590bba1bac001710ff8a7c6bda0fb8 deleted file mode 100644 index e65d360..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/36/d0590bba1bac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,55 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=16; - public static byte[][] split(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - log.info(":"+sum); - TimeUnit.SECONDS.sleep(1); - } - client.close(); - dis.close(); - log.info("ɣ"+f.getName()); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/39/803bf78dceac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/39/803bf78dceac001716b9ca6d5abb90bc deleted file mode 100644 index 4d49a03..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/39/803bf78dceac001716b9ca6d5abb90bc +++ /dev/null @@ -1,206 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isReadMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - buffer[insert]=data; - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else return null; - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isReadMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/39/f089629426ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/39/f089629426ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 8816e0d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/39/f089629426ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,92 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=16; - - /** - * ָ - * @param data - * @return - */ - public static byte[][] splitData(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - - /** - * дļ - */ - private void recData() - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - byte[]tmp=recQueue.poll(); - if(tmp==null) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - continue; - } - if(writeFile(tmp)) - { - isStop=true; - break; - } - } - - } - - }); - fileW.setDaemon(true); - fileW.setName(fileName+"_Thread"); - fileW.start(); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - // - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - //ļ - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - break; - } - else - { - recData(); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - // - ss.close(); - - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/3b/0009e5c7a3ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/3b/0009e5c7a3ad0017181ed9113883eda9 deleted file mode 100644 index 5fa122b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/3b/0009e5c7a3ad0017181ed9113883eda9 +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.IOException; -import java.util.logging.Logger; - - - - -/** - * @author jinyu - * - */ -public class TestRecFiles { - private static Logger log=Logger.getLogger(TestRecFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //192.168.30.128 - RecviceFiles rec=new RecviceFiles(); - String dir="F://dbfile"; - rec.setDir(dir); - rec.start("127.0.0.1", 5555); - log.info("ļ"); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/3b/20158b335ca800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/3b/20158b335ca800171a8482560d609ceb deleted file mode 100644 index 0a33696..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/3b/20158b335ca800171a8482560d609ceb +++ /dev/null @@ -1,202 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.UDTStatistics; - -public class UDTClient { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - private final UDPEndPoint clientEndpoint; - private ClientSession clientSession; - private boolean close=false; - private Thread closeThread=null;//cd - public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address,localport); - logger.info("Created client endpoint on port "+localport); - } - - public UDTClient(InetAddress address)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address); - logger.info("Created client endpoint on port "+clientEndpoint.getLocalPort()); - } - - public UDTClient(UDPEndPoint endpoint)throws SocketException, UnknownHostException{ - clientEndpoint=endpoint; - } - - /** - * establishes a connection to the given server. - * Starts the sender thread. - * @param host - * @param port - * @throws UnknownHostException - */ - public void connect(String host, int port)throws InterruptedException, UnknownHostException, IOException{ - InetAddress address=InetAddress.getByName(host); - Destination destination=new Destination(address,port); - //create client session... - clientSession=new ClientSession(clientEndpoint,destination); - clientEndpoint.addSession(clientSession.getSocketID(), clientSession); - - clientEndpoint.start(); - clientSession.connect(); - //wait for handshake - while(!clientSession.isReady()){ - Thread.sleep(500); - } - logger.info("The UDTClient is connected"); - Thread.sleep(500); - } - - /** - * sends the given data asynchronously - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - public void send(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWrite(data); - } - - public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWriteBlocking(data); - } - - public int read(byte[]data)throws IOException, InterruptedException{ - return clientSession.getSocket().getInputStream().read(data); - } - - /** - * flush outstanding data (and make sure it is acknowledged) - * @throws IOException - * @throws InterruptedException - */ - public void flush()throws IOException, InterruptedException{ - clientSession.getSocket().flush(); - } - - - public void shutdown()throws IOException{ - - if (clientSession.isReady()&& clientSession.active==true) - { - Shutdown shutdown = new Shutdown(); - shutdown.setDestinationID(clientSession.getDestination().getSocketID()); - shutdown.setSession(clientSession); - try{ - clientEndpoint.doSend(shutdown); - TimeUnit.MILLISECONDS.sleep(100); - } - catch(Exception e) - { - logger.log(Level.SEVERE,"ERROR: Connection could not be stopped!",e); - } - clientSession.getSocket().getReceiver().stop(); - clientEndpoint.stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - close=true; - } - } - - public UDTInputStream getInputStream()throws IOException{ - return clientSession.getSocket().getInputStream(); - } - - public UDTOutputStream getOutputStream()throws IOException{ - return clientSession.getSocket().getOutputStream(); - } - - public UDPEndPoint getEndpoint()throws IOException{ - return clientEndpoint; - } - - public UDTStatistics getStatistics(){ - return clientSession.getStatistics(); - } - - public long getSocketID() - { - //cd - return clientSession.getSocketID(); - } - - /** - * ͬر - * ȴݷɺٹر - * ֻȴ10ss - */ - public synchronized void close() - { - close=true; - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - if(clientSession.getSocket().getSender().isSenderEmpty()) - { - shutdown(); - } - } - - } - - }); - } - - } - - public boolean isClose() - { - return close; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/3c/20d0ca0806ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/3c/20d0ca0806ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 2d2d921..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/3c/20d0ca0806ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,96 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; - -import java.util.WeakHashMap; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private final ReferenceQueue q = new ReferenceQueue(); - private long num=0; - /** - * ʹ - */ - private final WeakHashMap hashMap=new WeakHashMap (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @SuppressWarnings("unchecked") - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("socket"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - if(num%200==0) - { - System.gc(); - } - num++; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/3d/a0e3d71e22ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/3d/a0e3d71e22ac001710ff8a7c6bda0fb8 deleted file mode 100644 index f508d95..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/3d/a0e3d71e22ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,212 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public void pauseOutput() - { - try { - client.getOutputStream().pauseOutput(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - public byte[] read() - { - byte[] result=null; - if(client!=null) - { - byte[] readBytes=new byte[bufSize];// - byte[] buf=new byte[bufSize];// - int index=0; - int r=0; - try { - while(true) - { - r=client.read(readBytes); - if(r==-1) - { - break; - } - else - { - if(r<=bufSize) - { - //result=new byte[r]; - //System.arraycopy(readBytes, 0, result, 0, r); - if(index+r hash=new ConcurrentHashMap(); -// private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - int num=0; - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - num++; - // - if(!list.isEmpty()) - { - for(int i=0;i fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long startTime=System.currentTimeMillis(); - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - long speed=0; - try - { - speed=sumBytes/((System.currentTimeMillis()-startTime)/1000); - } - catch(Exception ex) - { - - } - log.info("ļٶȣ"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/3d/d0dec61a6aa800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/3d/d0dec61a6aa800171a8482560d609ceb deleted file mode 100644 index b411550..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/3d/d0dec61a6aa800171a8482560d609ceb +++ /dev/null @@ -1,113 +0,0 @@ -/** - * - */ -package judp; - -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.SynchronousQueue; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -//private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean Start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - //judpSocket jsocket=new judpSocket(csocket); - - //SocketManager.getInstance().addGC(jsocket,csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=SocketControls.getInstance().getSocket(); - } - judpSocket jsocket=new judpSocket(socket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/3e/105906a604ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/3e/105906a604ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 3acb753..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/3e/105906a604ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,86 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private LinkedBlockingQueue> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - private void startThread() { - - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/3e/10c01b9bd8ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/3e/10c01b9bd8ac001716b9ca6d5abb90bc deleted file mode 100644 index 5cfcf83..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/3e/10c01b9bd8ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,152 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -//private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private boolean isRWMaster=true;//Ĭֵһ -private boolean islagerRead=false; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} - -/** - * - * @param port ˿ - */ -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - * @param localIP IP - * @param port ˿ - */ -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - try { - csocket.getInputStream().setLargeRead(islagerRead); - csocket.getInputStream().resetBufMaster(isRWMaster); - } catch (IOException e) { - e.printStackTrace(); - } - - SocketControls.getInstance().addSocket(csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} -/** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - *ôݶȡ - * @param isRead - */ -public void resetBufMaster(boolean isRead) -{ - this.isRWMaster=isRead; - -} - -/** - * ôݶȡ - * Ĭ false - * @param islarge - */ -public void setLargeRead(boolean islarge) -{ - this.islagerRead=islarge; -} -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=SocketControls.getInstance().getSocket(); - } - judpSocket jsocket=new judpSocket(socket); - judpSocketManager.getInstance(socket.getEndpoint()).addSocket(jsocket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/3e/90c8f6fe1bac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/3e/90c8f6fe1bac001710ff8a7c6bda0fb8 deleted file mode 100644 index 3e743d5..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/3e/90c8f6fe1bac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,28 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] data; -public long id; -public DataStruct(int num) -{ - data=new byte[num][]; -} -public void addData(byte[]data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - int index=buf.getInt(); - int dataLen=buf.getInt(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/3f/0095c3b32bac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/3f/0095c3b32bac001710ff8a7c6bda0fb8 deleted file mode 100644 index 6441e79..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/3f/0095c3b32bac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,88 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] buffer=null; -public long id; -private volatile int sumNum=0; -private volatile int sumLen=0; -private byte[] result=null; -public DataStruct(int num) -{ - buffer=new byte[num][]; -} - -/** - * - * @return - */ -private boolean check() -{ - if(num>=buffer.length) - { - //ɹ - if(sumLen==dataLen) - { - //ʼ - result=new byte[dataLen]; - ByteBuffer cur=ByteBuffer.wrap(result); - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - long startTime=System.currentTimeMillis(); - while((count=dis.read(buf,0, bufSize))!=-1) - { - - if(count==bufSize) - { - client.sendData(buf); - log.info("ͣ"+f.getName()+","+bufSize); - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - log.info("ͣ"+f.getName()+","+count); - } - - } - long endTime=System.currentTimeMillis(); - client.close(); - dis.close(); - long speed=fLen/((endTime-startTime)/1000); - log.info("ɣ"+f.getName()+",ƽٶ(M/S)"+speed/1024/1024); - - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/3f/20ae3effb7ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/3f/20ae3effb7ac001716b9ca6d5abb90bc deleted file mode 100644 index a658247..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/3f/20ae3effb7ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,193 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.DatagramPacket; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.KeepAlive; -import udt.packets.Shutdown; - -/** - * server side session in client-server mode - */ -public class ServerSession extends UDTSession { - - private static final Logger logger=Logger.getLogger(ServerSession.class.getName()); - - private final UDPEndPoint endPoint; - - //last received packet (for testing purposes) - private UDTPacket lastPacket; - - - public ServerSession(DatagramPacket dp, UDPEndPoint endPoint)throws SocketException,UnknownHostException{ - super("ServerSession localPort="+endPoint.getLocalPort()+" peer="+dp.getAddress()+":"+dp.getPort(),new Destination(dp.getAddress(),dp.getPort())); - this.endPoint=endPoint; - logger.info("Created "+toString()+" talking to "+dp.getAddress()+":"+dp.getPort()); - } - - int n_handshake=0; - - @Override - public void received(UDTPacket packet, Destination peer){ - lastPacket=packet; - - if(packet instanceof ConnectionHandshake) { - ConnectionHandshake connectionHandshake=(ConnectionHandshake)packet; - logger.info("Received "+connectionHandshake); - - if (getState()<=ready){ - destination.setSocketID(connectionHandshake.getSocketID()); - - if(getState()<=handshaking){ - setState(handshaking); - } - try{ - handleHandShake(connectionHandshake); - n_handshake++; - try{ - setState(ready); - socket=new UDTSocket(endPoint, this); - cc.init(); - }catch(Exception uhe){ - //session is invalid - logger.log(Level.SEVERE,"",uhe); - setState(invalid); - } - }catch(IOException ex){ - //session invalid - logger.log(Level.WARNING,"Error processing ConnectionHandshake",ex); - setState(invalid); - } - return; - } - - }else if(packet instanceof KeepAlive) { - socket.getReceiver().resetEXPTimer(); - active = true; - return; - } - - if(getState()== ready) { - active = true; - - if (packet instanceof KeepAlive) { - //nothing to do here - return; - }else if (packet instanceof Shutdown) { - try{ - socket.getReceiver().stop(); - }catch(IOException ex){ - logger.log(Level.WARNING,"",ex); - } - setState(shutdown); - System.out.println("SHUTDOWN ***"); - active = false; - logger.info("Connection shutdown initiated by the other side."); - return; - } - - else{ - try{ - long seqNo=packet.getPacketSequenceNumber(); - if(seqNo!=-1) - logger.info("DataPacket:"+seqNo); - if(packet.forSender()){ - socket.getSender().receive(packet); - }else{ - socket.getReceiver().receive(packet); - } - }catch(Exception ex){ - //session invalid - logger.log(Level.SEVERE,"",ex); - setState(invalid); - } - } - return; - - } - - - } - - /** - * for testing use only - */ - UDTPacket getLastPacket(){ - return lastPacket; - } - - /** - * handle the connection handshake:
- *
    - *
  • set initial sequence number
  • - *
  • send response handshake
  • - *
- * @param handshake - * @param peer - * @throws IOException - */ - protected void handleHandShake(ConnectionHandshake handshake)throws IOException{ - ConnectionHandshake responseHandshake = new ConnectionHandshake(); - //compare the packet size and choose minimun - long clientBufferSize=handshake.getPacketSize(); - long myBufferSize=getDatagramSize(); - long bufferSize=Math.min(clientBufferSize, myBufferSize); - long initialSequenceNumber=handshake.getInitialSeqNo(); - setInitialSequenceNumber(initialSequenceNumber); - setDatagramSize((int)bufferSize); - responseHandshake.setPacketSize(bufferSize); - responseHandshake.setUdtVersion(4); - responseHandshake.setInitialSeqNo(initialSequenceNumber); - responseHandshake.setConnectionType(-1); - responseHandshake.setMaxFlowWndSize(handshake.getMaxFlowWndSize()); - //tell peer what the socket ID on this side is - responseHandshake.setSocketID(mySocketID); - responseHandshake.setDestinationID(this.getDestination().getSocketID()); - responseHandshake.setSession(this); - logger.info("Sending reply "+responseHandshake); - endPoint.doSend(responseHandshake); - } - - - - -} - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/3f/90252382e1ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/3f/90252382e1ac001716b9ca6d5abb90bc deleted file mode 100644 index f034620..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/3f/90252382e1ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,193 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - long speed=0; - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/timespan/1000; - } - speed=sumBytes/(()/1000); - } - catch(Exception ex) - { - - } - lastTime=System.currentTimeMillis(); - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/3f/a091f71264a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/3f/a091f71264a800171a8482560d609ceb deleted file mode 100644 index 33c1e19..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/3f/a091f71264a800171a8482560d609ceb +++ /dev/null @@ -1,27 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; -import java.util.concurrent.ConcurrentHashMap; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private ConcurrentHashMap hash=new ConcurrentHashMap(); -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/3f/d057016d64a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/3f/d057016d64a800171a8482560d609ceb deleted file mode 100644 index e21ff11..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/3f/d057016d64a800171a8482560d609ceb +++ /dev/null @@ -1,50 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - // TODO Auto-generated method stub - -} - -public static synchronized SocketControls getInstance() { - - if (instance == null) { - - instance = new SocketControls(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4/30a058a9e7ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/4/30a058a9e7ac001716b9ca6d5abb90bc deleted file mode 100644 index cb3a344..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4/30a058a9e7ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.IOException; -import java.util.logging.Logger; - - - - -/** - * @author jinyu - * - */ -public class TestRecFiles { - private static Logger log=Logger.getLogger(TestRecFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //192.168.30.128 - RecviceFiles rec=new RecviceFiles(); - String dir="/home/jinyu/recFiles"; - rec.setDir(dir); - rec.start("192.168.30.128", 5555); - log.info("ļ"); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4/40be8a05e0ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/4/40be8a05e0ac001716b9ca6d5abb90bc deleted file mode 100644 index 0ff7251..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4/40be8a05e0ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,189 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long startTime=System.currentTimeMillis(); - long lastTime=System.currentTimeMillis(); - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - long speed=0; - try - { - speed=sumBytes/((System.currentTimeMillis()-lastTime)/1000); - } - catch(Exception ex) - { - - } - lastTime=System.currentTimeMillis(); - log.info("ļٶȣ"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4/60fff865d8ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/4/60fff865d8ac001716b9ca6d5abb90bc deleted file mode 100644 index d9caf81..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4/60fff865d8ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,358 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public void setRecBufferSize(int size) -{ - bufSize=size; -} -public boolean getCloseState() -{ - //ײѾر - return isClose|socket.isClose(); -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(getCloseState()) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - while(true) - { - if(getCloseState()) - { - return null; - } - r=readData(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } - - return result; -} - - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(getCloseState()) - { - return false; - } - try { - - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(getCloseState()) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;ihandoffQueue; - - private Thread receiverThread; - - private volatile boolean stopped=false; - - //(optional) ack interval (see CongestionControl interface) - private volatile long ackInterval=-1; - - /** - * if set to true connections will not expire, but will only be - * closed by a Shutdown message - */ - public static boolean connectionExpiryDisabled=false; - - private final boolean storeStatistics; - - - - /** - * create a receiver with a valid {@link UDTSession} - * @param session - */ - public UDTReceiver(UDTSession session,UDPEndPoint endpoint){ - this.endpoint = endpoint; - this.session=session; - this.sessionUpSince=System.currentTimeMillis(); - this.statistics=session.getStatistics(); - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - ackHistoryWindow = new AckHistoryWindow(16); - packetHistoryWindow = new PacketHistoryWindow(16); - receiverLossList = new ReceiverLossList(); - packetPairWindow = new PacketPairWindow(16); - largestReceivedSeqNumber=session.getInitialSequenceNumber()-1; - bufferSize=session.getReceiveBufferSize(); - handoffQueue=new ArrayBlockingQueue(4*session.getFlowWindowSize()); - storeStatistics=Boolean.getBoolean("udt.receiver.storeStatistics"); - initMetrics(); - start(); - } - - private MeanValue dgReceiveInterval; - private MeanValue dataPacketInterval; - private MeanValue processTime; - private MeanValue dataProcessTime; - private void initMetrics(){ - if(!storeStatistics)return; - dgReceiveInterval=new MeanValue("UDT receive interval"); - statistics.addMetric(dgReceiveInterval); - dataPacketInterval=new MeanValue("Data packet interval"); - statistics.addMetric(dataPacketInterval); - processTime=new MeanValue("UDT packet process time"); - statistics.addMetric(processTime); - dataProcessTime=new MeanValue("Data packet process time"); - statistics.addMetric(dataProcessTime); - } - - - //starts the sender algorithm - private void start(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - nextACK=Util.getCurrentTime()+ackTimerInterval; - nextNAK=(long)(Util.getCurrentTime()+1.5*nakTimerInterval); - nextEXP=Util.getCurrentTime()+2*expTimerInterval; - ackInterval=session.getCongestionControl().getAckInterval(); - while(!stopped){ - receiverAlgorithm(); - } - } - catch(Exception ex){ - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING RECEIVER for "+session); - } - }; - receiverThread=UDTThreadFactory.get().newThread(r); - receiverThread.start(); - } - - /* - * packets are written by the endpoint - */ - protected void receive(UDTPacket p)throws IOException{ - if(storeStatistics)dgReceiveInterval.end(); - handoffQueue.offer(p); - if(storeStatistics)dgReceiveInterval.begin(); - } - - /** - * receiver algorithm - * see specification P11. - */ - public void receiverAlgorithm()throws InterruptedException,IOException{ - //check ACK timer - long currentTime=Util.getCurrentTime(); - if(nextACKseqNumbers=receiverLossList.getFilteredSequenceNumbers(roundTripTime,true); - sendNAK(seqNumbers); - } - - /** - * process EXP event (see spec. p 13) - */ - protected void processEXPEvent()throws IOException{ - if(session.getSocket()==null)return; - UDTSender sender=session.getSocket().getSender(); - //put all the unacknowledged packets in the senders loss list - sender.putUnacknowledgedPacketsIntoLossList(); - if(expCount>16 && System.currentTimeMillis()-sessionUpSince > IDLE_TIMEOUT){ - if(!connectionExpiryDisabled &&!stopped){ - sendShutdown(); - stop(); - logger.info("Session "+session+" expired."); - return; - } - } - if(!sender.haveLostPackets()){ - sendKeepAlive(); - } - expCount++; - } - - protected void processUDTPacket(UDTPacket p)throws IOException{ - //(3).Check the packet type and process it according to this. - - if(!p.isControlPacket()){ - DataPacket dp=(DataPacket)p; - if(storeStatistics){ - dataPacketInterval.end(); - dataProcessTime.begin(); - } - onDataPacketReceived(dp); - if(storeStatistics){ - dataProcessTime.end(); - dataPacketInterval.begin(); - } - - } - - else if (p.getControlPacketType()==ControlPacketType.ACK2.ordinal()){ - Acknowledgment2 ack2=(Acknowledgment2)p; - onAck2PacketReceived(ack2); - } - - else if (p instanceof Shutdown){ - onShutdown(); - } - - } - - //every nth packet will be discarded... for testing only of course - public static int dropRate=0; - - //number of received data packets - private int n=0; - - protected void onDataPacketReceived(DataPacket dp)throws IOException{ - long currentSequenceNumber = dp.getPacketSequenceNumber(); - - //for TESTING : check whether to drop this packet -// n++; -// //if(dropRate>0 && n % dropRate == 0){ -// if(n % 1111 == 0){ -// logger.info("**** TESTING:::: DROPPING PACKET "+currentSequenceNumber+" FOR TESTING"); -// return; -// } -// //} - boolean OK=session.getSocket().getInputStream().haveNewData(currentSequenceNumber,dp.getData()); - if(!OK){ - - //need to drop packet... - return; - } - - long currentDataPacketArrivalTime = Util.getCurrentTime(); - - /*(4).if the seqNo of the current data packet is 16n+1,record the - time interval between this packet and the last data packet - in the packet pair window*/ - if((currentSequenceNumber%16)==1 && lastDataPacketArrivalTime>0){ - long interval=currentDataPacketArrivalTime -lastDataPacketArrivalTime; - packetPairWindow.add(interval); - } - - //(5).record the packet arrival time in the PKT History Window. - packetHistoryWindow.add(currentDataPacketArrivalTime); - - - //store current time - lastDataPacketArrivalTime=currentDataPacketArrivalTime; - logger.info("largestReceivedSeqNumber:"+largestReceivedSeqNumber); - - //(6).number of detected lossed packet - /*(6.a).if the number of the current data packet is greater than LSRN+1, - put all the sequence numbers between (but excluding) these two values - into the receiver's loss list and send them to the sender in an NAK packet*/ - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber+1)>0){ - sendNAK(currentSequenceNumber); - - } - else if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)<0){ - /*(6.b).if the sequence number is less than LRSN,remove it from - * the receiver's loss list - */ - receiverLossList.remove(currentSequenceNumber); - - } - - statistics.incNumberOfReceivedDataPackets(); - - //(7).Update the LRSN - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)>0){ - largestReceivedSeqNumber=currentSequenceNumber; - } - - //(8) need to send an ACK? Some cc algorithms use this - if(ackInterval>0){ - if(n % ackInterval == 0)processACKEvent(false); - } - } - - /** - * write a NAK triggered by a received sequence number that is larger than - * the largestReceivedSeqNumber + 1 - * @param currentSequenceNumber - the currently received sequence number - * @throws IOException - */ - protected void sendNAK(long currentSequenceNumber)throws IOException{ - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(largestReceivedSeqNumber+1, currentSequenceNumber); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - //put all the sequence numbers between (but excluding) these two values into the - //receiver loss list - for(long i=largestReceivedSeqNumber+1;isequenceNumbers)throws IOException{ - if(sequenceNumbers.size()==0)return; - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(sequenceNumbers); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(nAckPacket); - statistics.incNumberOfNAKSent(); - - } - - protected long sendLightAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt=buildLightAcknowledgement(ackNumber); - endpoint.doSend(acknowledgmentPkt); - statistics.incNumberOfACKSent(); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - protected long sendAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); - //set the estimate link capacity - estimateLinkCapacity=packetPairWindow.getEstimatedLinkCapacity(); - acknowledgmentPkt.setEstimatedLinkCapacity(estimateLinkCapacity); - //set the packet arrival rate - packetArrivalSpeed=packetHistoryWindow.getPacketArrivalSpeed(); - acknowledgmentPkt.setPacketReceiveRate(packetArrivalSpeed); - - endpoint.doSend(acknowledgmentPkt); - - statistics.incNumberOfACKSent(); - statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - //builds a "light" Acknowledgement - private Acknowledgement buildLightAcknowledgement(long ackNumber){ - Acknowledgement acknowledgmentPkt = new Acknowledgement(); - //the packet sequence number to which all the packets have been received - acknowledgmentPkt.setAckNumber(ackNumber); - //assign this ack a unique increasing ACK sequence number - acknowledgmentPkt.setAckSequenceNumber(++ackSequenceNumber); - acknowledgmentPkt.setRoundTripTime(roundTripTime); - acknowledgmentPkt.setRoundTripTimeVar(roundTripTimeVar); - //set the buffer size - acknowledgmentPkt.setBufferSize(bufferSize); - - acknowledgmentPkt.setDestinationID(session.getDestination().getSocketID()); - acknowledgmentPkt.setSession(session); - - return acknowledgmentPkt; - } - - /** - * spec p. 13:
- 1) Locate the related ACK in the ACK History Window according to the - ACK sequence number in this ACK2.
- 2) Update the largest ACK number ever been acknowledged.
- 3) Calculate new rtt according to the ACK2 arrival time and the ACK - departure time, and update the RTT value as: RTT = (RTT * 7 + - rtt) / 8.
- 4) Update RTTVar by: RTTVar = (RTTVar * 3 + abs(RTT - rtt)) / 4.
- 5) Update both ACK and NAK period to 4 * RTT + RTTVar + SYN.
- */ - protected void onAck2PacketReceived(Acknowledgment2 ack2){ - AckHistoryEntry entry=ackHistoryWindow.getEntry(ack2.getAckSequenceNumber()); - if(entry!=null){ - long ackNumber=entry.getAckNumber(); - largestAcknowledgedAckNumber=Math.max(ackNumber, largestAcknowledgedAckNumber); - - long rtt=entry.getAge(); - if(roundTripTime>0)roundTripTime = (roundTripTime*7 + rtt)/8; - else roundTripTime = rtt; - roundTripTimeVar = (roundTripTimeVar* 3 + Math.abs(roundTripTimeVar- rtt)) / 4; - ackTimerInterval=4*roundTripTime+roundTripTimeVar+Util.getSYNTime(); - nakTimerInterval=ackTimerInterval; - statistics.setRTT(roundTripTime, roundTripTimeVar); - } - } - - protected void sendKeepAlive()throws IOException{ - KeepAlive ka=new KeepAlive(); - ka.setDestinationID(session.getDestination().getSocketID()); - ka.setSession(session); - endpoint.doSend(ka); - } - - protected void sendShutdown()throws IOException{ - Shutdown s=new Shutdown(); - s.setDestinationID(session.getDestination().getSocketID()); - s.setSession(session); - endpoint.doSend(s); - } - - private volatile long ackSequenceNumber=0; - - protected void resetEXPTimer(){ - nextEXP=Util.getCurrentTime()+expTimerInterval; - expCount=0; - } - - protected void resetEXPCount(){ - expCount=0; - } - - public void setAckInterval(long ackInterval){ - this.ackInterval=ackInterval; - } - - protected void onShutdown()throws IOException{ - stop(); - } - - public void stop()throws IOException{ - stopped=true; - session.getSocket().close(); - //stop our sender as well - session.getSocket().getSender().stop(); - } - - @Override - public String toString(){ - StringBuilder sb=new StringBuilder(); - sb.append("UDTReceiver ").append(session).append("\n"); - sb.append("LossList: "+receiverLossList); - return sb.toString(); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/40/a02a6e9dcfac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/40/a02a6e9dcfac001716b9ca6d5abb90bc deleted file mode 100644 index fa7a396..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/40/a02a6e9dcfac001716b9ca6d5abb90bc +++ /dev/null @@ -1,232 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ - if(highestReadSequenceNumber+10){ - int len=Math.min(bb.remaining(),chunksize); - byte[]chunk=new byte[len]; - bb.get(chunk); - DataPacket packet=new DataPacket(); - seqNo=sender.getNextSequenceNumber(); - packet.setPacketSequenceNumber(seqNo); - packet.setSession(session); - packet.setDestinationID(session.getDestination().getSocketID()); - packet.setData(chunk); - System.out.println("sender sendUdtPacket1"); - //put the packet into the send queue - if(!sender.sendUdtPacket(packet, timeout, units)){ - throw new IOException("Queue full"); - } - System.out.println("sender sendUdtPacket2"); - } - if(length>0)active=true; - System.out.println("sender sendUdtPacket out"); - } - /** - * will block until the outstanding packets have really been sent out - * and acknowledged - */ - protected void flush() throws InterruptedException{ - if(!active)return; - final long seqNo=sender.getCurrentSequenceNumber(); - if(seqNo<0)throw new IllegalStateException(); - while(!sender.isSentOut(seqNo)){ - Thread.sleep(5); - } - if(seqNo>-1){ - //wait until data has been sent out and acknowledged - while(active && !sender.haveAcknowledgementFor(seqNo)){ - sender.waitForAck(seqNo); - } - } - //TODO need to check if we can pause the sender... - //sender.pause(); - } - - //writes and wait for ack - protected void doWriteBlocking(byte[]data)throws IOException, InterruptedException{ - doWrite(data); - System.out.println("flush"); - flush(); - System.out.println("flush out"); - } - - /** - * close the connection - * @throws IOException - */ - public void close()throws IOException{ - if(inputStream!=null)inputStream.close(); - if(outputStream!=null)outputStream.close(); - active=false; - close=true; - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/41/f07d59bd1cac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/41/f07d59bd1cac001710ff8a7c6bda0fb8 deleted file mode 100644 index a227404..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/41/f07d59bd1cac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,44 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] buffer; -public long id; -private volatile int num=0; -private volatile int sum=0; -public DataStruct(int num) -{ - buffer=new byte[num][]; -} -private boolean check() -{ - if(num>=buffer.length) - { - //ɹ - - } -} -public boolean addData(byte[]data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - int index=buf.getInt(); - dataLen=buf.getInt(); - byte[] tmp=new byte[buf.limit()-buf.position()]; - buf.get(tmp); - buffer[index]=tmp; - num++; -} - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/42/101d91fd26ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/42/101d91fd26ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 500993a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/42/101d91fd26ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,234 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public int dataLen=0; - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData= PackagetSub.splitData(data); - for(int i=0;i hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ cd - if(highestReadSequenceNumber+1 hash=new ConcurrentHashMap(); - private ConcurrentLinkedQueue queue=new ConcurrentLinkedQueue(); -public boolean addData(byte[] data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - DataStruct struct=hash.get(id); - if(struct==null) - { - struct=new DataStruct(num); - hash.put(id, struct); - } - boolean r= struct.addData(data); - if(r) - { - byte[]result =struct.getData(); - byte[] tmp=new byte[result.length]; - System.arraycopy(result, 0, tmp, 0, tmp.length); - queue.offer(tmp); - struct.clear(); - hash.remove(id); - } - return r; - -} -public byte[] getData() -{ - return queue.poll(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/44/00022a6de4ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/44/00022a6de4ac001716b9ca6d5abb90bc deleted file mode 100644 index 7848a53..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/44/00022a6de4ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,219 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData(byte[] data) - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - - - } - - }); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/44/10c21fc9d6ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/44/10c21fc9d6ac001716b9ca6d5abb90bc deleted file mode 100644 index 4c5925c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/44/10c21fc9d6ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,248 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public int dataLen=0; - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - System.out.println("sendBlocking start"); - client.sendBlocking(data); - r=data.length; - sumLen+=r; - System.out.println("sendBlocking end"); - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData=null; - if(dataLen==0) - { - sendData=PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - sendData=sub.split(data, dataLen); - } - for(int i=0;isessions=new ConcurrentHashMap(); - - //last received packet - private UDTPacket lastPacket; - - //if the endpoint is configured for a server socket, - //this queue is used to handoff new UDTSessions to the application - private final SynchronousQueue sessionHandoff=new SynchronousQueue(); - - private boolean serverSocketMode=false; - - //has the endpoint been stopped? - private volatile boolean stopped=false; - - public static final int DATAGRAM_SIZE=1400; - - private volatile int sessionnum=0;//cd ʱͳ - - /** - * create an endpoint on the given socket - * - * @param socket - a UDP datagram socket - */ - public UDPEndPoint(DatagramSocket socket){ - this.dgSocket=socket; - port=dgSocket.getLocalPort(); - } - - /** - * bind to any local port on the given host address - * @param localAddress - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress)throws SocketException, UnknownHostException{ - this(localAddress,0); - } - - /** - * Bind to the given address and port - * @param localAddress - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress, int localPort)throws SocketException, UnknownHostException{ - if(localAddress==null){ - dgSocket=new DatagramSocket(localPort, localAddress); - }else{ - dgSocket=new DatagramSocket(localPort); - } - if(localPort>0)this.port = localPort; - else port=dgSocket.getLocalPort(); - - //set a time out to avoid blocking in doReceive() - dgSocket.setSoTimeout(100000); - //buffer size - dgSocket.setReceiveBufferSize(128*1024); - } - - /** - * bind to the default network interface on the machine - * - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(int localPort)throws SocketException, UnknownHostException{ - this(null,localPort); - } - - /** - * bind to an ephemeral port on the default network interface on the machine - * - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint()throws SocketException, UnknownHostException{ - this(null,0); - } - - /** - * start the endpoint. If the serverSocketModeEnabled flag is true, - * a new connection can be handed off to an application. The application needs to - * call #accept() to get the socket - * @param serverSocketModeEnabled - */ - public void start(boolean serverSocketModeEnabled){ - serverSocketMode=serverSocketModeEnabled; - //start receive thread - Runnable receive=new Runnable(){ - @Override - public void run(){ - try{ - doReceive(); - }catch(Exception ex){ - logger.log(Level.WARNING,"",ex); - } - } - }; - Thread t=UDTThreadFactory.get().newThread(receive); - t.setDaemon(true); - t.start(); - logger.info("UDTEndpoint started."); - } - - public void start(){ - start(false); - } - - public void stop(){ - stopped=true; - dgSocket.close(); - } - - /** - * @return the port which this client is bound to - */ - public int getLocalPort() { - return this.dgSocket.getLocalPort(); - } - /** - * @return Gets the local address to which the socket is bound - */ - public InetAddress getLocalAddress(){ - return this.dgSocket.getLocalAddress(); - } - - DatagramSocket getSocket(){ - return dgSocket; - } - - UDTPacket getLastPacket(){ - return lastPacket; - } - - public void addSession(Long destinationID,UDTSession session){ - logger.info("Storing session <"+destinationID+">"); - sessionnum++; - sessions.put(destinationID, session); - } - - public UDTSession getSession(Long destinationID){ - return sessions.get(destinationID); - } - - /** - * Ƴsession - * cd - * @param socketid - * @return - */ - public UDTSession removeSession(long socketid) - { - //cd - sessionnum--; - logger.info("Storing Sessionnum:"+sessionnum); - return sessions.remove(socketid); - } - public Collection getSessions(){ - return sessions.values(); - } - - /** - * wait the given time for a new connection - * @param timeout - the time to wait - * @param unit - the {@link TimeUnit} - * @return a new {@link UDTSession} - * @throws InterruptedException - */ - protected UDTSession accept(long timeout, TimeUnit unit)throws InterruptedException{ - return sessionHandoff.poll(timeout, unit); - } - - - final DatagramPacket dp= new DatagramPacket(new byte[DATAGRAM_SIZE],DATAGRAM_SIZE); - - /** - * single receive, run in the receiverThread, see {@link #start()} - *
    - *
  • Receives UDP packets from the network
  • - *
  • Converts them to UDT packets
  • - *
  • dispatches the UDT packets according to their destination ID.
  • - *
- * @throws IOException - */ - private long lastDestID=-1; - private UDTSession lastSession; - - //MeanValue v=new MeanValue("receiver processing ",true, 256); - - private int n=0; - - private final Object lock=new Object(); - - protected void doReceive()throws IOException{ - while(!stopped){ - try{ - try{ - //v.end(); - - //will block until a packet is received or timeout has expired - dgSocket.receive(dp); - - //v.begin(); - - Destination peer=new Destination(dp.getAddress(), dp.getPort()); - int l=dp.getLength(); - UDTPacket packet=PacketFactory.createPacket(dp.getData(),l); - lastPacket=packet; - - //handle connection handshake - if(packet.isConnectionHandshake()){ - synchronized(lock){ - Long id=Long.valueOf(packet.getDestinationID()); - UDTSession session=sessions.get(id); - if(session==null){ - session=new ServerSession(dp,this); - addSession(session.getSocketID(),session); - //TODO need to check peer to avoid duplicate server session - if(serverSocketMode){ - logger.fine("Pooling new request."); - sessionHandoff.put(session); - logger.fine("Request taken for processing."); - } - } - peer.setSocketID(((ConnectionHandshake)packet).getSocketID()); -// session.received(packet,peer); - } - } - else{ - //dispatch to existing session - long dest=packet.getDestinationID(); - UDTSession session; - if(dest==lastDestID){ - session=lastSession; - } - else{ - session=sessions.get(dest);//cd - lastSession=session; - lastDestID=dest; - } - if(session==null){ - n++; - if(n%100==1){ - logger.warning("Unknown session <"+dest+"> requested from <"+peer+"> packet type "+packet.getClass().getName()); - } - } - else{ - session.received(packet,peer); - - } - } - }catch(SocketException ex){ - if(ex.getMessage().equals("socket closed")&&stopped) - { - //cd - //Ѿر - } - else - { - logger.log(Level.INFO, "SocketException: "+ex.getMessage()); - } - }catch(SocketTimeoutException ste){ - //can safely ignore... we will retry until the endpoint is stopped - } - - }catch(Exception ex){ - logger.log(Level.WARNING, "Got: "+ex.getMessage(),ex); - } - } - } - - protected void doSend(UDTPacket packet)throws IOException{ - byte[]data=packet.getEncoded(); - DatagramPacket dgp = packet.getSession().getDatagram(); - dgp.setData(data); - dgSocket.send(dgp); - } - - @Override - public String toString(){ - return "UDPEndpoint port="+port; - } - - public void sendRaw(DatagramPacket p)throws IOException{ - dgSocket.send(p); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/44/e0b7669b5ba800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/44/e0b7669b5ba800171a8482560d609ceb deleted file mode 100644 index f6ab2a2..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/44/e0b7669b5ba800171a8482560d609ceb +++ /dev/null @@ -1,196 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.UDTStatistics; - -public class UDTClient { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - private final UDPEndPoint clientEndpoint; - private ClientSession clientSession; - private boolean close=false; - private Thread closeThread=null;//cd - public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address,localport); - logger.info("Created client endpoint on port "+localport); - } - - public UDTClient(InetAddress address)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address); - logger.info("Created client endpoint on port "+clientEndpoint.getLocalPort()); - } - - public UDTClient(UDPEndPoint endpoint)throws SocketException, UnknownHostException{ - clientEndpoint=endpoint; - } - - /** - * establishes a connection to the given server. - * Starts the sender thread. - * @param host - * @param port - * @throws UnknownHostException - */ - public void connect(String host, int port)throws InterruptedException, UnknownHostException, IOException{ - InetAddress address=InetAddress.getByName(host); - Destination destination=new Destination(address,port); - //create client session... - clientSession=new ClientSession(clientEndpoint,destination); - clientEndpoint.addSession(clientSession.getSocketID(), clientSession); - - clientEndpoint.start(); - clientSession.connect(); - //wait for handshake - while(!clientSession.isReady()){ - Thread.sleep(500); - } - logger.info("The UDTClient is connected"); - Thread.sleep(500); - } - - /** - * sends the given data asynchronously - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - public void send(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWrite(data); - } - - public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWriteBlocking(data); - } - - public int read(byte[]data)throws IOException, InterruptedException{ - return clientSession.getSocket().getInputStream().read(data); - } - - /** - * flush outstanding data (and make sure it is acknowledged) - * @throws IOException - * @throws InterruptedException - */ - public void flush()throws IOException, InterruptedException{ - clientSession.getSocket().flush(); - } - - - public void shutdown()throws IOException{ - - if (clientSession.isReady()&& clientSession.active==true) - { - Shutdown shutdown = new Shutdown(); - shutdown.setDestinationID(clientSession.getDestination().getSocketID()); - shutdown.setSession(clientSession); - try{ - clientEndpoint.doSend(shutdown); - TimeUnit.MILLISECONDS.sleep(100); - } - catch(Exception e) - { - logger.log(Level.SEVERE,"ERROR: Connection could not be stopped!",e); - } - clientSession.getSocket().getReceiver().stop(); - clientEndpoint.stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - close=true; - } - } - - public UDTInputStream getInputStream()throws IOException{ - return clientSession.getSocket().getInputStream(); - } - - public UDTOutputStream getOutputStream()throws IOException{ - return clientSession.getSocket().getOutputStream(); - } - - public UDPEndPoint getEndpoint()throws IOException{ - return clientEndpoint; - } - - public UDTStatistics getStatistics(){ - return clientSession.getStatistics(); - } - - public long getSocketID() - { - //cd - return clientSession.getSocketID(); - } - - /** - * ͬر - * ȴݷɺٹر - * ֻȴ10ss - */ - public synchronized void close() - { - close=true; - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - // TODO Auto-generated method stub - - } - - }) - } - - } - - public boolean isClose() - { - return close; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/45/30c1c047b5ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/45/30c1c047b5ad0017181ed9113883eda9 deleted file mode 100644 index f72f300..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/45/30c1c047b5ad0017181ed9113883eda9 +++ /dev/null @@ -1,519 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - // - } - } - - } - - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/45/80fb200424ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/45/80fb200424ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 7b49c56..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/45/80fb200424ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,324 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public boolean getCloseState() -{ - return isClose; -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readData() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} -/** - * - * ݲܷ - */ -public boolean sendSplitData(byte[]data) { - if(isClose) - { - return false; - } - byte[][]result=PackagetSub.split(data); - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - log.info(":"+); - } - client.close(); - dis.close(); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/46/e0878eb7f8ab001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/46/e0878eb7f8ab001710ff8a7c6bda0fb8 deleted file mode 100644 index a644cde..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/46/e0878eb7f8ab001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,347 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.DatagramPacket; -import java.net.DatagramSocket; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.SocketTimeoutException; -import java.net.UnknownHostException; -import java.util.Collection; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.SynchronousQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.PacketFactory; -import udt.util.UDTThreadFactory; - -/** - * the UDPEndpoint takes care of sending and receiving UDP network packets, - * dispatching them to the correct {@link UDTSession} - */ -public class UDPEndPoint { - - private static final Logger logger=Logger.getLogger(ClientSession.class.getName()); - - private final int port; - - private final DatagramSocket dgSocket; - - //active sessions keyed by socket ID - private final Mapsessions=new ConcurrentHashMap(); - - //last received packet - private UDTPacket lastPacket; - - //if the endpoint is configured for a server socket, - //this queue is used to handoff new UDTSessions to the application - private final SynchronousQueue sessionHandoff=new SynchronousQueue(); - - private boolean serverSocketMode=false; - - //has the endpoint been stopped? - private volatile boolean stopped=false; - - public static final int DATAGRAM_SIZE=1400; - - private volatile int sessionnum=0;//cd ʱͳ - - /** - * create an endpoint on the given socket - * - * @param socket - a UDP datagram socket - */ - public UDPEndPoint(DatagramSocket socket){ - this.dgSocket=socket; - port=dgSocket.getLocalPort(); - } - - /** - * bind to any local port on the given host address - * @param localAddress - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress)throws SocketException, UnknownHostException{ - this(localAddress,0); - } - - /** - * Bind to the given address and port - * @param localAddress - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress, int localPort)throws SocketException, UnknownHostException{ - if(localAddress==null){ - dgSocket=new DatagramSocket(localPort, localAddress); - }else{ - dgSocket=new DatagramSocket(localPort); - } - if(localPort>0)this.port = localPort; - else port=dgSocket.getLocalPort(); - - //set a time out to avoid blocking in doReceive() - dgSocket.setSoTimeout(100000); - //buffer size - dgSocket.setReceiveBufferSize(128*1024); - } - - /** - * bind to the default network interface on the machine - * - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(int localPort)throws SocketException, UnknownHostException{ - this(null,localPort); - } - - /** - * bind to an ephemeral port on the default network interface on the machine - * - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint()throws SocketException, UnknownHostException{ - this(null,0); - } - - /** - * start the endpoint. If the serverSocketModeEnabled flag is true, - * a new connection can be handed off to an application. The application needs to - * call #accept() to get the socket - * @param serverSocketModeEnabled - */ - public void start(boolean serverSocketModeEnabled){ - serverSocketMode=serverSocketModeEnabled; - //start receive thread - Runnable receive=new Runnable(){ - @Override - public void run(){ - try{ - doReceive(); - }catch(Exception ex){ - logger.log(Level.WARNING,"",ex); - } - } - }; - Thread t=UDTThreadFactory.get().newThread(receive); - t.setDaemon(true); - t.start(); - logger.info("UDTEndpoint started."); - } - - public void start(){ - start(false); - } - - public void stop(){ - stopped=true; - dgSocket.close(); - } - - /** - * @return the port which this client is bound to - */ - public int getLocalPort() { - return this.dgSocket.getLocalPort(); - } - /** - * @return Gets the local address to which the socket is bound - */ - public InetAddress getLocalAddress(){ - return this.dgSocket.getLocalAddress(); - } - - DatagramSocket getSocket(){ - return dgSocket; - } - - UDTPacket getLastPacket(){ - return lastPacket; - } - - public void addSession(Long destinationID,UDTSession session){ - logger.info("Storing session <"+destinationID+">"); - sessionnum++; - sessions.put(destinationID, session); - } - - public UDTSession getSession(Long destinationID){ - return sessions.get(destinationID); - } - - /** - * Ƴsession - * cd - * @param socketid - * @return - */ - public UDTSession removeSession(long socketid) - { - //cd - sessionnum--; - logger.info("Storing Sessionnum:"+sessionnum); - return sessions.remove(socketid); - } - public Collection getSessions(){ - return sessions.values(); - } - - /** - * wait the given time for a new connection - * @param timeout - the time to wait - * @param unit - the {@link TimeUnit} - * @return a new {@link UDTSession} - * @throws InterruptedException - */ - protected UDTSession accept(long timeout, TimeUnit unit)throws InterruptedException{ - return sessionHandoff.poll(timeout, unit); - } - - - final DatagramPacket dp= new DatagramPacket(new byte[DATAGRAM_SIZE],DATAGRAM_SIZE); - - /** - * single receive, run in the receiverThread, see {@link #start()} - *
    - *
  • Receives UDP packets from the network
  • - *
  • Converts them to UDT packets
  • - *
  • dispatches the UDT packets according to their destination ID.
  • - *
- * @throws IOException - */ - private long lastDestID=-1; - private UDTSession lastSession; - - //MeanValue v=new MeanValue("receiver processing ",true, 256); - - private int n=0; - - private final Object lock=new Object(); - - protected void doReceive()throws IOException{ - while(!stopped){ - try{ - try{ - //v.end(); - - //will block until a packet is received or timeout has expired - dgSocket.receive(dp); - - //v.begin(); - - Destination peer=new Destination(dp.getAddress(), dp.getPort()); - int l=dp.getLength(); - UDTPacket packet=PacketFactory.createPacket(dp.getData(),l); - lastPacket=packet; - - //handle connection handshake - if(packet.isConnectionHandshake()){ - synchronized(lock){ - Long id=Long.valueOf(packet.getDestinationID()); - UDTSession session=sessions.get(id); - if(session==null){ - session=new ServerSession(dp,this); - addSession(session.getSocketID(),session); - //TODO need to check peer to avoid duplicate server session - if(serverSocketMode){ - logger.fine("Pooling new request."); - sessionHandoff.put(session); - logger.fine("Request taken for processing."); - } - } - peer.setSocketID(((ConnectionHandshake)packet).getSocketID()); - session.received(packet,peer); - } - } - else{ - //dispatch to existing session - long dest=packet.getDestinationID(); - UDTSession session; - if(dest==lastDestID){ - session=lastSession; - } - else{ - session=sessions.get(dest); - lastSession=session; - lastDestID=dest; - } - if(session==null){ - n++; - if(n%100==1){ - logger.warning("Unknown session <"+dest+"> requested from <"+peer+"> packet type "+packet.getClass().getName()); - } - } - else{ - session.received(packet,peer); - } - } - }catch(SocketException ex){ - logger.log(Level.INFO, "SocketException: "+ex.getMessage()); - }catch(SocketTimeoutException ste){ - //can safely ignore... we will retry until the endpoint is stopped - } - - }catch(Exception ex){ - logger.log(Level.WARNING, "Got: "+ex.getMessage(),ex); - } - } - } - - protected void doSend(UDTPacket packet)throws IOException{ - byte[]data=packet.getEncoded(); - DatagramPacket dgp = packet.getSession().getDatagram(); - dgp.setData(data); - dgSocket.send(dgp); - } - - @Override - public String toString(){ - return "UDPEndpoint port="+port; - } - - public void sendRaw(DatagramPacket p)throws IOException{ - dgSocket.send(p); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/47/007297c0b8ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/47/007297c0b8ac001716b9ca6d5abb90bc deleted file mode 100644 index 8c45dc5..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/47/007297c0b8ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,602 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.ControlPacket; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.packets.Shutdown; -import udt.packets.ControlPacket.ControlPacketType; -import udt.receiver.AckHistoryEntry; -import udt.receiver.AckHistoryWindow; -import udt.receiver.PacketHistoryWindow; -import udt.receiver.PacketPairWindow; -import udt.receiver.ReceiverLossList; -import udt.receiver.ReceiverLossListEntry; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - -/** - * receiver part of a UDT entity - * @see UDTSender - */ -public class UDTReceiver { - - private static final Logger logger=Logger.getLogger(UDTReceiver.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //record seqNo of detected lostdata and latest feedback time - private final ReceiverLossList receiverLossList; - - //record each sent ACK and the sent time - private final AckHistoryWindow ackHistoryWindow; - - //Packet history window that stores the time interval between the current and the last seq. - private final PacketHistoryWindow packetHistoryWindow; - - //for storing the arrival time of the last received data packet - private volatile long lastDataPacketArrivalTime=0; - - //largest received data packet sequence number(LRSN) - private volatile long largestReceivedSeqNumber=0; - - //ACK event related - - //last Ack number - private long lastAckNumber=0; - - //largest Ack number ever acknowledged by ACK2 - private volatile long largestAcknowledgedAckNumber=-1; - - //EXP event related - - //a variable to record number of continuous EXP time-out events - private volatile long expCount=0; - - /*records the time interval between each probing pair - compute the median packet pair interval of the last - 16 packet pair intervals (PI) and the estimate link capacity.(packet/s)*/ - private final PacketPairWindow packetPairWindow; - - //estimated link capacity - long estimateLinkCapacity; - // the packet arrival rate - long packetArrivalSpeed; - - //round trip time, calculated from ACK/ACK2 pairs - long roundTripTime=0; - //round trip time variance - long roundTripTimeVar=roundTripTime/2; - - //to check the ACK, NAK, or EXP timer - private long nextACK; - //microseconds to next ACK event - private long ackTimerInterval=Util.getSYNTime(); - - private long nextNAK; - //microseconds to next NAK event - private long nakTimerInterval=Util.getSYNTime(); - - private long nextEXP; - //microseconds to next EXP event - private long expTimerInterval=100*Util.getSYNTime(); - - //instant when the session was created (for expiry checking) - private final long sessionUpSince; - //milliseconds to timeout a new session that stays idle - private final long IDLE_TIMEOUT = 3*60*1000; - - //buffer size for storing data - private final long bufferSize; - - //stores received packets to be sent - private final BlockingQueuehandoffQueue; - - private Thread receiverThread; - - private volatile boolean stopped=false; - - //(optional) ack interval (see CongestionControl interface) - private volatile long ackInterval=-1; - - /** - * if set to true connections will not expire, but will only be - * closed by a Shutdown message - */ - public static boolean connectionExpiryDisabled=false; - - private final boolean storeStatistics; - - - - /** - * create a receiver with a valid {@link UDTSession} - * @param session - */ - public UDTReceiver(UDTSession session,UDPEndPoint endpoint){ - this.endpoint = endpoint; - this.session=session; - this.sessionUpSince=System.currentTimeMillis(); - this.statistics=session.getStatistics(); - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - ackHistoryWindow = new AckHistoryWindow(16); - packetHistoryWindow = new PacketHistoryWindow(16); - receiverLossList = new ReceiverLossList(); - packetPairWindow = new PacketPairWindow(16); - largestReceivedSeqNumber=session.getInitialSequenceNumber()-1; - bufferSize=session.getReceiveBufferSize(); - handoffQueue=new ArrayBlockingQueue(4*session.getFlowWindowSize()); - storeStatistics=Boolean.getBoolean("udt.receiver.storeStatistics"); - initMetrics(); - start(); - } - - private MeanValue dgReceiveInterval; - private MeanValue dataPacketInterval; - private MeanValue processTime; - private MeanValue dataProcessTime; - private void initMetrics(){ - if(!storeStatistics)return; - dgReceiveInterval=new MeanValue("UDT receive interval"); - statistics.addMetric(dgReceiveInterval); - dataPacketInterval=new MeanValue("Data packet interval"); - statistics.addMetric(dataPacketInterval); - processTime=new MeanValue("UDT packet process time"); - statistics.addMetric(processTime); - dataProcessTime=new MeanValue("Data packet process time"); - statistics.addMetric(dataProcessTime); - } - - - //starts the sender algorithm - private void start(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - nextACK=Util.getCurrentTime()+ackTimerInterval; - nextNAK=(long)(Util.getCurrentTime()+1.5*nakTimerInterval); - nextEXP=Util.getCurrentTime()+2*expTimerInterval; - ackInterval=session.getCongestionControl().getAckInterval(); - while(!stopped){ - receiverAlgorithm(); - } - } - catch(Exception ex){ - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING RECEIVER for "+session); - } - }; - receiverThread=UDTThreadFactory.get().newThread(r); - receiverThread.start(); - } - - /* - * packets are written by the endpoint - */ - protected void receive(UDTPacket p)throws IOException{ - if(storeStatistics)dgReceiveInterval.end(); - handoffQueue.offer(p); - if(storeStatistics)dgReceiveInterval.begin(); - } - - /** - * receiver algorithm - * see specification P11. - */ - public void receiverAlgorithm()throws InterruptedException,IOException{ - //check ACK timer - long currentTime=Util.getCurrentTime(); - if(nextACKseqNumbers=receiverLossList.getFilteredSequenceNumbers(roundTripTime,true); - sendNAK(seqNumbers); - } - - /** - * process EXP event (see spec. p 13) - */ - protected void processEXPEvent()throws IOException{ - if(session.getSocket()==null)return; - UDTSender sender=session.getSocket().getSender(); - //put all the unacknowledged packets in the senders loss list - sender.putUnacknowledgedPacketsIntoLossList(); - if(expCount>16 && System.currentTimeMillis()-sessionUpSince > IDLE_TIMEOUT){ - if(!connectionExpiryDisabled &&!stopped){ - sendShutdown(); - stop(); - logger.info("Session "+session+" expired."); - return; - } - } - if(!sender.haveLostPackets()){ - sendKeepAlive(); - } - expCount++; - } - - protected void processUDTPacket(UDTPacket p)throws IOException{ - //(3).Check the packet type and process it according to this. - - if(!p.isControlPacket()){ - DataPacket dp=(DataPacket)p; - if(storeStatistics){ - dataPacketInterval.end(); - dataProcessTime.begin(); - } - onDataPacketReceived(dp); - if(storeStatistics){ - dataProcessTime.end(); - dataPacketInterval.begin(); - } - logger.info("DataPacket udt:"+p.getPacketSequenceNumber()); - } - - else if (p.getControlPacketType()==ControlPacketType.ACK2.ordinal()){ - Acknowledgment2 ack2=(Acknowledgment2)p; - onAck2PacketReceived(ack2); - } - - else if (p instanceof Shutdown){ - onShutdown(); - } - - } - - //every nth packet will be discarded... for testing only of course - public static int dropRate=0; - - //number of received data packets - private int n=0; - - protected void onDataPacketReceived(DataPacket dp)throws IOException{ - long currentSequenceNumber = dp.getPacketSequenceNumber(); - - //for TESTING : check whether to drop this packet -// n++; -// //if(dropRate>0 && n % dropRate == 0){ -// if(n % 1111 == 0){ -// logger.info("**** TESTING:::: DROPPING PACKET "+currentSequenceNumber+" FOR TESTING"); -// return; -// } -// //} - boolean OK=session.getSocket().getInputStream().haveNewData(currentSequenceNumber,dp.getData()); - if(!OK){ - //need to drop packet... - return; - } - - long currentDataPacketArrivalTime = Util.getCurrentTime(); - - /*(4).if the seqNo of the current data packet is 16n+1,record the - time interval between this packet and the last data packet - in the packet pair window*/ - if((currentSequenceNumber%16)==1 && lastDataPacketArrivalTime>0){ - long interval=currentDataPacketArrivalTime -lastDataPacketArrivalTime; - packetPairWindow.add(interval); - } - - //(5).record the packet arrival time in the PKT History Window. - packetHistoryWindow.add(currentDataPacketArrivalTime); - - - //store current time - lastDataPacketArrivalTime=currentDataPacketArrivalTime; - - - //(6).number of detected lossed packet - /*(6.a).if the number of the current data packet is greater than LSRN+1, - put all the sequence numbers between (but excluding) these two values - into the receiver's loss list and send them to the sender in an NAK packet*/ - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber+1)>0){ - sendNAK(currentSequenceNumber); - } - else if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)<0){ - /*(6.b).if the sequence number is less than LRSN,remove it from - * the receiver's loss list - */ - receiverLossList.remove(currentSequenceNumber); - logger.info("receiverLossList remove:"+currentSequenceNumber); - } - - statistics.incNumberOfReceivedDataPackets(); - - //(7).Update the LRSN - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)>0){ - largestReceivedSeqNumber=currentSequenceNumber; - } - - //(8) need to send an ACK? Some cc algorithms use this - if(ackInterval>0){ - if(n % ackInterval == 0)processACKEvent(false); - } - } - - /** - * write a NAK triggered by a received sequence number that is larger than - * the largestReceivedSeqNumber + 1 - * @param currentSequenceNumber - the currently received sequence number - * @throws IOException - */ - protected void sendNAK(long currentSequenceNumber)throws IOException{ - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(largestReceivedSeqNumber+1, currentSequenceNumber); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - //put all the sequence numbers between (but excluding) these two values into the - //receiver loss list - for(long i=largestReceivedSeqNumber+1;isequenceNumbers)throws IOException{ - if(sequenceNumbers.size()==0)return; - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(sequenceNumbers); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(nAckPacket); - statistics.incNumberOfNAKSent(); - } - - protected long sendLightAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt=buildLightAcknowledgement(ackNumber); - endpoint.doSend(acknowledgmentPkt); - statistics.incNumberOfACKSent(); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - protected long sendAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); - //set the estimate link capacity - estimateLinkCapacity=packetPairWindow.getEstimatedLinkCapacity(); - acknowledgmentPkt.setEstimatedLinkCapacity(estimateLinkCapacity); - //set the packet arrival rate - packetArrivalSpeed=packetHistoryWindow.getPacketArrivalSpeed(); - acknowledgmentPkt.setPacketReceiveRate(packetArrivalSpeed); - - endpoint.doSend(acknowledgmentPkt); - - statistics.incNumberOfACKSent(); - statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - //builds a "light" Acknowledgement - private Acknowledgement buildLightAcknowledgement(long ackNumber){ - Acknowledgement acknowledgmentPkt = new Acknowledgement(); - //the packet sequence number to which all the packets have been received - acknowledgmentPkt.setAckNumber(ackNumber); - //assign this ack a unique increasing ACK sequence number - acknowledgmentPkt.setAckSequenceNumber(++ackSequenceNumber); - acknowledgmentPkt.setRoundTripTime(roundTripTime); - acknowledgmentPkt.setRoundTripTimeVar(roundTripTimeVar); - //set the buffer size - acknowledgmentPkt.setBufferSize(bufferSize); - - acknowledgmentPkt.setDestinationID(session.getDestination().getSocketID()); - acknowledgmentPkt.setSession(session); - - return acknowledgmentPkt; - } - - /** - * spec p. 13:
- 1) Locate the related ACK in the ACK History Window according to the - ACK sequence number in this ACK2.
- 2) Update the largest ACK number ever been acknowledged.
- 3) Calculate new rtt according to the ACK2 arrival time and the ACK - departure time, and update the RTT value as: RTT = (RTT * 7 + - rtt) / 8.
- 4) Update RTTVar by: RTTVar = (RTTVar * 3 + abs(RTT - rtt)) / 4.
- 5) Update both ACK and NAK period to 4 * RTT + RTTVar + SYN.
- */ - protected void onAck2PacketReceived(Acknowledgment2 ack2){ - AckHistoryEntry entry=ackHistoryWindow.getEntry(ack2.getAckSequenceNumber()); - if(entry!=null){ - long ackNumber=entry.getAckNumber(); - largestAcknowledgedAckNumber=Math.max(ackNumber, largestAcknowledgedAckNumber); - - long rtt=entry.getAge(); - if(roundTripTime>0)roundTripTime = (roundTripTime*7 + rtt)/8; - else roundTripTime = rtt; - roundTripTimeVar = (roundTripTimeVar* 3 + Math.abs(roundTripTimeVar- rtt)) / 4; - ackTimerInterval=4*roundTripTime+roundTripTimeVar+Util.getSYNTime(); - nakTimerInterval=ackTimerInterval; - statistics.setRTT(roundTripTime, roundTripTimeVar); - } - } - - protected void sendKeepAlive()throws IOException{ - KeepAlive ka=new KeepAlive(); - ka.setDestinationID(session.getDestination().getSocketID()); - ka.setSession(session); - endpoint.doSend(ka); - } - - protected void sendShutdown()throws IOException{ - Shutdown s=new Shutdown(); - s.setDestinationID(session.getDestination().getSocketID()); - s.setSession(session); - endpoint.doSend(s); - } - - private volatile long ackSequenceNumber=0; - - protected void resetEXPTimer(){ - nextEXP=Util.getCurrentTime()+expTimerInterval; - expCount=0; - } - - protected void resetEXPCount(){ - expCount=0; - } - - public void setAckInterval(long ackInterval){ - this.ackInterval=ackInterval; - } - - protected void onShutdown()throws IOException{ - stop(); - } - - public void stop()throws IOException{ - stopped=true; - session.getSocket().close(); - //stop our sender as well - session.getSocket().getSender().stop(); - } - - @Override - public String toString(){ - StringBuilder sb=new StringBuilder(); - sb.append("UDTReceiver ").append(session).append("\n"); - sb.append("LossList: "+receiverLossList); - return sb.toString(); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/47/d00bbfdca0ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/47/d00bbfdca0ad0017181ed9113883eda9 deleted file mode 100644 index 377ac17..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/47/d00bbfdca0ad0017181ed9113883eda9 +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - */ -package net.File; - -import java.util.logging.Logger; - -import net.File.FileMonitor; -import net.File.FilesWatch; - - - - -/** - * @author jinyu - * - */ -public class TestSendFiles { - private static Logger log=Logger.getLogger(TestSendFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //SendFiles send=new SendFiles("192.168.9.152", 5555); - //192.168.30.128 - SendFiles send=new SendFiles("192.168.30.128", 5555); - FilesWatch watch=new FilesWatch(); - String dir="F:/monitor"; - watch.setWatch(dir); - watch.start(); - while(true) - { - FileMonitor ff= watch.take(); - log.info(ff.file); - if(ff.file.endsWith(".tmp")) - { - continue; - } - send.sendFile(dir+"/"+ff.file); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/48/d0a3f354a2ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/48/d0a3f354a2ad0017181ed9113883eda9 deleted file mode 100644 index 3068e79..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/48/d0a3f354a2ad0017181ed9113883eda9 +++ /dev/null @@ -1,55 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.File; -import java.util.logging.Logger; - -import net.File.FileMonitor; -import net.File.FilesWatch; - - - - -/** - * @author jinyu - * - */ -public class TestSendFiles { - private static Logger log=Logger.getLogger(TestSendFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //SendFiles send=new SendFiles("192.168.9.152", 5555); - //192.168.30.128 - String path = TestSendFiles.class.getProtectionDomain().getCodeSource().getLocation().getPath(); - int firstIndex = path.lastIndexOf(System.getProperty("path.separator")) + 1; - int lastIndex = path.lastIndexOf(File.separator) + 1; - path = path.substring(firstIndex, lastIndex); - ReadXml rd=new ReadXml(); - String xml= rd.readXml(path+"/config.xml"); - String[] config=null; - if(xml!=null) - { - config=xml.split(","); - } - SendFiles send=new SendFiles(config[0], Integer.valueOf(config[1])); - FilesWatch watch=new FilesWatch(); - String dir=config[2]; - watch.setWatch(dir); - watch.start(); - while(true) - { - FileMonitor ff= watch.take(); - log.info(ff.file); - if(ff.file.endsWith(".tmp")) - { - continue; - } - send.sendFile(dir+"/"+ff.file); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/48/d0b6053b5ba800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/48/d0b6053b5ba800171a8482560d609ceb deleted file mode 100644 index 5969962..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/48/d0b6053b5ba800171a8482560d609ceb +++ /dev/null @@ -1,174 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.UDTStatistics; - -public class UDTClient { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - private final UDPEndPoint clientEndpoint; - private ClientSession clientSession; - private boolean close=false; - private Thread closeThread=null;//cd - public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address,localport); - logger.info("Created client endpoint on port "+localport); - } - - public UDTClient(InetAddress address)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address); - logger.info("Created client endpoint on port "+clientEndpoint.getLocalPort()); - } - - public UDTClient(UDPEndPoint endpoint)throws SocketException, UnknownHostException{ - clientEndpoint=endpoint; - } - - /** - * establishes a connection to the given server. - * Starts the sender thread. - * @param host - * @param port - * @throws UnknownHostException - */ - public void connect(String host, int port)throws InterruptedException, UnknownHostException, IOException{ - InetAddress address=InetAddress.getByName(host); - Destination destination=new Destination(address,port); - //create client session... - clientSession=new ClientSession(clientEndpoint,destination); - clientEndpoint.addSession(clientSession.getSocketID(), clientSession); - - clientEndpoint.start(); - clientSession.connect(); - //wait for handshake - while(!clientSession.isReady()){ - Thread.sleep(500); - } - logger.info("The UDTClient is connected"); - Thread.sleep(500); - } - - /** - * sends the given data asynchronously - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - public void send(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWrite(data); - } - - public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWriteBlocking(data); - } - - public int read(byte[]data)throws IOException, InterruptedException{ - return clientSession.getSocket().getInputStream().read(data); - } - - /** - * flush outstanding data (and make sure it is acknowledged) - * @throws IOException - * @throws InterruptedException - */ - public void flush()throws IOException, InterruptedException{ - clientSession.getSocket().flush(); - } - - - public void shutdown()throws IOException{ - - if (clientSession.isReady()&& clientSession.active==true) - { - Shutdown shutdown = new Shutdown(); - shutdown.setDestinationID(clientSession.getDestination().getSocketID()); - shutdown.setSession(clientSession); - try{ - clientEndpoint.doSend(shutdown); - TimeUnit.MILLISECONDS.sleep(100); - } - catch(Exception e) - { - logger.log(Level.SEVERE,"ERROR: Connection could not be stopped!",e); - } - clientSession.getSocket().getReceiver().stop(); - clientEndpoint.stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - close=true; - } - } - - public UDTInputStream getInputStream()throws IOException{ - return clientSession.getSocket().getInputStream(); - } - - public UDTOutputStream getOutputStream()throws IOException{ - return clientSession.getSocket().getOutputStream(); - } - - public UDPEndPoint getEndpoint()throws IOException{ - return clientEndpoint; - } - - public UDTStatistics getStatistics(){ - return clientSession.getStatistics(); - } - - public long getSocketID() - { - //cd - return clientSession.getSocketID(); - } - - - public boolean isClose() - { - return close; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/49/3039da0c69a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/49/3039da0c69a800171a8482560d609ceb deleted file mode 100644 index 5697cf1..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/49/3039da0c69a800171a8482560d609ceb +++ /dev/null @@ -1,81 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - } - } - - }); - processSocket.setDaemon(true); - processSocket.setName("processSocket"); - processSocket.start(); - -} - -public static synchronized SocketControls getInstance() { - - if (instance == null) { - - instance = new SocketControls(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/49/607bc94804ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/49/607bc94804ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 18dafab..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/49/607bc94804ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,71 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private LinkedBlockingQueue> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - while((k = (SocketReference) q.remove()) != null) { - long id=k.getid(); - - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - private void startThread() { - - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4a/80cbba742aad001713e0de43c08806fd b/.metadata/.plugins/org.eclipse.core.resources/.history/4a/80cbba742aad001713e0de43c08806fd deleted file mode 100644 index 998e39b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4a/80cbba742aad001713e0de43c08806fd +++ /dev/null @@ -1,189 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.SocketException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.SequenceNumber; - -/** - * Client side of a client-server UDT connection. - * Once established, the session provides a valid {@link UDTSocket}. - */ -public class ClientSession extends UDTSession { - - private static final Logger logger=Logger.getLogger(ClientSession.class.getName()); - - private UDPEndPoint endPoint; - - public ClientSession(UDPEndPoint endPoint, Destination dest)throws SocketException{ - super("ClientSession localPort="+endPoint.getLocalPort(),dest); - this.endPoint=endPoint; - logger.info("Created "+toString()); - } - - /** - * send connection handshake until a reply from server is received - * TODO check for timeout - * @throws InterruptedException - * @throws IOException - */ - - public void connect() throws InterruptedException,IOException{ - int n=0; - - while(getState()!=ready){ - - sendHandShake(); - if(getState()==invalid)throw new IOException("Can't connect!"); - n++; - if(getState()!=ready)Thread.sleep(500); - } - - cc.init(); - logger.info("Connected, "+n+" handshake packets sent"); - } - - @Override - public void received(UDTPacket packet, Destination peer) { - - lastPacket=packet; - - if (packet instanceof ConnectionHandshake) { - ConnectionHandshake hs=(ConnectionHandshake)packet; - - logger.info("Received connection handshake from "+peer+"\n"+hs); - - if (getState()!=ready) { - if(hs.getConnectionType()==1){ - try{ - //TODO validate parameters sent by peer - long peerSocketID=hs.getSocketID(); - destination.setSocketID(peerSocketID); - sendConfirmation(hs); - }catch(Exception ex){ - logger.log(Level.WARNING,"Error creating socket",ex); - setState(invalid); - } - return; - } - else{ - try{ - //TODO validate parameters sent by peer - long peerSocketID=hs.getSocketID(); - destination.setSocketID(peerSocketID); - setState(ready); - TimeUnit.MILLISECONDS.sleep(50); - logger.info("ʼû:"+hs.getInitialSeqNo()); - this.setInitialSequenceNumber(hs.getInitialSeqNo());//cd - socket=new UDTSocket(endPoint,this); - - - }catch(Exception ex){ - logger.log(Level.WARNING,"Error creating socket",ex); - setState(invalid); - } - return; - } - } - } - - if(getState() == ready) { - - if(packet instanceof Shutdown){ - setState(shutdown); - active=false; - logger.info("Connection shutdown initiated by the other side."); - return; - } - active = true; - try{ - if(packet.forSender()){ - socket.getSender().receive(lastPacket); - }else{ - socket.getReceiver().receive(lastPacket); - } - }catch(Exception ex){ - //session is invalid - logger.log(Level.SEVERE,"Error in "+toString(),ex); - setState(invalid); - } - return; - } - } - - - //handshake for connect - protected void sendHandShake()throws IOException{ - ConnectionHandshake handshake = new ConnectionHandshake(); - handshake.setConnectionType(ConnectionHandshake.CONNECTION_TYPE_REGULAR); - handshake.setSocketType(ConnectionHandshake.SOCKET_TYPE_DGRAM); - long initialSequenceNo=SequenceNumber.random(); - setInitialSequenceNumber(initialSequenceNo); - handshake.setInitialSeqNo(initialSequenceNo); - handshake.setPacketSize(getDatagramSize()); - handshake.setSocketID(mySocketID); - handshake.setMaxFlowWndSize(flowWindowSize); - handshake.setSession(this); - logger.info("Sending "+handshake); - endPoint.doSend(handshake); - } - - //2nd handshake for connect - protected void sendConfirmation(ConnectionHandshake hs)throws IOException{ - ConnectionHandshake handshake = new ConnectionHandshake(); - handshake.setConnectionType(-1); - handshake.setSocketType(ConnectionHandshake.SOCKET_TYPE_DGRAM); - handshake.setInitialSeqNo(hs.getInitialSeqNo()); - handshake.setPacketSize(hs.getPacketSize()); - handshake.setSocketID(mySocketID); - handshake.setMaxFlowWndSize(flowWindowSize); - handshake.setSession(this); - logger.info("Sending confirmation "+handshake); - endPoint.doSend(handshake); - } - - - public UDTPacket getLastPkt(){ - return lastPacket; - } - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4a/d05deaacb8ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/4a/d05deaacb8ac001716b9ca6d5abb90bc deleted file mode 100644 index 8cfe07a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4a/d05deaacb8ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,601 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.ControlPacket; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.packets.Shutdown; -import udt.packets.ControlPacket.ControlPacketType; -import udt.receiver.AckHistoryEntry; -import udt.receiver.AckHistoryWindow; -import udt.receiver.PacketHistoryWindow; -import udt.receiver.PacketPairWindow; -import udt.receiver.ReceiverLossList; -import udt.receiver.ReceiverLossListEntry; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - -/** - * receiver part of a UDT entity - * @see UDTSender - */ -public class UDTReceiver { - - private static final Logger logger=Logger.getLogger(UDTReceiver.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //record seqNo of detected lostdata and latest feedback time - private final ReceiverLossList receiverLossList; - - //record each sent ACK and the sent time - private final AckHistoryWindow ackHistoryWindow; - - //Packet history window that stores the time interval between the current and the last seq. - private final PacketHistoryWindow packetHistoryWindow; - - //for storing the arrival time of the last received data packet - private volatile long lastDataPacketArrivalTime=0; - - //largest received data packet sequence number(LRSN) - private volatile long largestReceivedSeqNumber=0; - - //ACK event related - - //last Ack number - private long lastAckNumber=0; - - //largest Ack number ever acknowledged by ACK2 - private volatile long largestAcknowledgedAckNumber=-1; - - //EXP event related - - //a variable to record number of continuous EXP time-out events - private volatile long expCount=0; - - /*records the time interval between each probing pair - compute the median packet pair interval of the last - 16 packet pair intervals (PI) and the estimate link capacity.(packet/s)*/ - private final PacketPairWindow packetPairWindow; - - //estimated link capacity - long estimateLinkCapacity; - // the packet arrival rate - long packetArrivalSpeed; - - //round trip time, calculated from ACK/ACK2 pairs - long roundTripTime=0; - //round trip time variance - long roundTripTimeVar=roundTripTime/2; - - //to check the ACK, NAK, or EXP timer - private long nextACK; - //microseconds to next ACK event - private long ackTimerInterval=Util.getSYNTime(); - - private long nextNAK; - //microseconds to next NAK event - private long nakTimerInterval=Util.getSYNTime(); - - private long nextEXP; - //microseconds to next EXP event - private long expTimerInterval=100*Util.getSYNTime(); - - //instant when the session was created (for expiry checking) - private final long sessionUpSince; - //milliseconds to timeout a new session that stays idle - private final long IDLE_TIMEOUT = 3*60*1000; - - //buffer size for storing data - private final long bufferSize; - - //stores received packets to be sent - private final BlockingQueuehandoffQueue; - - private Thread receiverThread; - - private volatile boolean stopped=false; - - //(optional) ack interval (see CongestionControl interface) - private volatile long ackInterval=-1; - - /** - * if set to true connections will not expire, but will only be - * closed by a Shutdown message - */ - public static boolean connectionExpiryDisabled=false; - - private final boolean storeStatistics; - - - - /** - * create a receiver with a valid {@link UDTSession} - * @param session - */ - public UDTReceiver(UDTSession session,UDPEndPoint endpoint){ - this.endpoint = endpoint; - this.session=session; - this.sessionUpSince=System.currentTimeMillis(); - this.statistics=session.getStatistics(); - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - ackHistoryWindow = new AckHistoryWindow(16); - packetHistoryWindow = new PacketHistoryWindow(16); - receiverLossList = new ReceiverLossList(); - packetPairWindow = new PacketPairWindow(16); - largestReceivedSeqNumber=session.getInitialSequenceNumber()-1; - bufferSize=session.getReceiveBufferSize(); - handoffQueue=new ArrayBlockingQueue(4*session.getFlowWindowSize()); - storeStatistics=Boolean.getBoolean("udt.receiver.storeStatistics"); - initMetrics(); - start(); - } - - private MeanValue dgReceiveInterval; - private MeanValue dataPacketInterval; - private MeanValue processTime; - private MeanValue dataProcessTime; - private void initMetrics(){ - if(!storeStatistics)return; - dgReceiveInterval=new MeanValue("UDT receive interval"); - statistics.addMetric(dgReceiveInterval); - dataPacketInterval=new MeanValue("Data packet interval"); - statistics.addMetric(dataPacketInterval); - processTime=new MeanValue("UDT packet process time"); - statistics.addMetric(processTime); - dataProcessTime=new MeanValue("Data packet process time"); - statistics.addMetric(dataProcessTime); - } - - - //starts the sender algorithm - private void start(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - nextACK=Util.getCurrentTime()+ackTimerInterval; - nextNAK=(long)(Util.getCurrentTime()+1.5*nakTimerInterval); - nextEXP=Util.getCurrentTime()+2*expTimerInterval; - ackInterval=session.getCongestionControl().getAckInterval(); - while(!stopped){ - receiverAlgorithm(); - } - } - catch(Exception ex){ - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING RECEIVER for "+session); - } - }; - receiverThread=UDTThreadFactory.get().newThread(r); - receiverThread.start(); - } - - /* - * packets are written by the endpoint - */ - protected void receive(UDTPacket p)throws IOException{ - if(storeStatistics)dgReceiveInterval.end(); - handoffQueue.offer(p); - if(storeStatistics)dgReceiveInterval.begin(); - } - - /** - * receiver algorithm - * see specification P11. - */ - public void receiverAlgorithm()throws InterruptedException,IOException{ - //check ACK timer - long currentTime=Util.getCurrentTime(); - if(nextACKseqNumbers=receiverLossList.getFilteredSequenceNumbers(roundTripTime,true); - sendNAK(seqNumbers); - } - - /** - * process EXP event (see spec. p 13) - */ - protected void processEXPEvent()throws IOException{ - if(session.getSocket()==null)return; - UDTSender sender=session.getSocket().getSender(); - //put all the unacknowledged packets in the senders loss list - sender.putUnacknowledgedPacketsIntoLossList(); - if(expCount>16 && System.currentTimeMillis()-sessionUpSince > IDLE_TIMEOUT){ - if(!connectionExpiryDisabled &&!stopped){ - sendShutdown(); - stop(); - logger.info("Session "+session+" expired."); - return; - } - } - if(!sender.haveLostPackets()){ - sendKeepAlive(); - } - expCount++; - } - - protected void processUDTPacket(UDTPacket p)throws IOException{ - //(3).Check the packet type and process it according to this. - - if(!p.isControlPacket()){ - DataPacket dp=(DataPacket)p; - if(storeStatistics){ - dataPacketInterval.end(); - dataProcessTime.begin(); - } - onDataPacketReceived(dp); - if(storeStatistics){ - dataProcessTime.end(); - dataPacketInterval.begin(); - } - logger.info("DataPacket udt:"+p.getPacketSequenceNumber()); - } - - else if (p.getControlPacketType()==ControlPacketType.ACK2.ordinal()){ - Acknowledgment2 ack2=(Acknowledgment2)p; - onAck2PacketReceived(ack2); - } - - else if (p instanceof Shutdown){ - onShutdown(); - } - - } - - //every nth packet will be discarded... for testing only of course - public static int dropRate=0; - - //number of received data packets - private int n=0; - - protected void onDataPacketReceived(DataPacket dp)throws IOException{ - long currentSequenceNumber = dp.getPacketSequenceNumber(); - - //for TESTING : check whether to drop this packet -// n++; -// //if(dropRate>0 && n % dropRate == 0){ -// if(n % 1111 == 0){ -// logger.info("**** TESTING:::: DROPPING PACKET "+currentSequenceNumber+" FOR TESTING"); -// return; -// } -// //} - boolean OK=session.getSocket().getInputStream().haveNewData(currentSequenceNumber,dp.getData()); - if(!OK){ - //need to drop packet... - return; - } - - long currentDataPacketArrivalTime = Util.getCurrentTime(); - - /*(4).if the seqNo of the current data packet is 16n+1,record the - time interval between this packet and the last data packet - in the packet pair window*/ - if((currentSequenceNumber%16)==1 && lastDataPacketArrivalTime>0){ - long interval=currentDataPacketArrivalTime -lastDataPacketArrivalTime; - packetPairWindow.add(interval); - } - - //(5).record the packet arrival time in the PKT History Window. - packetHistoryWindow.add(currentDataPacketArrivalTime); - - - //store current time - lastDataPacketArrivalTime=currentDataPacketArrivalTime; - - - //(6).number of detected lossed packet - /*(6.a).if the number of the current data packet is greater than LSRN+1, - put all the sequence numbers between (but excluding) these two values - into the receiver's loss list and send them to the sender in an NAK packet*/ - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber+1)>0){ - sendNAK(currentSequenceNumber); - } - else if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)<0){ - /*(6.b).if the sequence number is less than LRSN,remove it from - * the receiver's loss list - */ - receiverLossList.remove(currentSequenceNumber); - } - - statistics.incNumberOfReceivedDataPackets(); - - //(7).Update the LRSN - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)>0){ - largestReceivedSeqNumber=currentSequenceNumber; - } - - //(8) need to send an ACK? Some cc algorithms use this - if(ackInterval>0){ - if(n % ackInterval == 0)processACKEvent(false); - } - } - - /** - * write a NAK triggered by a received sequence number that is larger than - * the largestReceivedSeqNumber + 1 - * @param currentSequenceNumber - the currently received sequence number - * @throws IOException - */ - protected void sendNAK(long currentSequenceNumber)throws IOException{ - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(largestReceivedSeqNumber+1, currentSequenceNumber); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - //put all the sequence numbers between (but excluding) these two values into the - //receiver loss list - for(long i=largestReceivedSeqNumber+1;isequenceNumbers)throws IOException{ - if(sequenceNumbers.size()==0)return; - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(sequenceNumbers); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(nAckPacket); - statistics.incNumberOfNAKSent(); - } - - protected long sendLightAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt=buildLightAcknowledgement(ackNumber); - endpoint.doSend(acknowledgmentPkt); - statistics.incNumberOfACKSent(); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - protected long sendAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); - //set the estimate link capacity - estimateLinkCapacity=packetPairWindow.getEstimatedLinkCapacity(); - acknowledgmentPkt.setEstimatedLinkCapacity(estimateLinkCapacity); - //set the packet arrival rate - packetArrivalSpeed=packetHistoryWindow.getPacketArrivalSpeed(); - acknowledgmentPkt.setPacketReceiveRate(packetArrivalSpeed); - - endpoint.doSend(acknowledgmentPkt); - - statistics.incNumberOfACKSent(); - statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - //builds a "light" Acknowledgement - private Acknowledgement buildLightAcknowledgement(long ackNumber){ - Acknowledgement acknowledgmentPkt = new Acknowledgement(); - //the packet sequence number to which all the packets have been received - acknowledgmentPkt.setAckNumber(ackNumber); - //assign this ack a unique increasing ACK sequence number - acknowledgmentPkt.setAckSequenceNumber(++ackSequenceNumber); - acknowledgmentPkt.setRoundTripTime(roundTripTime); - acknowledgmentPkt.setRoundTripTimeVar(roundTripTimeVar); - //set the buffer size - acknowledgmentPkt.setBufferSize(bufferSize); - - acknowledgmentPkt.setDestinationID(session.getDestination().getSocketID()); - acknowledgmentPkt.setSession(session); - - return acknowledgmentPkt; - } - - /** - * spec p. 13:
- 1) Locate the related ACK in the ACK History Window according to the - ACK sequence number in this ACK2.
- 2) Update the largest ACK number ever been acknowledged.
- 3) Calculate new rtt according to the ACK2 arrival time and the ACK - departure time, and update the RTT value as: RTT = (RTT * 7 + - rtt) / 8.
- 4) Update RTTVar by: RTTVar = (RTTVar * 3 + abs(RTT - rtt)) / 4.
- 5) Update both ACK and NAK period to 4 * RTT + RTTVar + SYN.
- */ - protected void onAck2PacketReceived(Acknowledgment2 ack2){ - AckHistoryEntry entry=ackHistoryWindow.getEntry(ack2.getAckSequenceNumber()); - if(entry!=null){ - long ackNumber=entry.getAckNumber(); - largestAcknowledgedAckNumber=Math.max(ackNumber, largestAcknowledgedAckNumber); - - long rtt=entry.getAge(); - if(roundTripTime>0)roundTripTime = (roundTripTime*7 + rtt)/8; - else roundTripTime = rtt; - roundTripTimeVar = (roundTripTimeVar* 3 + Math.abs(roundTripTimeVar- rtt)) / 4; - ackTimerInterval=4*roundTripTime+roundTripTimeVar+Util.getSYNTime(); - nakTimerInterval=ackTimerInterval; - statistics.setRTT(roundTripTime, roundTripTimeVar); - } - } - - protected void sendKeepAlive()throws IOException{ - KeepAlive ka=new KeepAlive(); - ka.setDestinationID(session.getDestination().getSocketID()); - ka.setSession(session); - endpoint.doSend(ka); - } - - protected void sendShutdown()throws IOException{ - Shutdown s=new Shutdown(); - s.setDestinationID(session.getDestination().getSocketID()); - s.setSession(session); - endpoint.doSend(s); - } - - private volatile long ackSequenceNumber=0; - - protected void resetEXPTimer(){ - nextEXP=Util.getCurrentTime()+expTimerInterval; - expCount=0; - } - - protected void resetEXPCount(){ - expCount=0; - } - - public void setAckInterval(long ackInterval){ - this.ackInterval=ackInterval; - } - - protected void onShutdown()throws IOException{ - stop(); - } - - public void stop()throws IOException{ - stopped=true; - session.getSocket().close(); - //stop our sender as well - session.getSocket().getSender().stop(); - } - - @Override - public String toString(){ - StringBuilder sb=new StringBuilder(); - sb.append("UDTReceiver ").append(session).append("\n"); - sb.append("LossList: "+receiverLossList); - return sb.toString(); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4a/d0c629a9cdac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/4a/d0c629a9cdac001716b9ca6d5abb90bc deleted file mode 100644 index 74d5c2d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4a/d0c629a9cdac001716b9ca6d5abb90bc +++ /dev/null @@ -1,205 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isReadMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - buffer[insert]=data; - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else return null; - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isReadMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4b/a035f5deb4ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/4b/a035f5deb4ad0017181ed9113883eda9 deleted file mode 100644 index 1bcb149..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4b/a035f5deb4ad0017181ed9113883eda9 +++ /dev/null @@ -1,515 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - // - } - - } - - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4b/a0ad7bad60a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/4b/a0ad7bad60a800171a8482560d609ceb deleted file mode 100644 index d270f29..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4b/a0ad7bad60a800171a8482560d609ceb +++ /dev/null @@ -1,268 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.io.InputStream; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; -import udt.util.ReceiveBuffer; - -/** - * The UDTInputStream receives data blocks from the {@link UDTSocket} - * as they become available, and places them into an ordered, - * bounded queue (the flow window) for reading by the application - * - * - */ -public class UDTInputStream extends InputStream { - - //the socket owning this inputstream - private final UDTSocket socket; - - private final ReceiveBuffer receiveBuffer; - - //set to 'false' by the receiver when it gets a shutdown signal from the peer - //see the noMoreData() method - private final AtomicBoolean expectMoreData=new AtomicBoolean(true); - - private volatile boolean closed=false; - - private volatile boolean blocking=true; - - private volatile boolean hasData=false;//cd - - - - /** - * create a new {@link UDTInputStream} connected to the given socket - * @param socket - the {@link UDTSocket} - * @throws IOException - */ - public UDTInputStream(UDTSocket socket)throws IOException{ - this.socket=socket; - int capacity=socket!=null? 2 * socket.getSession().getFlowWindowSize() : 128 ; - long initialSequenceNum=socket!=null?socket.getSession().getInitialSequenceNumber():1; - receiveBuffer=new ReceiveBuffer(capacity,initialSequenceNum); - } - - private final byte[]single=new byte[1]; - - @Override - public int read()throws IOException{ - int b=0; - while(b==0) - b=read(single); - - if(b>0){ - return single[0]; - } - else { - return b; - } - } - - private AppData currentChunk=null; - //offset into currentChunk - int offset=0; - long id=-1; - @Override - public int read(byte[]target)throws IOException{ - try{ - int read=0; - updateCurrentChunk(false); - while(currentChunk!=null){ - byte[]data=currentChunk.data; - int length=Math.min(target.length-read,data.length-offset); - System.arraycopy(data, offset, target, read, length); - read+=length; - offset+=length; - //check if chunk has been fully read - if(offset>=data.length){ - currentChunk=null; - offset=0; - } - - //if no more space left in target, exit now - if(read==target.length){ - return read; - } - - updateCurrentChunk(blocking && read==0); - } - - if(read>0)return read; - if(closed)return -1; - if(expectMoreData.get() || !receiveBuffer.isEmpty())return 0; - //no more data - return -1; - - }catch(Exception ex){ - IOException e= new IOException(); - e.initCause(ex); - throw e; - } - } - - /** - * Reads the next valid chunk of application data from the queue
- * - * In blocking mode,this method will block until data is available or the socket is closed, - * otherwise it will wait for at most 10 milliseconds. - * - * @throws InterruptedException - */ - private void updateCurrentChunk(boolean block)throws IOException{ - if(currentChunk!=null)return; - - while(true){ - try{ - if(block){ - currentChunk=receiveBuffer.poll(1, TimeUnit.MILLISECONDS); - while (!closed && currentChunk==null){ - currentChunk=receiveBuffer.poll(1000, TimeUnit.MILLISECONDS); - } - } - else currentChunk=receiveBuffer.poll(10, TimeUnit.MILLISECONDS); - - }catch(InterruptedException ie){ - IOException ex=new IOException(); - ex.initCause(ie); - throw ex; - } - return; - } - } - - /** - * new application data - * @param data - * - */ - protected boolean haveNewData(long sequenceNumber,byte[]data)throws IOException{ - return receiveBuffer.offer(new AppData(sequenceNumber,data)); - } - - @Override - public void close()throws IOException{ - if(closed)return; - closed=true; - noMoreData(); - } - - public UDTSocket getSocket(){ - return socket; - } - - /** - * sets the blocking mode - * @param block - */ - public void setBlocking(boolean block){ - this.blocking=block; - } - - public int getReceiveBufferSize(){ - return receiveBuffer.getSize(); - } - - /** - * notify the input stream that there is no more data - * @throws IOException - */ - protected void noMoreData()throws IOException{ - expectMoreData.set(false); - } - - /** - * жûݽ - * @return - */ - public boolean isHasData() - { - return hasData; - } - - /** - * used for storing application data and the associated - * sequence number in the queue in ascending order - */ - public static class AppData implements Comparable{ - final long sequenceNumber; - final byte[] data; - public AppData(long sequenceNumber, byte[]data){ - this.sequenceNumber=sequenceNumber; - this.data=data; - } - - @Override - public int compareTo(AppData o) { - return (int)(sequenceNumber-o.sequenceNumber); - } - - @Override - public String toString(){ - return sequenceNumber+"["+data.length+"]"; - } - - public long getSequenceNumber(){ - return sequenceNumber; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result - + (int) (sequenceNumber ^ (sequenceNumber >>> 32)); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - AppData other = (AppData) obj; - if (sequenceNumber != other.sequenceNumber) - return false; - return true; - } - - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4c/00556ecf13ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/4c/00556ecf13ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 1590f39..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4c/00556ecf13ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,27 +0,0 @@ -package Test; - -import java.util.concurrent.TimeUnit; - -import judp.judpClient; - -public class TestClient { - - public static void main(String[] args) { - while(true) - { - judpClient client=new judpClient(); - client.connect("192.168.30.128", 5555); - byte[]data=("hello word "+System.currentTimeMillis()).getBytes(); - client.sendData(data); - client.close(); - try { - System.out.println("ȴ"); - TimeUnit.SECONDS.sleep(5); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4c/f007c03509ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/4c/f007c03509ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 188ea86..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4c/f007c03509ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,99 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.util.HashMap; -import java.util.WeakHashMap; - -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - @SuppressWarnings("rawtypes") - private final ReferenceQueue q = new ReferenceQueue(); - private volatile long num=0; - /** - * ʹ - */ - private final WeakHashMap hashMap=new WeakHashMap (); - private final HashMap,Long> map=new HashMap,Long> (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @SuppressWarnings("unchecked") - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("socket"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - if(num%200==0) - { - System.gc(); - } - num++; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4c/f03eaf6868a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/4c/f03eaf6868a800171a8482560d609ceb deleted file mode 100644 index e87b7bf..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4c/f03eaf6868a800171a8482560d609ceb +++ /dev/null @@ -1,70 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - entry.getValue() - } - } - } - - }); - processSocket.setDaemon(true); - processSocket.setName("processSocket"); - processSocket.start(); - -} - -public static synchronized SocketControls getInstance() { - - if (instance == null) { - - instance = new SocketControls(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4c/f0982c98e4ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/4c/f0982c98e4ac001716b9ca6d5abb90bc deleted file mode 100644 index b074331..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4c/f0982c98e4ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,223 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData(byte[] data) - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - - } - - } - - }); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4d/400ac46406ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/4d/400ac46406ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 7d3d629..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4d/400ac46406ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,70 +0,0 @@ -/** - * - */ -package Test; - -import java.util.concurrent.TimeUnit; - -import judp.judpServer; -import judp.judpSocket; - -/** - * @author jinyu - * - */ -public class TestServer { - public static void main(String[] args) { - - judpServer server=new judpServer("127.0.0.1",5555); - server.start(); - while(true) - { - judpSocket socket=server.accept(); - // - - Thread rec=new Thread(new Runnable() { - @Override - public void run() { - try - { - byte[] data=new byte[1024]; - int r=0; - while(r!=-1) - { - r=socket.readData(data); - if(r==0) - { - - try { - TimeUnit.MILLISECONDS.sleep(100); - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - if(r==-1) - { - System.out.println("ȡ-1˳"); - break; - } - byte[]tmp=new byte[r]; - System.arraycopy(data, 0, tmp, 0, r); - System.out.println(new String(tmp)); - - } - //socket.close(); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - }} - ); - rec.setDaemon(true); - rec.start(); - - } - - - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4d/b0a68230f7ab001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/4d/b0a68230f7ab001710ff8a7c6bda0fb8 deleted file mode 100644 index 7e0f55b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4d/b0a68230f7ab001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,130 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); -private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - // - if(!list.isEmpty()) - { - for(int i=0;i20) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - - } - String serverinfp=new String(infobytes,0,infobytes.length,PackagetCharSet.CharSet); - if(!serverinfp.equals("initServer:"+f.getName())) - { - client.close(); - return; - } - //client.decreNum(); - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - //ByteBuffer buffer=ByteBuffer.wrap(buf); - - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count+name.length+4]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - } - - } - client.close(); - dis.close(); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4e/903b8e7ad6ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/4e/903b8e7ad6ac001716b9ca6d5abb90bc deleted file mode 100644 index 3c5fe39..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4e/903b8e7ad6ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,279 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡҲҪⲿٶȡ - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(islagerRead) - { - // cd Ϊݶȡ׼ - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - } - else - { - //ԭ룬Сݽȫ - buffer[insert]=data; - numValidChunks.incrementAndGet(); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - - if(this.islagerRead) - { - //cd - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(this.islagerRead) - { - // cd - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - - if(readPosition==size) - {readPosition=0; - if(this.islagerRead) - { - //cd - clearDeHash(this.size-leftNum); - } - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4e/b0d52a15e0ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/4e/b0d52a15e0ac001716b9ca6d5abb90bc deleted file mode 100644 index 72ae1cb..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4e/b0d52a15e0ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,188 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - long speed=0; - try - { - speed=sumBytes/((System.currentTimeMillis()-lastTime)/1000); - } - catch(Exception ex) - { - - } - lastTime=System.currentTimeMillis(); - log.info("ļٶM/S"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4f/200a00ac60a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/4f/200a00ac60a800171a8482560d609ceb deleted file mode 100644 index 0bad692..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4f/200a00ac60a800171a8482560d609ceb +++ /dev/null @@ -1,262 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.io.InputStream; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; -import udt.util.ReceiveBuffer; - -/** - * The UDTInputStream receives data blocks from the {@link UDTSocket} - * as they become available, and places them into an ordered, - * bounded queue (the flow window) for reading by the application - * - * - */ -public class UDTInputStream extends InputStream { - - //the socket owning this inputstream - private final UDTSocket socket; - - private final ReceiveBuffer receiveBuffer; - - //set to 'false' by the receiver when it gets a shutdown signal from the peer - //see the noMoreData() method - private final AtomicBoolean expectMoreData=new AtomicBoolean(true); - - private volatile boolean closed=false; - - private volatile boolean blocking=true; - - private volatile boolean hasData=false;//cd - - - - /** - * create a new {@link UDTInputStream} connected to the given socket - * @param socket - the {@link UDTSocket} - * @throws IOException - */ - public UDTInputStream(UDTSocket socket)throws IOException{ - this.socket=socket; - int capacity=socket!=null? 2 * socket.getSession().getFlowWindowSize() : 128 ; - long initialSequenceNum=socket!=null?socket.getSession().getInitialSequenceNumber():1; - receiveBuffer=new ReceiveBuffer(capacity,initialSequenceNum); - } - - private final byte[]single=new byte[1]; - - @Override - public int read()throws IOException{ - int b=0; - while(b==0) - b=read(single); - - if(b>0){ - return single[0]; - } - else { - return b; - } - } - - private AppData currentChunk=null; - //offset into currentChunk - int offset=0; - long id=-1; - @Override - public int read(byte[]target)throws IOException{ - try{ - int read=0; - updateCurrentChunk(false); - while(currentChunk!=null){ - byte[]data=currentChunk.data; - int length=Math.min(target.length-read,data.length-offset); - System.arraycopy(data, offset, target, read, length); - read+=length; - offset+=length; - //check if chunk has been fully read - if(offset>=data.length){ - currentChunk=null; - offset=0; - } - - //if no more space left in target, exit now - if(read==target.length){ - return read; - } - - updateCurrentChunk(blocking && read==0); - } - - if(read>0)return read; - if(closed)return -1; - if(expectMoreData.get() || !receiveBuffer.isEmpty())return 0; - //no more data - return -1; - - }catch(Exception ex){ - IOException e= new IOException(); - e.initCause(ex); - throw e; - } - } - - /** - * Reads the next valid chunk of application data from the queue
- * - * In blocking mode,this method will block until data is available or the socket is closed, - * otherwise it will wait for at most 10 milliseconds. - * - * @throws InterruptedException - */ - private void updateCurrentChunk(boolean block)throws IOException{ - if(currentChunk!=null)return; - - while(true){ - try{ - if(block){ - currentChunk=receiveBuffer.poll(1, TimeUnit.MILLISECONDS); - while (!closed && currentChunk==null){ - currentChunk=receiveBuffer.poll(1000, TimeUnit.MILLISECONDS); - } - } - else currentChunk=receiveBuffer.poll(10, TimeUnit.MILLISECONDS); - - }catch(InterruptedException ie){ - IOException ex=new IOException(); - ex.initCause(ie); - throw ex; - } - return; - } - } - - /** - * new application data - * @param data - * - */ - protected boolean haveNewData(long sequenceNumber,byte[]data)throws IOException{ - return receiveBuffer.offer(new AppData(sequenceNumber,data)); - } - - @Override - public void close()throws IOException{ - if(closed)return; - closed=true; - noMoreData(); - } - - public UDTSocket getSocket(){ - return socket; - } - - /** - * sets the blocking mode - * @param block - */ - public void setBlocking(boolean block){ - this.blocking=block; - } - - public int getReceiveBufferSize(){ - return receiveBuffer.getSize(); - } - - /** - * notify the input stream that there is no more data - * @throws IOException - */ - protected void noMoreData()throws IOException{ - expectMoreData.set(false); - } - - /** - * used for storing application data and the associated - * sequence number in the queue in ascending order - */ - public static class AppData implements Comparable{ - final long sequenceNumber; - final byte[] data; - public AppData(long sequenceNumber, byte[]data){ - this.sequenceNumber=sequenceNumber; - this.data=data; - } - - @Override - public int compareTo(AppData o) { - return (int)(sequenceNumber-o.sequenceNumber); - } - - @Override - public String toString(){ - return sequenceNumber+"["+data.length+"]"; - } - - public long getSequenceNumber(){ - return sequenceNumber; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result - + (int) (sequenceNumber ^ (sequenceNumber >>> 32)); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - AppData other = (AppData) obj; - if (sequenceNumber != other.sequenceNumber) - return false; - return true; - } - - public boolean isHasData() - { - return hasData - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4f/305dcf6953ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/4f/305dcf6953ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 9b12080..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4f/305dcf6953ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,337 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public void setRecBufferSize(int size) -{ - bufSize=size; -} -public boolean getCloseState() -{ - //ײѾر - return isClose|socket.isClose(); -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(getCloseState()) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - while(true) - { - if(getCloseState()) - { - return null; - } - r=readData(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } - - return result; -} - - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(getCloseState()) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(getCloseState()) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;i hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private SocketControls (){ - startThread(); - startGC(); - } - - public static synchronized SocketControls getInstance() { - - if (instance == null) { - - instance = new SocketControls(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/50/002264c122ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/50/002264c122ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 04e0139..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/50/002264c122ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,218 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public void pauseOutput() - { - try { - client.getOutputStream().pauseOutput(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - /** - * ȡ - * ֻsplitͶӦ - * @return - */ - public byte[] read() - { - byte[] result=null; - if(client!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(client.isClose()) - { - return null; - } - r=client.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; - } - public int read(byte[]data) - { - try { - return client.read(data); - } catch (IOException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - return -1; - } - - /** - * ر - */ - public void close() - { - if(client!=null) - { - if(sumLen==0) - { - //ûз - //ر - try { - if(!client.isClose()) - client.shutdown(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - else - { - //ʼ - //SocketManager.getInstance().add(client); - if(!client.isClose()) - client.close(); - } - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/50/10970a0ca1ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/50/10970a0ca1ad0017181ed9113883eda9 deleted file mode 100644 index 8aad23a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/50/10970a0ca1ad0017181ed9113883eda9 +++ /dev/null @@ -1,50 +0,0 @@ -/** - * - */ -package net.File; - -import java.util.logging.Logger; - -import net.File.FileMonitor; -import net.File.FilesWatch; - - - - -/** - * @author jinyu - * - */ -public class TestSendFiles { - private static Logger log=Logger.getLogger(TestSendFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //SendFiles send=new SendFiles("192.168.9.152", 5555); - //192.168.30.128 - ReadXml rd=new ReadXml(); - String xml= rd.readXml("config.xml"); - String[] config=null; - if(xml!=null) - { - config=xml.split(","); - } - SendFiles send=new SendFiles("192.168.30.128", 5555); - FilesWatch watch=new FilesWatch(); - String dir="F:/monitor"; - watch.setWatch(dir); - watch.start(); - while(true) - { - FileMonitor ff= watch.take(); - log.info(ff.file); - if(ff.file.endsWith(".tmp")) - { - continue; - } - send.sendFile(dir+"/"+ff.file); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/50/300b00e08ead0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/50/300b00e08ead0017181ed9113883eda9 deleted file mode 100644 index a927104..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/50/300b00e08ead0017181ed9113883eda9 +++ /dev/null @@ -1,89 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.logging.Logger; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -private static final Logger logger=Logger.getLogger(judpGroupSocket.class.getName()); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * Ƴsocket - * @return - */ -public UDTSocket getSocket() -{ - - int index=-1; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(index==-1) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳ - index=i; - i=-1;//± - } - } - else - { - // - if(i==index) - { - continue; - } - else - { - list.get(i).close(); - long id=list.get(i).getSession().getSocketID(); - list.get(i).getEndpoint().removeSession(id); - list.get(i).getReceiver().stop(); - list.get(i).getSender().stop(); - logger.info("Ƴsocket:"+id); - } - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - if(index!=-1) - { - return list.get(index); - } - return null; - -} -/** - * socket - */ -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/50/6044e0b534ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/50/6044e0b534ac001710ff8a7c6bda0fb8 deleted file mode 100644 index ead2099..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/50/6044e0b534ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,338 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public boolean getCloseState() -{ - //ײѾر - return isClose|socket.isClose(); -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(getCloseState()) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(getCloseState()) - { - return null; - } - r=readData(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(getCloseState()) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(getCloseState()) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;i0?1:0; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ cd - if(highestReadSequenceNumber+120) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else - { - break; - } - } - String serverinfp=new String(infobytes,0,infobytes.length,PackagetCharSet.CharSet); - if(!serverinfp.equals("initServer:"+f.getName())) - { - client.close(); - return; - } - //client.decreNum(); - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - //ByteBuffer buffer=ByteBuffer.wrap(buf); - - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count+name.length+4]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - } - - } - client.close(); - dis.close(); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/52/a0e88386d6ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/52/a0e88386d6ac001716b9ca6d5abb90bc deleted file mode 100644 index 1d7aad2..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/52/a0e88386d6ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,283 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡҲҪⲿٶȡ - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(islagerRead) - { - // cd Ϊݶȡ׼ - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - } - else - { - //ԭ룬Сݽȫ - buffer[insert]=data; - numValidChunks.incrementAndGet(); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - - if(this.islagerRead) - { - //cd - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(this.islagerRead) - { - // cd - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - - if(readPosition==size) - {readPosition=0; - if(this.islagerRead) - { - //cd - clearDeHash(this.size-leftNum); - } - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } - public void setlargeRead(boolean islarge) - { - this.islagerRead=islarge; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/53/60e8bdb026ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/53/60e8bdb026ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 412b002..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/53/60e8bdb026ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,234 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - private int len=0; - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData= PackagetSub.split(data); - for(int i=0;i=buffer.length) - { - //ɹ - if(sum==dataLen) - { - //ʼ - result=new byte[dataLen]; - ByteBuffer cur=ByteBuffer.wrap(result); - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - } - - } - client.close(); - dis.close(); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/54/f09c3717a1ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/54/f09c3717a1ad0017181ed9113883eda9 deleted file mode 100644 index dcf9df5..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/54/f09c3717a1ad0017181ed9113883eda9 +++ /dev/null @@ -1,50 +0,0 @@ -/** - * - */ -package net.File; - -import java.util.logging.Logger; - -import net.File.FileMonitor; -import net.File.FilesWatch; - - - - -/** - * @author jinyu - * - */ -public class TestSendFiles { - private static Logger log=Logger.getLogger(TestSendFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //SendFiles send=new SendFiles("192.168.9.152", 5555); - //192.168.30.128 - ReadXml rd=new ReadXml(); - String xml= rd.readXml("config.xml"); - String[] config=null; - if(xml!=null) - { - config=xml.split(","); - } - SendFiles send=new SendFiles(config[0], Integer.valueOf(config[1])); - FilesWatch watch=new FilesWatch(); - String dir="F:/monitor"; - watch.setWatch(dir); - watch.start(); - while(true) - { - FileMonitor ff= watch.take(); - log.info(ff.file); - if(ff.file.endsWith(".tmp")) - { - continue; - } - send.sendFile(dir+"/"+ff.file); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/55/2001542903ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/55/2001542903ac001710ff8a7c6bda0fb8 deleted file mode 100644 index f2b2a40..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/55/2001542903ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,21 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; - -/** - * @author jinyu - * @param - * - */ -public class SocketReference extends WeakReference { - - public SocketReference(T referent) { - super(referent); - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/55/e05f7dc334ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/55/e05f7dc334ac001710ff8a7c6bda0fb8 deleted file mode 100644 index ba5aaf4..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/55/e05f7dc334ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,339 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public boolean getCloseState() -{ - //ײѾر - return isClose|socket.isClose(); -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(getCloseState()) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(getCloseState()) - { - return null; - } - r=readData(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(getCloseState()) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(getCloseState()) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;i sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private boolean isRWMaster=true;//Ĭֵһ -private boolean islagerRead=false; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} - -/** - * - * @param port ˿ - */ -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - * @param localIP IP - * @param port ˿ - */ -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - csocket.getInputStream().setLargeRead(islagerRead); - csocket.getInputStream().resetBufMaster(isRWMaster); - SocketControls.getInstance().addSocket(csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} -/** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * islagerRead=true - * @param isRead - */ -public void resetBufMaster(boolean isRead) -{ - this.isRWMaster=isRead; - -} - -/** - * ôݶȡ - * Ĭ false - * @param islarge - */ -public void setLargeRead(boolean islarge) -{ - this.islagerRead=islarge; -} -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=SocketControls.getInstance().getSocket(); - } - judpSocket jsocket=new judpSocket(socket); - judpSocketManager.getInstance(socket.getEndpoint()).addSocket(jsocket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/56/40e91a0269a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/56/40e91a0269a800171a8482560d609ceb deleted file mode 100644 index fef5062..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/56/40e91a0269a800171a8482560d609ceb +++ /dev/null @@ -1,72 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - entry.getValue().getSocket(); - } - } - } - - }); - processSocket.setDaemon(true); - processSocket.setName("processSocket"); - processSocket.start(); - -} - -public static synchronized SocketControls getInstance() { - - if (instance == null) { - - instance = new SocketControls(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/56/509c645db5ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/56/509c645db5ad0017181ed9113883eda9 deleted file mode 100644 index 2449d51..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/56/509c645db5ad0017181ed9113883eda9 +++ /dev/null @@ -1,523 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;s0) - { - client.connectNum-- - if(lastAckSequenceNumber/10000!=ackNumber/10000) - { - // - //ackNumber رȫɾرСһɾ - if(lastAckSequenceNumberthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - // - } - } - } - } - - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/57/60df03ff04ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/57/60df03ff04ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 7461180..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/57/60df03ff04ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,33 +0,0 @@ -/** - * - */ -package judp; - - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; - -/** - * @author jinyu - * @param - * - */ -public class SocketReference extends WeakReference { - private long socketid=-1; - public SocketReference(T referent) { - super(referent); - - } - public SocketReference(T referent,long id) { - super(referent); - this.socketid=id; - } - public SocketReference(T referent, long socketID, ReferenceQueue q) { - super(referent,q); - this.socketid=socketID; - } - public long getid() - { - return socketid; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/57/70fe88816da800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/57/70fe88816da800171a8482560d609ceb deleted file mode 100644 index 9513601..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/57/70fe88816da800171a8482560d609ceb +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.IOException; -import java.util.logging.Logger; - - - - -/** - * @author jinyu - * - */ -public class TestRecFiles { - private static Logger log=Logger.getLogger(TestRecFile.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - RecviceFiles rec=new RecviceFiles(); - String dir="F://dbfile"; - rec.setDir(dir); - rec.start("127.0.0.1", 5555); - log.info("ļ"); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/57/c01e4b7e21ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/57/c01e4b7e21ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 0a6eb23..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/57/c01e4b7e21ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,288 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private static final Logger logger=Logger.getLogger(judpSocket.class.getName()); -private PackagetCombin pack=new PackagetCombin(); -public boolean getCloseState() -{ - return isClose; -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readData() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - - -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - flushTime=System.currentTimeMillis(); - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} -public String getRemoteHost() { -return socket.getSession().getDestination().getAddress().getHostName(); - -} -public int getRemotePort() { - return socket.getSession().getDestination().getPort(); -} -public long getID() { - - return socketID; -} - - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/57/c030fc7309ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/57/c030fc7309ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 0147e71..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/57/c030fc7309ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,101 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.util.HashMap; -import java.util.WeakHashMap; - -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - @SuppressWarnings("rawtypes") - private final ReferenceQueue q = new ReferenceQueue(); - private volatile long num=0; - /** - * ʹ - */ - private final WeakHashMap hashMap=new WeakHashMap (); - private final HashMap,Long> map=new HashMap,Long> (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @SuppressWarnings("unchecked") - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - map.remove(k); - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("socket"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - map.put(tmp, socket.getSocketID()); - if(num%200==0) - { - System.gc(); - } - num++; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/57/d0125e1f6da800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/57/d0125e1f6da800171a8482560d609ceb deleted file mode 100644 index 41b9514..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/57/d0125e1f6da800171a8482560d609ceb +++ /dev/null @@ -1,42 +0,0 @@ -/** - * ļTestRecFile.java - * - * 汾Ϣ - * ڣ2017827 - * Copyright Corporation 2017 - * Ȩ - * - */ -package Test; - -import java.io.IOException; - -import judp.judpRecviceFile; - -/** - * - * Ŀƣjudp - * ƣTestRecFile - * - * ˣjinyu - * ʱ䣺2017827 6:32:42 - * ޸ˣjinyu - * ޸ʱ䣺2017827 6:32:42 - * ޸ıע - * @version - * - */ -public class TestRecFile { - - public static void main(String[] args) { - judpRecviceFile rec=new judpRecviceFile("127.0.0.1", 5555, "E:\\Study\\java\\filesudt\\send\\12.rmvb", "E:\\Study\\java\\filesudt\\rec\\1.rmvb"); - rec.start(); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/58/50cfdaa722ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/58/50cfdaa722ac001710ff8a7c6bda0fb8 deleted file mode 100644 index dc2286d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/58/50cfdaa722ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,212 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public void pauseOutput() - { - try { - client.getOutputStream().pauseOutput(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - public byte[] read() - { - byte[] result=null; - if(client!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(client.isClose()) - { - return null; - } - r=client.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; - } - public int read(byte[]data) - { - try { - return client.read(data); - } catch (IOException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - return -1; - } - - /** - * ر - */ - public void close() - { - if(client!=null) - { - if(sumLen==0) - { - //ûз - //ر - try { - if(!client.isClose()) - client.shutdown(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - else - { - //ʼ - //SocketManager.getInstance().add(client); - if(!client.isClose()) - client.close(); - } - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/58/80a5207c6fa800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/58/80a5207c6fa800171a8482560d609ceb deleted file mode 100644 index e4dde0b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/58/80a5207c6fa800171a8482560d609ceb +++ /dev/null @@ -1,269 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.io.InputStream; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; -import udt.util.ReceiveBuffer; - -/** - * The UDTInputStream receives data blocks from the {@link UDTSocket} - * as they become available, and places them into an ordered, - * bounded queue (the flow window) for reading by the application - * - * - */ -public class UDTInputStream extends InputStream { - - //the socket owning this inputstream - private final UDTSocket socket; - - private final ReceiveBuffer receiveBuffer; - - //set to 'false' by the receiver when it gets a shutdown signal from the peer - //see the noMoreData() method - private final AtomicBoolean expectMoreData=new AtomicBoolean(true); - - private volatile boolean closed=false; - - private volatile boolean blocking=true; - - private volatile boolean hasData=false;//cd - - - - /** - * create a new {@link UDTInputStream} connected to the given socket - * @param socket - the {@link UDTSocket} - * @throws IOException - */ - public UDTInputStream(UDTSocket socket)throws IOException{ - this.socket=socket; - int capacity=socket!=null? 2 * socket.getSession().getFlowWindowSize() : 128 ; - long initialSequenceNum=socket!=null?socket.getSession().getInitialSequenceNumber():1; - receiveBuffer=new ReceiveBuffer(capacity,initialSequenceNum); - } - - private final byte[]single=new byte[1]; - - @Override - public int read()throws IOException{ - int b=0; - while(b==0) - b=read(single); - - if(b>0){ - return single[0]; - } - else { - return b; - } - } - - private AppData currentChunk=null; - //offset into currentChunk - int offset=0; - long id=-1; - @Override - public int read(byte[]target)throws IOException{ - try{ - int read=0; - updateCurrentChunk(false); - while(currentChunk!=null){ - byte[]data=currentChunk.data; - int length=Math.min(target.length-read,data.length-offset); - System.arraycopy(data, offset, target, read, length); - read+=length; - offset+=length; - //check if chunk has been fully read - if(offset>=data.length){ - currentChunk=null; - offset=0; - } - - //if no more space left in target, exit now - if(read==target.length){ - return read; - } - - updateCurrentChunk(blocking && read==0); - } - - if(read>0)return read; - if(closed)return -1; - if(expectMoreData.get() || !receiveBuffer.isEmpty())return 0; - //no more data - return -1; - - }catch(Exception ex){ - IOException e= new IOException(); - e.initCause(ex); - throw e; - } - } - - /** - * Reads the next valid chunk of application data from the queue
- * - * In blocking mode,this method will block until data is available or the socket is closed, - * otherwise it will wait for at most 10 milliseconds. - * - * @throws InterruptedException - */ - private void updateCurrentChunk(boolean block)throws IOException{ - if(currentChunk!=null)return; - - while(true){ - try{ - if(block){ - currentChunk=receiveBuffer.poll(1, TimeUnit.MILLISECONDS); - while (!closed && currentChunk==null){ - currentChunk=receiveBuffer.poll(1000, TimeUnit.MILLISECONDS); - } - } - else currentChunk=receiveBuffer.poll(10, TimeUnit.MILLISECONDS); - - }catch(InterruptedException ie){ - IOException ex=new IOException(); - ex.initCause(ie); - throw ex; - } - return; - } - } - - /** - * new application data - * @param data - * - */ - protected boolean haveNewData(long sequenceNumber,byte[]data)throws IOException{ - return receiveBuffer.offer(new AppData(sequenceNumber,data)); - } - - @Override - public void close()throws IOException{ - if(closed)return; - closed=true; - noMoreData(); - } - - public UDTSocket getSocket(){ - return socket; - } - - /** - * sets the blocking mode - * @param block - */ - public void setBlocking(boolean block){ - this.blocking=block; - } - - public int getReceiveBufferSize(){ - return receiveBuffer.getSize(); - } - - /** - * notify the input stream that there is no more data - * @throws IOException - */ - protected void noMoreData()throws IOException{ - expectMoreData.set(false); - } - - /** - * жûݽ - * cd - * @return - */ - public boolean isHasData() - { - return hasData; - } - - /** - * used for storing application data and the associated - * sequence number in the queue in ascending order - */ - public static class AppData implements Comparable{ - final long sequenceNumber; - final byte[] data; - public AppData(long sequenceNumber, byte[]data){ - this.sequenceNumber=sequenceNumber; - this.data=data; - } - - @Override - public int compareTo(AppData o) { - return (int)(sequenceNumber-o.sequenceNumber); - } - - @Override - public String toString(){ - return sequenceNumber+"["+data.length+"]"; - } - - public long getSequenceNumber(){ - return sequenceNumber; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result - + (int) (sequenceNumber ^ (sequenceNumber >>> 32)); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - AppData other = (AppData) obj; - if (sequenceNumber != other.sequenceNumber) - return false; - return true; - } - - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/59/2091b446e0ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/59/2091b446e0ac001716b9ca6d5abb90bc deleted file mode 100644 index 6d8ec44..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/59/2091b446e0ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,148 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=10*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - long startTime=System.currentTimeMillis(); - while((count=dis.read(buf,0, bufSize))!=-1) - { - log.info("1:"); - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - - } - client.close(); - dis.close(); - log.info("ɣ"+f.getName()); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5a/10ee44b7a0ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/5a/10ee44b7a0ad0017181ed9113883eda9 deleted file mode 100644 index 773db69..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/5a/10ee44b7a0ad0017181ed9113883eda9 +++ /dev/null @@ -1,79 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.StringReader; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; -import org.w3c.dom.NodeList; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - -/** - * @author jinyu - * - */ -public class ReadXml { -public String readXml(String file) -{ - File f=new File(file); - if(!f.exists()) - { - return ""; - } - // - String xmlStr= readFile(file); - StringReader sr = new StringReader(xmlStr); - InputSource is = new InputSource(sr); - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - DocumentBuilder builder; - try { - builder = factory.newDocumentBuilder(); - } catch (ParserConfigurationException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - Document doc; - try { - doc = (Document) builder.parse(is); - } catch (SAXException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - NodeList list=doc.getElementsByTagName("IP"); - String ip= list.item(0).getTextContent(); - list=doc.getElementsByTagName("Port"); - String port=list.item(0).getTextContent(); - list=doc.getElementsByTagName("Dir"); - String dir=list.item(0).getTextContent(); - String strxml=ip+","+port+","+dir; - return strxml; - } -public String readFile(String file) -{ - StringBuilder result = new StringBuilder(); - try{ - BufferedReader br = new BufferedReader(new FileReader(file));//һBufferedReaderȡļ - String s = null; - while((s = br.readLine())!=null){//ʹreadLineһζһ - result.append(System.lineSeparator()+s); - } - br.close(); - }catch(Exception e){ - e.printStackTrace(); - } - return result.toString(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5a/30d29f9969a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/5a/30d29f9969a800171a8482560d609ceb deleted file mode 100644 index 24e8ae2..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/5a/30d29f9969a800171a8482560d609ceb +++ /dev/null @@ -1,113 +0,0 @@ -/** - * - */ -package judp; - -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.SynchronousQueue; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean Start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - //judpSocket jsocket=new judpSocket(csocket); - sessionHandoff.put(jsocket); - SocketManager.getInstance().addGC(jsocket,csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ -try { - judpSocket jsocket= sessionHandoff.take(); - return jsocket; -} catch (InterruptedException e) { - logger.info("judpSocketжϣ"+e.getMessage()); - e.printStackTrace(); -} -return null; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5a/b091bc44e0ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/5a/b091bc44e0ac001716b9ca6d5abb90bc deleted file mode 100644 index dde6eda..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/5a/b091bc44e0ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,149 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=10*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - long startTime=System.currentTimeMillis(); - while((count=dis.read(buf,0, bufSize))!=-1) - { - log.info("1:"); - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - log.info(":"+sum); - - } - client.close(); - dis.close(); - log.info("ɣ"+f.getName()); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5a/c0e40d3ea0ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/5a/c0e40d3ea0ad0017181ed9113883eda9 deleted file mode 100644 index 564436a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/5a/c0e40d3ea0ad0017181ed9113883eda9 +++ /dev/null @@ -1,52 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.StringReader; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; - -import org.xml.sax.InputSource; - -/** - * @author jinyu - * - */ -public class ReadXml { -public String readXml(String file) -{ - File f=new File(file); - if(!f.exists()) - { - return ""; - } - // - String xmlStr= readFile(file); - StringReader sr = new StringReader(xmlStr); - InputSource is = new InputSource(sr); - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - DocumentBuilder builder=factory.newDocumentBuilder(); - Document doc = (Document) builder.parse(is); - doc.gete -} -public String readFile(String file) -{ - StringBuilder result = new StringBuilder(); - try{ - BufferedReader br = new BufferedReader(new FileReader(file));//һBufferedReaderȡļ - String s = null; - while((s = br.readLine())!=null){//ʹreadLineһζһ - result.append(System.lineSeparator()+s); - } - br.close(); - }catch(Exception e){ - e.printStackTrace(); - } - return result.toString(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5a/c0e9c48ee4ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/5a/c0e9c48ee4ac001716b9ca6d5abb90bc deleted file mode 100644 index fbac0a2..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/5a/c0e9c48ee4ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,220 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData(byte[] data) - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - - - } - - }); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5b/b0bdcfc2d7ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/5b/b0bdcfc2d7ac001716b9ca6d5abb90bc deleted file mode 100644 index 85fac30..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/5b/b0bdcfc2d7ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,143 +0,0 @@ -/** - * - */ -package judp; - -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -//private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private boolean isRWMaster; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} - -/** - * - * @param port ˿ - */ -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - * @param localIP IP - * @param port ˿ - */ -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} -/** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * islagerRead=true - * @param isRead - */ -public void resetBufMaster(boolean isRead) -{ - this.isRWMaster=isRead; - -} - -/** - * ôݶȡ - * Ĭ false - * @param islarge - */ -public void setLargeRead(boolean islarge) -{ - this.isRWMaster=islarge; -} -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=SocketControls.getInstance().getSocket(); - } - judpSocket jsocket=new judpSocket(socket); - judpSocketManager.getInstance(socket.getEndpoint()).addSocket(jsocket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5c/20504804c5ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/5c/20504804c5ad0017181ed9113883eda9 deleted file mode 100644 index fcbfe7a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/5c/20504804c5ad0017181ed9113883eda9 +++ /dev/null @@ -1,516 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - // cd - private volatile int bufferNum=0; - private volatile boolean isModify=true; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - // - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5d/6043da1d1aac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/5d/6043da1d1aac001710ff8a7c6bda0fb8 deleted file mode 100644 index 1b2627c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/5d/6043da1d1aac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,74 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=20; - public static byte[][] split(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - byte[][] result=new byte[num][]; - for(int i=0;i hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - buffer[readPosition]=null;// - - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5e/205e2eb706ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/5e/205e2eb706ac001710ff8a7c6bda0fb8 deleted file mode 100644 index a0ac084..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/5e/205e2eb706ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,97 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; - -import java.util.WeakHashMap; - -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - @SuppressWarnings("rawtypes") - private final ReferenceQueue q = new ReferenceQueue(); - private long num=0; - /** - * ʹ - */ - private final WeakHashMap hashMap=new WeakHashMap (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("socket"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - if(num%200==0) - { - System.gc(); - } - num++; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5e/30073a3d25ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/5e/30073a3d25ac001710ff8a7c6bda0fb8 deleted file mode 100644 index b93d76e..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/5e/30073a3d25ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,233 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData= PackagetSub.split(data); - for(int i=0;i fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long startTime=System.currentTimeMillis(); - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - long speed=0; - try - { - speed=sumBytes/((System.currentTimeMillis()-startTime)/1000); - } - - log.info("ļٶȣ"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5e/80cf2f975ca800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/5e/80cf2f975ca800171a8482560d609ceb deleted file mode 100644 index 0916152..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/5e/80cf2f975ca800171a8482560d609ceb +++ /dev/null @@ -1,232 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.UDTStatistics; - -public class UDTClient { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - private final UDPEndPoint clientEndpoint; - private ClientSession clientSession; - private boolean close=false; - private Thread closeThread=null;//cd - private final int waitClose=10*1000; - public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address,localport); - logger.info("Created client endpoint on port "+localport); - } - - public UDTClient(InetAddress address)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address); - logger.info("Created client endpoint on port "+clientEndpoint.getLocalPort()); - } - - public UDTClient(UDPEndPoint endpoint)throws SocketException, UnknownHostException{ - clientEndpoint=endpoint; - } - - /** - * establishes a connection to the given server. - * Starts the sender thread. - * @param host - * @param port - * @throws UnknownHostException - */ - public void connect(String host, int port)throws InterruptedException, UnknownHostException, IOException{ - InetAddress address=InetAddress.getByName(host); - Destination destination=new Destination(address,port); - //create client session... - clientSession=new ClientSession(clientEndpoint,destination); - clientEndpoint.addSession(clientSession.getSocketID(), clientSession); - - clientEndpoint.start(); - clientSession.connect(); - //wait for handshake - while(!clientSession.isReady()){ - Thread.sleep(500); - } - logger.info("The UDTClient is connected"); - Thread.sleep(500); - } - - /** - * sends the given data asynchronously - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - public void send(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWrite(data); - } - - public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWriteBlocking(data); - } - - public int read(byte[]data)throws IOException, InterruptedException{ - return clientSession.getSocket().getInputStream().read(data); - } - - /** - * flush outstanding data (and make sure it is acknowledged) - * @throws IOException - * @throws InterruptedException - */ - public void flush()throws IOException, InterruptedException{ - clientSession.getSocket().flush(); - } - - - public void shutdown()throws IOException{ - - if (clientSession.isReady()&& clientSession.active==true) - { - Shutdown shutdown = new Shutdown(); - shutdown.setDestinationID(clientSession.getDestination().getSocketID()); - shutdown.setSession(clientSession); - try{ - clientEndpoint.doSend(shutdown); - TimeUnit.MILLISECONDS.sleep(100); - } - catch(Exception e) - { - logger.log(Level.SEVERE,"ERROR: Connection could not be stopped!",e); - } - clientSession.getSocket().getReceiver().stop(); - clientEndpoint.stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - close=true; - } - } - - public UDTInputStream getInputStream()throws IOException{ - return clientSession.getSocket().getInputStream(); - } - - public UDTOutputStream getOutputStream()throws IOException{ - return clientSession.getSocket().getOutputStream(); - } - - public UDPEndPoint getEndpoint()throws IOException{ - return clientEndpoint; - } - - public UDTStatistics getStatistics(){ - return clientSession.getStatistics(); - } - - public long getSocketID() - { - //cd - return clientSession.getSocketID(); - } - - /** - * ͬر - * ȴݷɺٹر - * ֻȴ10ss - */ - public synchronized void close() - { - close=true; - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(clientSession.getSocket().getSender().isSenderEmpty()) - { - try { - shutdown(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } - - public boolean isClose() - { - return close; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5f/10f8023268a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/5f/10f8023268a800171a8482560d609ceb deleted file mode 100644 index 6aa4c17..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/5f/10f8023268a800171a8482560d609ceb +++ /dev/null @@ -1,81 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public UDTSocket getSocket() -{ - - int index=-1; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(index==-1) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳ - i=-1;//± - index=i; - } - } - else - { - // - if(i==index) - { - continue; - } - else - { - list.get(i).close(); - long id=list.get(i).getSession().getSocketID(); - list.get(i).getEndpoint().removeSession(id); - list.get(i).getReceiver().stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - - } - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - return null; - -} -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5f/d03f8ec3e4ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/5f/d03f8ec3e4ac001716b9ca6d5abb90bc deleted file mode 100644 index 13eb70a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/5f/d03f8ec3e4ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,234 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData(byte[] data) - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - byte[]tmp=recQueue.poll(); - if(tmp==null) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - if(writeFile(tmp)) - { - ss.close(); - break; - } - } - - } - - }); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/6/40f9d9b9ceac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/6/40f9d9b9ceac001716b9ca6d5abb90bc deleted file mode 100644 index 483ab4e..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/6/40f9d9b9ceac001716b9ca6d5abb90bc +++ /dev/null @@ -1,210 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - if(buffer[insert]==null - } - buffer[insert]=data; - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else return null; - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/60/0049134464a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/60/0049134464a800171a8482560d609ceb deleted file mode 100644 index f090cbb..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/60/0049134464a800171a8482560d609ceb +++ /dev/null @@ -1,45 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private SocketControls (){ - startThread(); - startGC(); - } - - public static synchronized SocketManager getInstance() { - - if (instance == null) { - - instance = new SocketControls(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/60/2023350a64a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/60/2023350a64a800171a8482560d609ceb deleted file mode 100644 index 7f0875d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/60/2023350a64a800171a8482560d609ceb +++ /dev/null @@ -1,27 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; -import java.util.concurrent.ConcurrentHashMap; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private ConcurrentHashMap hash=new ConcurrentHashMap(); -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash. - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/60/30e12f8c69a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/60/30e12f8c69a800171a8482560d609ceb deleted file mode 100644 index 7ed3973..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/60/30e12f8c69a800171a8482560d609ceb +++ /dev/null @@ -1,99 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - // - if(!list.isEmpty()) - { - for(int i=0;i hashMap=new WeakHashMap (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("socket"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - if(num%200==0) - { - System.gc(); - } - num++; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/61/60416b18e5ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/61/60416b18e5ac001716b9ca6d5abb90bc deleted file mode 100644 index e8b042c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/61/60416b18e5ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,239 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData(byte[] data) - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - byte[]tmp=recQueue.poll(); - if(tmp==null) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - continue; - } - if(writeFile(tmp)) - { - isStop=true; - break; - } - } - - } - - }); - fileW.setDaemon(true); - fileW.setName(fileName+"_Thread"); - fileW.start(); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - // - ss.close(); - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/61/a02c15f303ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/61/a02c15f303ac001710ff8a7c6bda0fb8 deleted file mode 100644 index f46d638..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/61/a02c15f303ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,70 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private LinkedBlockingQueue> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - while((k = (WeakReference) q.remove()) != null) { - - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - private void startThread() { - - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/62/d0dc45525ba800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/62/d0dc45525ba800171a8482560d609ceb deleted file mode 100644 index fd9a135..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/62/d0dc45525ba800171a8482560d609ceb +++ /dev/null @@ -1,177 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.UDTStatistics; - -public class UDTClient { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - private final UDPEndPoint clientEndpoint; - private ClientSession clientSession; - private boolean close=false; - private Thread closeThread=null;//cd - public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address,localport); - logger.info("Created client endpoint on port "+localport); - } - - public UDTClient(InetAddress address)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address); - logger.info("Created client endpoint on port "+clientEndpoint.getLocalPort()); - } - - public UDTClient(UDPEndPoint endpoint)throws SocketException, UnknownHostException{ - clientEndpoint=endpoint; - } - - /** - * establishes a connection to the given server. - * Starts the sender thread. - * @param host - * @param port - * @throws UnknownHostException - */ - public void connect(String host, int port)throws InterruptedException, UnknownHostException, IOException{ - InetAddress address=InetAddress.getByName(host); - Destination destination=new Destination(address,port); - //create client session... - clientSession=new ClientSession(clientEndpoint,destination); - clientEndpoint.addSession(clientSession.getSocketID(), clientSession); - - clientEndpoint.start(); - clientSession.connect(); - //wait for handshake - while(!clientSession.isReady()){ - Thread.sleep(500); - } - logger.info("The UDTClient is connected"); - Thread.sleep(500); - } - - /** - * sends the given data asynchronously - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - public void send(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWrite(data); - } - - public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWriteBlocking(data); - } - - public int read(byte[]data)throws IOException, InterruptedException{ - return clientSession.getSocket().getInputStream().read(data); - } - - /** - * flush outstanding data (and make sure it is acknowledged) - * @throws IOException - * @throws InterruptedException - */ - public void flush()throws IOException, InterruptedException{ - clientSession.getSocket().flush(); - } - - - public void shutdown()throws IOException{ - - if (clientSession.isReady()&& clientSession.active==true) - { - Shutdown shutdown = new Shutdown(); - shutdown.setDestinationID(clientSession.getDestination().getSocketID()); - shutdown.setSession(clientSession); - try{ - clientEndpoint.doSend(shutdown); - TimeUnit.MILLISECONDS.sleep(100); - } - catch(Exception e) - { - logger.log(Level.SEVERE,"ERROR: Connection could not be stopped!",e); - } - clientSession.getSocket().getReceiver().stop(); - clientEndpoint.stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - close=true; - } - } - - public UDTInputStream getInputStream()throws IOException{ - return clientSession.getSocket().getInputStream(); - } - - public UDTOutputStream getOutputStream()throws IOException{ - return clientSession.getSocket().getOutputStream(); - } - - public UDPEndPoint getEndpoint()throws IOException{ - return clientEndpoint; - } - - public UDTStatistics getStatistics(){ - return clientSession.getStatistics(); - } - - public long getSocketID() - { - //cd - return clientSession.getSocketID(); - } - public void close() - { - - } - - public boolean isClose() - { - return close; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/63/1027745f23ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/63/1027745f23ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 19c5261..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/63/1027745f23ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,232 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData= PackagetSub.split(data); - for(int i=0;i fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - - /** - * дļ - */ - private void recData() - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - byte[]tmp=recQueue.poll(); - if(tmp==null) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - continue; - } - if(writeFile(tmp)) - { - isStop=true; - break; - } - } - - } - - }); - fileW.setDaemon(true); - fileW.setName(fileName+"_Thread"); - fileW.start(); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - // - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - else - { - recData(); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - // - ss.close(); - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/63/40a19ee8ceac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/63/40a19ee8ceac001716b9ca6d5abb90bc deleted file mode 100644 index bf97858..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/63/40a19ee8ceac001716b9ca6d5abb90bc +++ /dev/null @@ -1,220 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 - buffer[insert]=data; - } - else - { - - } - buffer[insert]=data; - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else return null; - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/63/f0ff4653cbac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/63/f0ff4653cbac001716b9ca6d5abb90bc deleted file mode 100644 index 3bf058c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/63/f0ff4653cbac001716b9ca6d5abb90bc +++ /dev/null @@ -1,195 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - //private final HashSet position; - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - //this.position=new HashSet(size); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - buffer[insert]=data; - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else return null; - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - /** - * ظ - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/64/00f0eed5f6ab001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/64/00f0eed5f6ab001710ff8a7c6bda0fb8 deleted file mode 100644 index 10c551b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/64/00f0eed5f6ab001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,114 +0,0 @@ -/** - * - */ -package judp; - -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -//private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} - -/** - * - * @param port ˿ - */ -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=SocketControls.getInstance().getSocket(); - } - judpSocket jsocket=new judpSocket(socket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/64/d0b50df3b4ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/64/d0b50df3b4ad0017181ed9113883eda9 deleted file mode 100644 index 97e82d9..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/64/d0b50df3b4ad0017181ed9113883eda9 +++ /dev/null @@ -1,187 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.SocketException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.SequenceNumber; - -/** - * Client side of a client-server UDT connection. - * Once established, the session provides a valid {@link UDTSocket}. - */ -public class ClientSession extends UDTSession { - - private static final Logger logger=Logger.getLogger(ClientSession.class.getName()); - - private UDPEndPoint endPoint; - public int connectNum=0; - public ClientSession(UDPEndPoint endPoint, Destination dest)throws SocketException{ - super("ClientSession localPort="+endPoint.getLocalPort(),dest); - this.endPoint=endPoint; - logger.info("Created "+toString()); - } - - /** - * send connection handshake until a reply from server is received - * TODO check for timeout - * @throws InterruptedException - * @throws IOException - */ - - public void connect() throws InterruptedException,IOException{ - int n=0; - - while(getState()!=ready){ - - sendHandShake(); - if(getState()==invalid)throw new IOException("Can't connect!"); - n++; - if(getState()!=ready)Thread.sleep(500); - } - - cc.init(); - logger.info("Connected, "+n+" handshake packets sent"); - } - - @Override - public void received(UDTPacket packet, Destination peer) { - - lastPacket=packet; - - if (packet instanceof ConnectionHandshake) { - ConnectionHandshake hs=(ConnectionHandshake)packet; - - logger.info("Received connection handshake from "+peer+"\n"+hs); - - if (getState()!=ready) { - if(hs.getConnectionType()==1){ - try{ - //TODO validate parameters sent by peer - long peerSocketID=hs.getSocketID(); - destination.setSocketID(peerSocketID); - sendConfirmation(hs); - }catch(Exception ex){ - logger.log(Level.WARNING,"Error creating socket",ex); - setState(invalid); - } - return; - } - else{ - try{ - //TODO validate parameters sent by peer - long peerSocketID=hs.getSocketID(); - destination.setSocketID(peerSocketID); - setState(ready); - Thread.sleep(50); - this.setInitialSequenceNumber(hs.getInitialSeqNo());//cd - System.out.println("ʼû2:"+this.getInitialSequenceNumber()); - socket=new UDTSocket(endPoint,this); - - }catch(Exception ex){ - logger.log(Level.WARNING,"Error creating socket",ex); - setState(invalid); - } - return; - } - } - } - - if(getState() == ready) { - - if(packet instanceof Shutdown){ - setState(shutdown); - active=false; - logger.info("Connection shutdown initiated by the other side."); - return; - } - active = true; - try{ - if(packet.forSender()){ - socket.getSender().receive(lastPacket); - }else{ - socket.getReceiver().receive(lastPacket); - } - }catch(Exception ex){ - //session is invalid - logger.log(Level.SEVERE,"Error in "+toString(),ex); - setState(invalid); - } - return; - } - } - - - //handshake for connect - protected void sendHandShake()throws IOException{ - ConnectionHandshake handshake = new ConnectionHandshake(); - handshake.setConnectionType(ConnectionHandshake.CONNECTION_TYPE_REGULAR); - handshake.setSocketType(ConnectionHandshake.SOCKET_TYPE_DGRAM); - long initialSequenceNo=SequenceNumber.random(); - setInitialSequenceNumber(initialSequenceNo); - handshake.setInitialSeqNo(initialSequenceNo); - handshake.setPacketSize(getDatagramSize()); - handshake.setSocketID(mySocketID); - handshake.setMaxFlowWndSize(flowWindowSize); - handshake.setSession(this); - logger.info("Sending "+handshake); - endPoint.doSend(handshake); - } - - //2nd handshake for connect - protected void sendConfirmation(ConnectionHandshake hs)throws IOException{ - ConnectionHandshake handshake = new ConnectionHandshake(); - handshake.setConnectionType(-1); - handshake.setSocketType(ConnectionHandshake.SOCKET_TYPE_DGRAM); - handshake.setInitialSeqNo(hs.getInitialSeqNo()); - handshake.setPacketSize(hs.getPacketSize()); - handshake.setSocketID(mySocketID); - handshake.setMaxFlowWndSize(flowWindowSize); - handshake.setSession(this); - logger.info("Sending confirmation "+handshake); - endPoint.doSend(handshake); - } - - - public UDTPacket getLastPkt(){ - return lastPacket; - } - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/65/20253f0eb3ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/65/20253f0eb3ad0017181ed9113883eda9 deleted file mode 100644 index 1c4526c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/65/20253f0eb3ad0017181ed9113883eda9 +++ /dev/null @@ -1,503 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/65/50bfc894a6ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/65/50bfc894a6ad0017181ed9113883eda9 deleted file mode 100644 index daaf7cb..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/65/50bfc894a6ad0017181ed9113883eda9 +++ /dev/null @@ -1,52 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.File; -import java.util.logging.Logger; - -import net.File.FileMonitor; -import net.File.FilesWatch; - - - - -/** - * @author jinyu - * - */ -public class TestSendFiles { - private static Logger log=Logger.getLogger(TestSendFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //SendFiles send=new SendFiles("192.168.9.152", 5555); - //192.168.30.128 - - ReadXml rd=new ReadXml(); - String xml= rd.readXml(ReadXml.getPath()+"/config.xml"); - String[] config=null; - if(xml!=null) - { - config=xml.split(","); - } - SendFiles send=new SendFiles(config[0], Integer.valueOf(config[1])); - FilesWatch watch=new FilesWatch(); - String dir=config[2]; - watch.setWatch(dir); - watch.start(); - while(true) - { - FileMonitor ff= watch.take(); - log.info(ff.file); - if(ff.file.endsWith(".tmp")) - { - continue; - } - send.sendFile(dir+"/"+ff.file); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/65/c0b5f764b9ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/65/c0b5f764b9ad0017181ed9113883eda9 deleted file mode 100644 index df6ad44..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/65/c0b5f764b9ad0017181ed9113883eda9 +++ /dev/null @@ -1,356 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.DatagramPacket; -import java.net.DatagramSocket; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.SocketTimeoutException; -import java.net.UnknownHostException; -import java.util.Collection; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.SynchronousQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.PacketFactory; -import udt.util.UDTThreadFactory; - -/** - * the UDPEndpoint takes care of sending and receiving UDP network packets, - * dispatching them to the correct {@link UDTSession} - */ -public class UDPEndPoint { - - private static final Logger logger=Logger.getLogger(ClientSession.class.getName()); - - private final int port; - - private final DatagramSocket dgSocket; - - //active sessions keyed by socket ID - private final Mapsessions=new ConcurrentHashMap(); - - //last received packet - private UDTPacket lastPacket; - - //if the endpoint is configured for a server socket, - //this queue is used to handoff new UDTSessions to the application - private final SynchronousQueue sessionHandoff=new SynchronousQueue(); - - private boolean serverSocketMode=false; - - //has the endpoint been stopped? - private volatile boolean stopped=false; - - public static final int DATAGRAM_SIZE=1400; - - private volatile int sessionnum=0;//cd ʱͳ - - /** - * create an endpoint on the given socket - * - * @param socket - a UDP datagram socket - */ - public UDPEndPoint(DatagramSocket socket){ - this.dgSocket=socket; - port=dgSocket.getLocalPort(); - } - - /** - * bind to any local port on the given host address - * @param localAddress - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress)throws SocketException, UnknownHostException{ - this(localAddress,0); - } - - /** - * Bind to the given address and port - * @param localAddress - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress, int localPort)throws SocketException, UnknownHostException{ - if(localAddress==null){ - dgSocket=new DatagramSocket(localPort, localAddress); - }else{ - dgSocket=new DatagramSocket(localPort); - } - if(localPort>0)this.port = localPort; - else port=dgSocket.getLocalPort(); - - //set a time out to avoid blocking in doReceive() - dgSocket.setSoTimeout(100000); - //buffer size - dgSocket.setReceiveBufferSize(128*1024); - } - - /** - * bind to the default network interface on the machine - * - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(int localPort)throws SocketException, UnknownHostException{ - this(null,localPort); - } - - /** - * bind to an ephemeral port on the default network interface on the machine - * - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint()throws SocketException, UnknownHostException{ - this(null,0); - } - - /** - * start the endpoint. If the serverSocketModeEnabled flag is true, - * a new connection can be handed off to an application. The application needs to - * call #accept() to get the socket - * @param serverSocketModeEnabled - */ - public void start(boolean serverSocketModeEnabled){ - serverSocketMode=serverSocketModeEnabled; - //start receive thread - Runnable receive=new Runnable(){ - @Override - public void run(){ - try{ - doReceive(); - }catch(Exception ex){ - logger.log(Level.WARNING,"",ex); - } - } - }; - Thread t=UDTThreadFactory.get().newThread(receive); - t.setDaemon(true); - t.start(); - logger.info("UDTEndpoint started."); - } - - public void start(){ - start(false); - } - - public void stop(){ - stopped=true; - dgSocket.close(); - } - - /** - * @return the port which this client is bound to - */ - public int getLocalPort() { - return this.dgSocket.getLocalPort(); - } - /** - * @return Gets the local address to which the socket is bound - */ - public InetAddress getLocalAddress(){ - return this.dgSocket.getLocalAddress(); - } - - DatagramSocket getSocket(){ - return dgSocket; - } - - UDTPacket getLastPacket(){ - return lastPacket; - } - - public void addSession(Long destinationID,UDTSession session){ - logger.info("Storing session <"+destinationID+">"); - sessionnum++; - sessions.put(destinationID, session); - } - - public UDTSession getSession(Long destinationID){ - return sessions.get(destinationID); - } - - /** - * Ƴsession - * cd - * @param socketid - * @return - */ - public UDTSession removeSession(long socketid) - { - //cd - sessionnum--; - logger.info("Storing Sessionnum:"+sessionnum); - return sessions.remove(socketid); - } - public Collection getSessions(){ - return sessions.values(); - } - - /** - * wait the given time for a new connection - * @param timeout - the time to wait - * @param unit - the {@link TimeUnit} - * @return a new {@link UDTSession} - * @throws InterruptedException - */ - protected UDTSession accept(long timeout, TimeUnit unit)throws InterruptedException{ - return sessionHandoff.poll(timeout, unit); - } - - - final DatagramPacket dp= new DatagramPacket(new byte[DATAGRAM_SIZE],DATAGRAM_SIZE); - - /** - * single receive, run in the receiverThread, see {@link #start()} - *
    - *
  • Receives UDP packets from the network
  • - *
  • Converts them to UDT packets
  • - *
  • dispatches the UDT packets according to their destination ID.
  • - *
- * @throws IOException - */ - private long lastDestID=-1; - private UDTSession lastSession; - - //MeanValue v=new MeanValue("receiver processing ",true, 256); - - private int n=0; - - private final Object lock=new Object(); - - protected void doReceive()throws IOException{ - while(!stopped){ - try{ - try{ - //v.end(); - - //will block until a packet is received or timeout has expired - dgSocket.receive(dp); - - //v.begin(); - - Destination peer=new Destination(dp.getAddress(), dp.getPort()); - int l=dp.getLength(); - UDTPacket packet=PacketFactory.createPacket(dp.getData(),l); - lastPacket=packet; - - //handle connection handshake - if(packet.isConnectionHandshake()){ - synchronized(lock){ - Long id=Long.valueOf(packet.getDestinationID()); - UDTSession session=sessions.get(id); - if(session==null){ - session=new ServerSession(dp,this); - addSession(session.getSocketID(),session); - //TODO need to check peer to avoid duplicate server session - if(serverSocketMode){ - logger.fine("Pooling new request."); - sessionHandoff.put(session); - logger.fine("Request taken for processing."); - } - } - peer.setSocketID(((ConnectionHandshake)packet).getSocketID()); - session.received(packet,peer); - } - } - else{ - //dispatch to existing session - long dest=packet.getDestinationID(); - UDTSession session; - if(dest==lastDestID){ - session=lastSession; - } - else{ - session=sessions.get(dest);//cd - lastSession=session; - lastDestID=dest; - } - if(session==null){ - n++; - if(n%100==1){ - logger.warning("Unknown session <"+dest+"> requested from <"+peer+"> packet type "+packet.getClass().getName()); - } - } - else{ - session.received(packet,peer); - - } - } - }catch(SocketException ex){ - if(ex.getMessage().equals("socket closed")&&stopped) - { - //cd - //Ѿر - } - else - { - logger.log(Level.INFO, "SocketException: "+ex.getMessage()); - } - }catch(SocketTimeoutException ste){ - //can safely ignore... we will retry until the endpoint is stopped - } - - }catch(Exception ex){ - logger.log(Level.WARNING, "Got: "+ex.getMessage(),ex); - } - } - } - - protected void doSend(UDTPacket packet)throws IOException{ - byte[]data=packet.getEncoded(); - DatagramPacket dgp = packet.getSession().getDatagram(); - dgp.setData(data); - dgSocket.send(dgp); - } - - @Override - public String toString(){ - return "UDPEndpoint port="+port; - } - - public void sendRaw(DatagramPacket p)throws IOException{ - dgSocket.send(p); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/65/d0bc506103ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/65/d0bc506103ac001710ff8a7c6bda0fb8 deleted file mode 100644 index c0c594c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/65/d0bc506103ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - */ -package judp; - - -import java.lang.ref.WeakReference; - -/** - * @author jinyu - * @param - * - */ -public class SocketReference extends WeakReference { - private final long socketid=-1; - public SocketReference(T referent) { - super(referent); - - } - public SocketReference(T referent,long id) { - super(referent); - this.socketid=id; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/65/e0d96e5a1eac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/65/e0d96e5a1eac001710ff8a7c6bda0fb8 deleted file mode 100644 index ce762a1..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/65/e0d96e5a1eac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,28 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -/** - * @author jinyu - * - */ -public class PackagetCombin { - private static ConcurrentHashMap hash=new ConcurrentHashMap(); -public DataStruct addData(byte[] data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - DataStruct struct=hash.get(id); - if(struct==null) - { - struct=new DataStruct(num); - hash.put(id, struct); - } - struct.addData(data); - return struct; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/66/10f59fb9a0ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/66/10f59fb9a0ad0017181ed9113883eda9 deleted file mode 100644 index e9cfdb4..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/66/10f59fb9a0ad0017181ed9113883eda9 +++ /dev/null @@ -1,79 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.StringReader; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; -import org.w3c.dom.NodeList; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - -/** - * @author jinyu - * - */ -public class ReadXml { -public String readXml(String file) -{ - File f=new File(file); - if(!f.exists()) - { - return ""; - } - // - String xmlStr= readFile(file); - StringReader sr = new StringReader(xmlStr); - InputSource is = new InputSource(sr); - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - DocumentBuilder builder; - try { - builder = factory.newDocumentBuilder(); - } catch (ParserConfigurationException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - Document doc = null; - try { - doc = (Document) builder.parse(is); - } catch (SAXException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - NodeList list=doc.getElementsByTagName("IP"); - String ip= list.item(0).getTextContent(); - list=doc.getElementsByTagName("Port"); - String port=list.item(0).getTextContent(); - list=doc.getElementsByTagName("Dir"); - String dir=list.item(0).getTextContent(); - String strxml=ip+","+port+","+dir; - return strxml; - } -public String readFile(String file) -{ - StringBuilder result = new StringBuilder(); - try{ - BufferedReader br = new BufferedReader(new FileReader(file));//һBufferedReaderȡļ - String s = null; - while((s = br.readLine())!=null){//ʹreadLineһζһ - result.append(System.lineSeparator()+s); - } - br.close(); - }catch(Exception e){ - e.printStackTrace(); - } - return result.toString(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/66/704245e5e1ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/66/704245e5e1ac001716b9ca6d5abb90bc deleted file mode 100644 index b82e88d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/66/704245e5e1ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,148 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=10*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - long startTime=System.currentTimeMillis(); - while((count=dis.read(buf,0, bufSize))!=-1) - { - - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - } - log.info("ͣ"+f.getName()+","+); - } - long endTime=System.currentTimeMillis(); - client.close(); - dis.close(); - long speed=fLen/((endTime-startTime)/1000); - log.info("ɣ"+f.getName()+",ƽٶ(M/S)"+speed/1024/1024); - - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/66/804c48ac2bac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/66/804c48ac2bac001710ff8a7c6bda0fb8 deleted file mode 100644 index d60160c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/66/804c48ac2bac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,88 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] buffer=null; -public long id; -private volatile int sumNum=0; -private volatile int sumLen=0; -private byte[] result=null; -public DataStruct(int num) -{ - buffer=new byte[num][]; -} - -/** - * - * @return - */ -private boolean check() -{ - if(num>=buffer.length) - { - //ɹ - if(sum==dataLen) - { - //ʼ - result=new byte[dataLen]; - ByteBuffer cur=ByteBuffer.wrap(result); - for(int i=0;i fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - long speed=0; - try - { - speed=sumBytes/((System.currentTimeMillis()-lastTime)/1000); - } - catch(Exception ex) - { - - } - lastTime=System.currentTimeMillis(); - log.info("ļٶȣ"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/67/1081b1f8b5ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/67/1081b1f8b5ac001716b9ca6d5abb90bc deleted file mode 100644 index 721e9fa..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/67/1081b1f8b5ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,191 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.DatagramPacket; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.KeepAlive; -import udt.packets.Shutdown; - -/** - * server side session in client-server mode - */ -public class ServerSession extends UDTSession { - - private static final Logger logger=Logger.getLogger(ServerSession.class.getName()); - - private final UDPEndPoint endPoint; - - //last received packet (for testing purposes) - private UDTPacket lastPacket; - - - public ServerSession(DatagramPacket dp, UDPEndPoint endPoint)throws SocketException,UnknownHostException{ - super("ServerSession localPort="+endPoint.getLocalPort()+" peer="+dp.getAddress()+":"+dp.getPort(),new Destination(dp.getAddress(),dp.getPort())); - this.endPoint=endPoint; - logger.info("Created "+toString()+" talking to "+dp.getAddress()+":"+dp.getPort()); - } - - int n_handshake=0; - - @Override - public void received(UDTPacket packet, Destination peer){ - lastPacket=packet; - - if(packet instanceof ConnectionHandshake) { - ConnectionHandshake connectionHandshake=(ConnectionHandshake)packet; - logger.info("Received "+connectionHandshake); - - if (getState()<=ready){ - destination.setSocketID(connectionHandshake.getSocketID()); - - if(getState()<=handshaking){ - setState(handshaking); - } - try{ - handleHandShake(connectionHandshake); - n_handshake++; - try{ - setState(ready); - socket=new UDTSocket(endPoint, this); - cc.init(); - }catch(Exception uhe){ - //session is invalid - logger.log(Level.SEVERE,"",uhe); - setState(invalid); - } - }catch(IOException ex){ - //session invalid - logger.log(Level.WARNING,"Error processing ConnectionHandshake",ex); - setState(invalid); - } - return; - } - - }else if(packet instanceof KeepAlive) { - socket.getReceiver().resetEXPTimer(); - active = true; - return; - } - - if(getState()== ready) { - active = true; - - if (packet instanceof KeepAlive) { - //nothing to do here - return; - }else if (packet instanceof Shutdown) { - try{ - socket.getReceiver().stop(); - }catch(IOException ex){ - logger.log(Level.WARNING,"",ex); - } - setState(shutdown); - System.out.println("SHUTDOWN ***"); - active = false; - logger.info("Connection shutdown initiated by the other side."); - return; - } - - else{ - try{ - logger.info("DataPacket:"+packet.getPacketSequenceNumber()); - if(packet.forSender()){ - socket.getSender().receive(packet); - }else{ - socket.getReceiver().receive(packet); - } - }catch(Exception ex){ - //session invalid - logger.log(Level.SEVERE,"",ex); - setState(invalid); - } - } - return; - - } - - - } - - /** - * for testing use only - */ - UDTPacket getLastPacket(){ - return lastPacket; - } - - /** - * handle the connection handshake:
- *
    - *
  • set initial sequence number
  • - *
  • send response handshake
  • - *
- * @param handshake - * @param peer - * @throws IOException - */ - protected void handleHandShake(ConnectionHandshake handshake)throws IOException{ - ConnectionHandshake responseHandshake = new ConnectionHandshake(); - //compare the packet size and choose minimun - long clientBufferSize=handshake.getPacketSize(); - long myBufferSize=getDatagramSize(); - long bufferSize=Math.min(clientBufferSize, myBufferSize); - long initialSequenceNumber=handshake.getInitialSeqNo(); - setInitialSequenceNumber(initialSequenceNumber); - setDatagramSize((int)bufferSize); - responseHandshake.setPacketSize(bufferSize); - responseHandshake.setUdtVersion(4); - responseHandshake.setInitialSeqNo(initialSequenceNumber); - responseHandshake.setConnectionType(-1); - responseHandshake.setMaxFlowWndSize(handshake.getMaxFlowWndSize()); - //tell peer what the socket ID on this side is - responseHandshake.setSocketID(mySocketID); - responseHandshake.setDestinationID(this.getDestination().getSocketID()); - responseHandshake.setSession(this); - logger.info("Sending reply "+responseHandshake); - endPoint.doSend(responseHandshake); - } - - - - -} - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/67/60dc22d413ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/67/60dc22d413ac001710ff8a7c6bda0fb8 deleted file mode 100644 index e0ebf3f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/67/60dc22d413ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,28 +0,0 @@ -package Test; - -import java.util.concurrent.TimeUnit; - -import judp.judpClient; - -public class TestClient { - - public static void main(String[] args) { - long num=0; - while(true) - { - judpClient client=new judpClient(); - client.connect("192.168.30.128", 5555); - byte[]data=("hello word "+num).getBytes(); - client.sendData(data); - client.close(); - try { - System.out.println("ȴ"); - TimeUnit.SECONDS.sleep(5); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/67/80be36cff8ab001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/67/80be36cff8ab001710ff8a7c6bda0fb8 deleted file mode 100644 index b64eea9..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/67/80be36cff8ab001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,351 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.DatagramPacket; -import java.net.DatagramSocket; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.SocketTimeoutException; -import java.net.UnknownHostException; -import java.util.Collection; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.SynchronousQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.PacketFactory; -import udt.util.UDTThreadFactory; - -/** - * the UDPEndpoint takes care of sending and receiving UDP network packets, - * dispatching them to the correct {@link UDTSession} - */ -public class UDPEndPoint { - - private static final Logger logger=Logger.getLogger(ClientSession.class.getName()); - - private final int port; - - private final DatagramSocket dgSocket; - - //active sessions keyed by socket ID - private final Mapsessions=new ConcurrentHashMap(); - - //last received packet - private UDTPacket lastPacket; - - //if the endpoint is configured for a server socket, - //this queue is used to handoff new UDTSessions to the application - private final SynchronousQueue sessionHandoff=new SynchronousQueue(); - - private boolean serverSocketMode=false; - - //has the endpoint been stopped? - private volatile boolean stopped=false; - - public static final int DATAGRAM_SIZE=1400; - - private volatile int sessionnum=0;//cd ʱͳ - - /** - * create an endpoint on the given socket - * - * @param socket - a UDP datagram socket - */ - public UDPEndPoint(DatagramSocket socket){ - this.dgSocket=socket; - port=dgSocket.getLocalPort(); - } - - /** - * bind to any local port on the given host address - * @param localAddress - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress)throws SocketException, UnknownHostException{ - this(localAddress,0); - } - - /** - * Bind to the given address and port - * @param localAddress - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress, int localPort)throws SocketException, UnknownHostException{ - if(localAddress==null){ - dgSocket=new DatagramSocket(localPort, localAddress); - }else{ - dgSocket=new DatagramSocket(localPort); - } - if(localPort>0)this.port = localPort; - else port=dgSocket.getLocalPort(); - - //set a time out to avoid blocking in doReceive() - dgSocket.setSoTimeout(100000); - //buffer size - dgSocket.setReceiveBufferSize(128*1024); - } - - /** - * bind to the default network interface on the machine - * - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(int localPort)throws SocketException, UnknownHostException{ - this(null,localPort); - } - - /** - * bind to an ephemeral port on the default network interface on the machine - * - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint()throws SocketException, UnknownHostException{ - this(null,0); - } - - /** - * start the endpoint. If the serverSocketModeEnabled flag is true, - * a new connection can be handed off to an application. The application needs to - * call #accept() to get the socket - * @param serverSocketModeEnabled - */ - public void start(boolean serverSocketModeEnabled){ - serverSocketMode=serverSocketModeEnabled; - //start receive thread - Runnable receive=new Runnable(){ - @Override - public void run(){ - try{ - doReceive(); - }catch(Exception ex){ - logger.log(Level.WARNING,"",ex); - } - } - }; - Thread t=UDTThreadFactory.get().newThread(receive); - t.setDaemon(true); - t.start(); - logger.info("UDTEndpoint started."); - } - - public void start(){ - start(false); - } - - public void stop(){ - stopped=true; - dgSocket.close(); - } - - /** - * @return the port which this client is bound to - */ - public int getLocalPort() { - return this.dgSocket.getLocalPort(); - } - /** - * @return Gets the local address to which the socket is bound - */ - public InetAddress getLocalAddress(){ - return this.dgSocket.getLocalAddress(); - } - - DatagramSocket getSocket(){ - return dgSocket; - } - - UDTPacket getLastPacket(){ - return lastPacket; - } - - public void addSession(Long destinationID,UDTSession session){ - logger.info("Storing session <"+destinationID+">"); - sessionnum++; - sessions.put(destinationID, session); - } - - public UDTSession getSession(Long destinationID){ - return sessions.get(destinationID); - } - - /** - * Ƴsession - * cd - * @param socketid - * @return - */ - public UDTSession removeSession(long socketid) - { - //cd - sessionnum--; - logger.info("Storing Sessionnum:"+sessionnum); - return sessions.remove(socketid); - } - public Collection getSessions(){ - return sessions.values(); - } - - /** - * wait the given time for a new connection - * @param timeout - the time to wait - * @param unit - the {@link TimeUnit} - * @return a new {@link UDTSession} - * @throws InterruptedException - */ - protected UDTSession accept(long timeout, TimeUnit unit)throws InterruptedException{ - return sessionHandoff.poll(timeout, unit); - } - - - final DatagramPacket dp= new DatagramPacket(new byte[DATAGRAM_SIZE],DATAGRAM_SIZE); - - /** - * single receive, run in the receiverThread, see {@link #start()} - *
    - *
  • Receives UDP packets from the network
  • - *
  • Converts them to UDT packets
  • - *
  • dispatches the UDT packets according to their destination ID.
  • - *
- * @throws IOException - */ - private long lastDestID=-1; - private UDTSession lastSession; - - //MeanValue v=new MeanValue("receiver processing ",true, 256); - - private int n=0; - - private final Object lock=new Object(); - - protected void doReceive()throws IOException{ - while(!stopped){ - try{ - try{ - //v.end(); - - //will block until a packet is received or timeout has expired - dgSocket.receive(dp); - - //v.begin(); - - Destination peer=new Destination(dp.getAddress(), dp.getPort()); - int l=dp.getLength(); - UDTPacket packet=PacketFactory.createPacket(dp.getData(),l); - lastPacket=packet; - - //handle connection handshake - if(packet.isConnectionHandshake()){ - synchronized(lock){ - Long id=Long.valueOf(packet.getDestinationID()); - UDTSession session=sessions.get(id); - if(session==null){ - session=new ServerSession(dp,this); - addSession(session.getSocketID(),session); - //TODO need to check peer to avoid duplicate server session - if(serverSocketMode){ - logger.fine("Pooling new request."); - sessionHandoff.put(session); - logger.fine("Request taken for processing."); - } - } - peer.setSocketID(((ConnectionHandshake)packet).getSocketID()); - session.received(packet,peer); - } - } - else{ - //dispatch to existing session - long dest=packet.getDestinationID(); - UDTSession session; - if(dest==lastDestID){ - session=lastSession; - } - else{ - session=sessions.get(dest); - lastSession=session; - lastDestID=dest; - } - if(session==null){ - n++; - if(n%100==1){ - logger.warning("Unknown session <"+dest+"> requested from <"+peer+"> packet type "+packet.getClass().getName()); - } - } - else{ - session.received(packet,peer); - } - } - }catch(SocketException ex){ - if(ex.getMessage().equals("socket closed")&&) - { - //Ѿ - } - logger.log(Level.INFO, "SocketException: "+ex.getMessage()); - }catch(SocketTimeoutException ste){ - //can safely ignore... we will retry until the endpoint is stopped - } - - }catch(Exception ex){ - logger.log(Level.WARNING, "Got: "+ex.getMessage(),ex); - } - } - } - - protected void doSend(UDTPacket packet)throws IOException{ - byte[]data=packet.getEncoded(); - DatagramPacket dgp = packet.getSession().getDatagram(); - dgp.setData(data); - dgSocket.send(dgp); - } - - @Override - public String toString(){ - return "UDPEndpoint port="+port; - } - - public void sendRaw(DatagramPacket p)throws IOException{ - dgSocket.send(p); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/67/c071fbe65ea800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/67/c071fbe65ea800171a8482560d609ceb deleted file mode 100644 index e69de29..0000000 diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/67/d0d5236bf4ab001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/67/d0d5236bf4ab001710ff8a7c6bda0fb8 deleted file mode 100644 index a3b5422..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/67/d0d5236bf4ab001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,27 +0,0 @@ -package Test; - -import java.util.concurrent.TimeUnit; - -import judp.judpClient; - -public class TestClient { - - public static void main(String[] args) { - while(true) - { - judpClient client=new judpClient(); - client.connect("127.0.0.1", 5555); - byte[]data=("hello word "+System.currentTimeMillis()).getBytes(); - client.sendData(data); - client.close(); - try { - System.out.println("ȴ"); - TimeUnit.SECONDS.sleep(40); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/69/b06da8a2d8ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/69/b06da8a2d8ac001716b9ca6d5abb90bc deleted file mode 100644 index 57f26ad..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/69/b06da8a2d8ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,152 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -//private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private boolean isRWMaster=true;//Ĭֵһ -private boolean islagerRead=false; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} - -/** - * - * @param port ˿ - */ -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - * @param localIP IP - * @param port ˿ - */ -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - try { - csocket.getInputStream().setLargeRead(islagerRead); - csocket.getInputStream().resetBufMaster(isRWMaster); - } catch (IOException e) { - e.printStackTrace(); - } - - SocketControls.getInstance().addSocket(csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} -/** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * ôݶȡ - * @param isRead - */ -public void resetBufMaster(boolean isRead) -{ - this.isRWMaster=isRead; - -} - -/** - * ôݶȡ - * Ĭ false - * @param islarge - */ -public void setLargeRead(boolean islarge) -{ - this.islagerRead=islarge; -} -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=SocketControls.getInstance().getSocket(); - } - judpSocket jsocket=new judpSocket(socket); - judpSocketManager.getInstance(socket.getEndpoint()).addSocket(jsocket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/69/d0e5e1f3a0ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/69/d0e5e1f3a0ad0017181ed9113883eda9 deleted file mode 100644 index faccbc2..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/69/d0e5e1f3a0ad0017181ed9113883eda9 +++ /dev/null @@ -1,45 +0,0 @@ -/** - * - */ -package net.File; - -import java.util.logging.Logger; - -import net.File.FileMonitor; -import net.File.FilesWatch; - - - - -/** - * @author jinyu - * - */ -public class TestSendFiles { - private static Logger log=Logger.getLogger(TestSendFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //SendFiles send=new SendFiles("192.168.9.152", 5555); - //192.168.30.128 - ReadXml rd=new ReadXml(); - rd.readXml("config.xml"); - SendFiles send=new SendFiles("192.168.30.128", 5555); - FilesWatch watch=new FilesWatch(); - String dir="F:/monitor"; - watch.setWatch(dir); - watch.start(); - while(true) - { - FileMonitor ff= watch.take(); - log.info(ff.file); - if(ff.file.endsWith(".tmp")) - { - continue; - } - send.sendFile(dir+"/"+ff.file); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/6a/40965eabcfac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/6a/40965eabcfac001716b9ca6d5abb90bc deleted file mode 100644 index 03c11f3..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/6a/40965eabcfac001716b9ca6d5abb90bc +++ /dev/null @@ -1,232 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ - if(highestReadSequenceNumber+1100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - while((count=dis.read(buf,0, bufSize))!=-1) - { - log.info("1:"); - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - log.info(":"+sum); - TimeUnit.SECONDS.sleep(1); - } - client.close(); - dis.close(); - log.info("ɣ"+f.getName()); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/6e/40913b1af8ab001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/6e/40913b1af8ab001710ff8a7c6bda0fb8 deleted file mode 100644 index 86b3655..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/6e/40913b1af8ab001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,88 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.logging.Logger; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -private static final Logger logger=Logger.getLogger(judpGroupSocket.class.getName()); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * Ƴsocket - * @return - */ -public UDTSocket getSocket() -{ - - int index=-1; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(index==-1) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳ - index=i; - i=-1;//± - } - } - else - { - // - if(i==index) - { - continue; - } - else - { - list.get(i).close(); - long id=list.get(i).getSession().getSocketID(); - list.get(i).getEndpoint().removeSession(id); - list.get(i).getReceiver().stop(); - list.get(i).getSender().stop(); - } - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - if(index!=-1) - { - return list.get(index); - } - return null; - -} -/** - * socket - */ -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/6e/c0a030dfdfac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/6e/c0a030dfdfac001716b9ca6d5abb90bc deleted file mode 100644 index b176735..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/6e/c0a030dfdfac001716b9ca6d5abb90bc +++ /dev/null @@ -1,187 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long startTime=System.currentTimeMillis(); - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - long speed=0; - try - { - speed=sumBytes/((System.currentTimeMillis()-startTime)/1000); - } - catch(Exception ex) - { - - } - log.info("ļٶȣ"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/6e/d0f5ffe8f7ab001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/6e/d0f5ffe8f7ab001710ff8a7c6bda0fb8 deleted file mode 100644 index d411386..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/6e/d0f5ffe8f7ab001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,87 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * Ƴsocket - * @return - */ -public UDTSocket getSocket() -{ - - int index=-1; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(index==-1) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳ - index=i; - i=-1;//± - - } - } - else - { - // - if(i==index) - { - continue; - } - else - { - list.get(i).close(); - long id=list.get(i).getSession().getSocketID(); - list.get(i).getEndpoint().removeSession(id); - list.get(i).getReceiver().stop(); - list.get(i).getSender().stop(); - } - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - if(index!=-1) - { - return list.get(index); - } - return null; - -} -/** - * socket - */ -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/6f/a0409b8eb3ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/6f/a0409b8eb3ad0017181ed9113883eda9 deleted file mode 100644 index c920737..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/6f/a0409b8eb3ad0017181ed9113883eda9 +++ /dev/null @@ -1,514 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - } - - } - - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/6f/c03e69c56da800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/6f/c03e69c56da800171a8482560d609ceb deleted file mode 100644 index 9361825..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/6f/c03e69c56da800171a8482560d609ceb +++ /dev/null @@ -1,42 +0,0 @@ -/** - * ļTestRecFile.java - * - * 汾Ϣ - * ڣ2017827 - * Copyright Corporation 2017 - * Ȩ - * - */ -package Test; - -import java.io.IOException; - -import judp.judpRecviceFile; - -/** - * - * Ŀƣjudp - * ƣTestRecFile - * - * ˣjinyu - * ʱ䣺2017827 6:32:42 - * ޸ˣjinyu - * ޸ʱ䣺2017827 6:32:42 - * ޸ıע - * @version - * - */ -public class TestRecFiles { - - public static void main(String[] args) { - judpRecviceFile rec=new judpRecviceFile("127.0.0.1", 5555, "E:\\Study\\java\\filesudt\\send\\12.rmvb", "E:\\Study\\java\\filesudt\\rec\\1.rmvb"); - rec.start(); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7/509a29f366a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/7/509a29f366a800171a8482560d609ceb deleted file mode 100644 index 5f690c2..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7/509a29f366a800171a8482560d609ceb +++ /dev/null @@ -1,54 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public UDTSocket getSocket() -{ - for( int i = 0 ; i < list.size() ; i++) { - try { - if(list.get(i).getInputStream().isHasData()) - { - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - return null; - -} -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7/a0002b2d5ca800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/7/a0002b2d5ca800171a8482560d609ceb deleted file mode 100644 index 2f70404..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7/a0002b2d5ca800171a8482560d609ceb +++ /dev/null @@ -1,202 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.UDTStatistics; - -public class UDTClient { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - private final UDPEndPoint clientEndpoint; - private ClientSession clientSession; - private boolean close=false; - private Thread closeThread=null;//cd - public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address,localport); - logger.info("Created client endpoint on port "+localport); - } - - public UDTClient(InetAddress address)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address); - logger.info("Created client endpoint on port "+clientEndpoint.getLocalPort()); - } - - public UDTClient(UDPEndPoint endpoint)throws SocketException, UnknownHostException{ - clientEndpoint=endpoint; - } - - /** - * establishes a connection to the given server. - * Starts the sender thread. - * @param host - * @param port - * @throws UnknownHostException - */ - public void connect(String host, int port)throws InterruptedException, UnknownHostException, IOException{ - InetAddress address=InetAddress.getByName(host); - Destination destination=new Destination(address,port); - //create client session... - clientSession=new ClientSession(clientEndpoint,destination); - clientEndpoint.addSession(clientSession.getSocketID(), clientSession); - - clientEndpoint.start(); - clientSession.connect(); - //wait for handshake - while(!clientSession.isReady()){ - Thread.sleep(500); - } - logger.info("The UDTClient is connected"); - Thread.sleep(500); - } - - /** - * sends the given data asynchronously - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - public void send(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWrite(data); - } - - public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWriteBlocking(data); - } - - public int read(byte[]data)throws IOException, InterruptedException{ - return clientSession.getSocket().getInputStream().read(data); - } - - /** - * flush outstanding data (and make sure it is acknowledged) - * @throws IOException - * @throws InterruptedException - */ - public void flush()throws IOException, InterruptedException{ - clientSession.getSocket().flush(); - } - - - public void shutdown()throws IOException{ - - if (clientSession.isReady()&& clientSession.active==true) - { - Shutdown shutdown = new Shutdown(); - shutdown.setDestinationID(clientSession.getDestination().getSocketID()); - shutdown.setSession(clientSession); - try{ - clientEndpoint.doSend(shutdown); - TimeUnit.MILLISECONDS.sleep(100); - } - catch(Exception e) - { - logger.log(Level.SEVERE,"ERROR: Connection could not be stopped!",e); - } - clientSession.getSocket().getReceiver().stop(); - clientEndpoint.stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - close=true; - } - } - - public UDTInputStream getInputStream()throws IOException{ - return clientSession.getSocket().getInputStream(); - } - - public UDTOutputStream getOutputStream()throws IOException{ - return clientSession.getSocket().getOutputStream(); - } - - public UDPEndPoint getEndpoint()throws IOException{ - return clientEndpoint; - } - - public UDTStatistics getStatistics(){ - return clientSession.getStatistics(); - } - - public long getSocketID() - { - //cd - return clientSession.getSocketID(); - } - - /** - * ͬر - * ȴݷɺٹر - * ֻȴ10ss - */ - public synchronized void close() - { - close=true; - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - if(clientSession.getSocket().getSender().isSenderEmpty()) - { - - } - } - - } - - }); - } - - } - - public boolean isClose() - { - return close; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7/d084703024ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/7/d084703024ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 9c4ef51..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7/d084703024ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,233 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData= PackagetSub.split(data); - for(int i=0;i fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/70/907af0871eac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/70/907af0871eac001710ff8a7c6bda0fb8 deleted file mode 100644 index ce762a1..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/70/907af0871eac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,28 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -/** - * @author jinyu - * - */ -public class PackagetCombin { - private static ConcurrentHashMap hash=new ConcurrentHashMap(); -public DataStruct addData(byte[] data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - DataStruct struct=hash.get(id); - if(struct==null) - { - struct=new DataStruct(num); - hash.put(id, struct); - } - struct.addData(data); - return struct; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/71/3084b6db9aad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/71/3084b6db9aad0017181ed9113883eda9 deleted file mode 100644 index 1db08e7..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/71/3084b6db9aad0017181ed9113883eda9 +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - */ -package net.File; - -import java.util.logging.Logger; - -import net.File.FileMonitor; -import net.File.FilesWatch; - - - - -/** - * @author jinyu - * - */ -public class TestSendFiles { - private static Logger log=Logger.getLogger(TestSendFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //SendFiles send=new SendFiles("192.168.9.152", 5555); - //192.168.30.128 - SendFiles send=new SendFiles("127.0.0.1", 5555); - FilesWatch watch=new FilesWatch(); - String dir="F:/monitor"; - watch.setWatch(dir); - watch.start(); - while(true) - { - FileMonitor ff= watch.take(); - log.info(ff.file); - if(ff.file.endsWith(".tmp")) - { - continue; - } - send.sendFile(dir+"/"+ff.file); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/71/5038a5acd5ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/71/5038a5acd5ac001716b9ca6d5abb90bc deleted file mode 100644 index 668bd85..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/71/5038a5acd5ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,264 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡ - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(islagerRead) - { - // cd Ϊݶȡ׼ - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - } - else - { - buffer[insert]=data; - numValidChunks.incrementAndGet(); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/71/604351d567a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/71/604351d567a800171a8482560d609ceb deleted file mode 100644 index 09568a3..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/71/604351d567a800171a8482560d609ceb +++ /dev/null @@ -1,70 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public UDTSocket getSocket() -{ - - int index=-1; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(index==-1) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳ - i=-1;//± - index=i; - } - } - else - { - // - if(i==index) - { - continue; - } - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - return null; - -} -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/71/60903e2466a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/71/60903e2466a800171a8482560d609ceb deleted file mode 100644 index bb5667c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/71/60903e2466a800171a8482560d609ceb +++ /dev/null @@ -1,45 +0,0 @@ -/** - * - */ -package judp; - -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public UDTSocket getSocket() -{ - for( int i = 0 ; i < list.size() ; i++) { - if(list.get(i).getInputStream().isHasData()) - { - return list.get(i); - } - } - return null; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/71/80add8d6d7ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/71/80add8d6d7ac001716b9ca6d5abb90bc deleted file mode 100644 index cef47cd..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/71/80add8d6d7ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,143 +0,0 @@ -/** - * - */ -package judp; - -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -//private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private boolean isRWMaster=true;//Ĭֵһ -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} - -/** - * - * @param port ˿ - */ -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - * @param localIP IP - * @param port ˿ - */ -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} -/** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * islagerRead=true - * @param isRead - */ -public void resetBufMaster(boolean isRead) -{ - this.isRWMaster=isRead; - -} - -/** - * ôݶȡ - * Ĭ false - * @param islarge - */ -public void setLargeRead(boolean islarge) -{ - this.isRWMaster=islarge; -} -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=SocketControls.getInstance().getSocket(); - } - judpSocket jsocket=new judpSocket(socket); - judpSocketManager.getInstance(socket.getEndpoint()).addSocket(jsocket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/71/b04f3e4167a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/71/b04f3e4167a800171a8482560d609ceb deleted file mode 100644 index c639eca..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/71/b04f3e4167a800171a8482560d609ceb +++ /dev/null @@ -1,66 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public UDTSocket getSocket() -{ - UDTSocket find=null; - int index=0; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(find==null) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳر - find=list.get(i); - i=-1;//± - } - } - else - { - // - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - return null; - -} -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/72/10921d306fa800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/72/10921d306fa800171a8482560d609ceb deleted file mode 100644 index 304fccf..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/72/10921d306fa800171a8482560d609ceb +++ /dev/null @@ -1,115 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.TimeUnit; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); -// private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - int num=0; - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - num++; - // - if(!list.isEmpty()) - { - for(int i=0;i list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public judpGroupSocket getSocket() -{ - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/72/f02fa8b892ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/72/f02fa8b892ad0017181ed9113883eda9 deleted file mode 100644 index 476638b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/72/f02fa8b892ad0017181ed9113883eda9 +++ /dev/null @@ -1,503 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) - { - //ȵǰͰ cd - - lastAckSequenceNumber=ackNumber; - } - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/73/00abaea82bac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/73/00abaea82bac001710ff8a7c6bda0fb8 deleted file mode 100644 index cefffa2..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/73/00abaea82bac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,88 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] buffer=null; -public long id; -private volatile int num=0; -private volatile int sum=0; -private byte[] result=null; -public DataStruct(int num) -{ - buffer=new byte[num][]; -} - -/** - * - * @return - */ -private boolean check() -{ - if(num>=buffer.length) - { - //ɹ - if(sum==dataLen) - { - //ʼ - result=new byte[dataLen]; - ByteBuffer cur=ByteBuffer.wrap(result); - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - log.info(":"+sum); - TimeUnit.SECONDS.sleep(1); - } - client.close(); - dis.close(); - log.info("ɣ"+f.getName()); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/74/3091ac6c7fad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/74/3091ac6c7fad0017181ed9113883eda9 deleted file mode 100644 index b61d81d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/74/3091ac6c7fad0017181ed9113883eda9 +++ /dev/null @@ -1,191 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.DatagramPacket; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.KeepAlive; -import udt.packets.Shutdown; - -/** - * server side session in client-server mode - */ -public class ServerSession extends UDTSession { - - private static final Logger logger=Logger.getLogger(ServerSession.class.getName()); - - private final UDPEndPoint endPoint; - - //last received packet (for testing purposes) - private UDTPacket lastPacket; - - - public ServerSession(DatagramPacket dp, UDPEndPoint endPoint)throws SocketException,UnknownHostException{ - super("ServerSession localPort="+endPoint.getLocalPort()+" peer="+dp.getAddress()+":"+dp.getPort(),new Destination(dp.getAddress(),dp.getPort())); - this.endPoint=endPoint; - logger.info("Created "+toString()+" talking to "+dp.getAddress()+":"+dp.getPort()); - } - - int n_handshake=0; - - @Override - public void received(UDTPacket packet, Destination peer){ - lastPacket=packet; - - if(packet instanceof ConnectionHandshake) { - ConnectionHandshake connectionHandshake=(ConnectionHandshake)packet; - logger.info("Received "+connectionHandshake); - - if (getState()<=ready){ - destination.setSocketID(connectionHandshake.getSocketID()); - - if(getState()<=handshaking){ - setState(handshaking); - } - try{ - handleHandShake(connectionHandshake); - n_handshake++; - try{ - setState(ready); - socket=new UDTSocket(endPoint, this); - cc.init(); - }catch(Exception uhe){ - //session is invalid - logger.log(Level.SEVERE,"",uhe); - setState(invalid); - } - }catch(IOException ex){ - //session invalid - logger.log(Level.WARNING,"Error processing ConnectionHandshake",ex); - setState(invalid); - } - return; - } - - }else if(packet instanceof KeepAlive) { - socket.getReceiver().resetEXPTimer(); - active = true; - return; - } - - if(getState()== ready) { - active = true; - - if (packet instanceof KeepAlive) { - //nothing to do here - return; - }else if (packet instanceof Shutdown) { - try{ - socket.getReceiver().stop(); - }catch(IOException ex){ - logger.log(Level.WARNING,"",ex); - } - setState(shutdown); - System.out.println("SHUTDOWN ***"); - active = false; - logger.info("Connection shutdown initiated by the other side."); - return; - } - - else{ - try{ - - if(packet.forSender()){ - socket.getSender().receive(packet); - }else{ - socket.getReceiver().receive(packet); - } - }catch(Exception ex){ - //session invalid - logger.log(Level.SEVERE,"",ex); - setState(invalid); - } - } - return; - - } - - - } - - /** - * for testing use only - */ - UDTPacket getLastPacket(){ - return lastPacket; - } - - /** - * handle the connection handshake:
- *
    - *
  • set initial sequence number
  • - *
  • send response handshake
  • - *
- * @param handshake - * @param peer - * @throws IOException - */ - protected void handleHandShake(ConnectionHandshake handshake)throws IOException{ - ConnectionHandshake responseHandshake = new ConnectionHandshake(); - //compare the packet size and choose minimun - long clientBufferSize=handshake.getPacketSize(); - long myBufferSize=getDatagramSize(); - long bufferSize=Math.min(clientBufferSize, myBufferSize); - long initialSequenceNumber=handshake.getInitialSeqNo(); - setInitialSequenceNumber(initialSequenceNumber); - setDatagramSize((int)bufferSize); - responseHandshake.setPacketSize(bufferSize); - responseHandshake.setUdtVersion(4); - responseHandshake.setInitialSeqNo(initialSequenceNumber); - responseHandshake.setConnectionType(-1); - responseHandshake.setMaxFlowWndSize(handshake.getMaxFlowWndSize()); - //tell peer what the socket ID on this side is - responseHandshake.setSocketID(mySocketID); - responseHandshake.setDestinationID(this.getDestination().getSocketID()); - responseHandshake.setSession(this); - logger.info("Sending reply "+responseHandshake); - endPoint.doSend(responseHandshake); - } - - - - -} - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/74/70995f1f6da800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/74/70995f1f6da800171a8482560d609ceb deleted file mode 100644 index 9361825..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/74/70995f1f6da800171a8482560d609ceb +++ /dev/null @@ -1,42 +0,0 @@ -/** - * ļTestRecFile.java - * - * 汾Ϣ - * ڣ2017827 - * Copyright Corporation 2017 - * Ȩ - * - */ -package Test; - -import java.io.IOException; - -import judp.judpRecviceFile; - -/** - * - * Ŀƣjudp - * ƣTestRecFile - * - * ˣjinyu - * ʱ䣺2017827 6:32:42 - * ޸ˣjinyu - * ޸ʱ䣺2017827 6:32:42 - * ޸ıע - * @version - * - */ -public class TestRecFiles { - - public static void main(String[] args) { - judpRecviceFile rec=new judpRecviceFile("127.0.0.1", 5555, "E:\\Study\\java\\filesudt\\send\\12.rmvb", "E:\\Study\\java\\filesudt\\rec\\1.rmvb"); - rec.start(); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/74/a0ba2744b2ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/74/a0ba2744b2ac001716b9ca6d5abb90bc deleted file mode 100644 index bb7eedd..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/74/a0ba2744b2ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,191 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.DatagramPacket; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.KeepAlive; -import udt.packets.Shutdown; - -/** - * server side session in client-server mode - */ -public class ServerSession extends UDTSession { - - private static final Logger logger=Logger.getLogger(ServerSession.class.getName()); - - private final UDPEndPoint endPoint; - - //last received packet (for testing purposes) - private UDTPacket lastPacket; - - - public ServerSession(DatagramPacket dp, UDPEndPoint endPoint)throws SocketException,UnknownHostException{ - super("ServerSession localPort="+endPoint.getLocalPort()+" peer="+dp.getAddress()+":"+dp.getPort(),new Destination(dp.getAddress(),dp.getPort())); - this.endPoint=endPoint; - logger.info("Created "+toString()+" talking to "+dp.getAddress()+":"+dp.getPort()); - } - - int n_handshake=0; - - @Override - public void received(UDTPacket packet, Destination peer){ - lastPacket=packet; - - if(packet instanceof ConnectionHandshake) { - ConnectionHandshake connectionHandshake=(ConnectionHandshake)packet; - logger.info("Received "+connectionHandshake); - - if (getState()<=ready){ - destination.setSocketID(connectionHandshake.getSocketID()); - - if(getState()<=handshaking){ - setState(handshaking); - } - try{ - handleHandShake(connectionHandshake); - n_handshake++; - try{ - setState(ready); - socket=new UDTSocket(endPoint, this); - cc.init(); - }catch(Exception uhe){ - //session is invalid - logger.log(Level.SEVERE,"",uhe); - setState(invalid); - } - }catch(IOException ex){ - //session invalid - logger.log(Level.WARNING,"Error processing ConnectionHandshake",ex); - setState(invalid); - } - return; - } - - }else if(packet instanceof KeepAlive) { - socket.getReceiver().resetEXPTimer(); - active = true; - return; - } - - if(getState()== ready) { - active = true; - - if (packet instanceof KeepAlive) { - //nothing to do here - return; - }else if (packet instanceof Shutdown) { - try{ - socket.getReceiver().stop(); - }catch(IOException ex){ - logger.log(Level.WARNING,"",ex); - } - setState(shutdown); - System.out.println("SHUTDOWN ***"); - active = false; - logger.info("Connection shutdown initiated by the other side."); - return; - } - - else{ - try{ - logger.info("DataPacket:"+p.getPacketSequenceNumber()); - if(packet.forSender()){ - socket.getSender().receive(packet); - }else{ - socket.getReceiver().receive(packet); - } - }catch(Exception ex){ - //session invalid - logger.log(Level.SEVERE,"",ex); - setState(invalid); - } - } - return; - - } - - - } - - /** - * for testing use only - */ - UDTPacket getLastPacket(){ - return lastPacket; - } - - /** - * handle the connection handshake:
- *
    - *
  • set initial sequence number
  • - *
  • send response handshake
  • - *
- * @param handshake - * @param peer - * @throws IOException - */ - protected void handleHandShake(ConnectionHandshake handshake)throws IOException{ - ConnectionHandshake responseHandshake = new ConnectionHandshake(); - //compare the packet size and choose minimun - long clientBufferSize=handshake.getPacketSize(); - long myBufferSize=getDatagramSize(); - long bufferSize=Math.min(clientBufferSize, myBufferSize); - long initialSequenceNumber=handshake.getInitialSeqNo(); - setInitialSequenceNumber(initialSequenceNumber); - setDatagramSize((int)bufferSize); - responseHandshake.setPacketSize(bufferSize); - responseHandshake.setUdtVersion(4); - responseHandshake.setInitialSeqNo(initialSequenceNumber); - responseHandshake.setConnectionType(-1); - responseHandshake.setMaxFlowWndSize(handshake.getMaxFlowWndSize()); - //tell peer what the socket ID on this side is - responseHandshake.setSocketID(mySocketID); - responseHandshake.setDestinationID(this.getDestination().getSocketID()); - responseHandshake.setSession(this); - logger.info("Sending reply "+responseHandshake); - endPoint.doSend(responseHandshake); - } - - - - -} - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/74/b065917426ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/74/b065917426ac001710ff8a7c6bda0fb8 deleted file mode 100644 index db39f83..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/74/b065917426ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,87 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=16; - public static byte[][] splitData(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;ihandoffQueue; - - private Thread receiverThread; - - private volatile boolean stopped=false; - - //(optional) ack interval (see CongestionControl interface) - private volatile long ackInterval=-1; - - /** - * if set to true connections will not expire, but will only be - * closed by a Shutdown message - */ - public static boolean connectionExpiryDisabled=false; - - private final boolean storeStatistics; - - - - /** - * create a receiver with a valid {@link UDTSession} - * @param session - */ - public UDTReceiver(UDTSession session,UDPEndPoint endpoint){ - this.endpoint = endpoint; - this.session=session; - this.sessionUpSince=System.currentTimeMillis(); - this.statistics=session.getStatistics(); - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - ackHistoryWindow = new AckHistoryWindow(16); - packetHistoryWindow = new PacketHistoryWindow(16); - receiverLossList = new ReceiverLossList(); - packetPairWindow = new PacketPairWindow(16); - largestReceivedSeqNumber=session.getInitialSequenceNumber()-1; - bufferSize=session.getReceiveBufferSize(); - handoffQueue=new ArrayBlockingQueue(4*session.getFlowWindowSize()); - storeStatistics=Boolean.getBoolean("udt.receiver.storeStatistics"); - initMetrics(); - start(); - } - - private MeanValue dgReceiveInterval; - private MeanValue dataPacketInterval; - private MeanValue processTime; - private MeanValue dataProcessTime; - private void initMetrics(){ - if(!storeStatistics)return; - dgReceiveInterval=new MeanValue("UDT receive interval"); - statistics.addMetric(dgReceiveInterval); - dataPacketInterval=new MeanValue("Data packet interval"); - statistics.addMetric(dataPacketInterval); - processTime=new MeanValue("UDT packet process time"); - statistics.addMetric(processTime); - dataProcessTime=new MeanValue("Data packet process time"); - statistics.addMetric(dataProcessTime); - } - - - //starts the sender algorithm - private void start(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - nextACK=Util.getCurrentTime()+ackTimerInterval; - nextNAK=(long)(Util.getCurrentTime()+1.5*nakTimerInterval); - nextEXP=Util.getCurrentTime()+2*expTimerInterval; - ackInterval=session.getCongestionControl().getAckInterval(); - while(!stopped){ - receiverAlgorithm(); - } - } - catch(Exception ex){ - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING RECEIVER for "+session); - } - }; - receiverThread=UDTThreadFactory.get().newThread(r); - receiverThread.start(); - } - - /* - * packets are written by the endpoint - */ - protected void receive(UDTPacket p)throws IOException{ - if(storeStatistics)dgReceiveInterval.end(); - handoffQueue.offer(p); - if(storeStatistics)dgReceiveInterval.begin(); - } - - /** - * receiver algorithm - * see specification P11. - */ - public void receiverAlgorithm()throws InterruptedException,IOException{ - //check ACK timer - long currentTime=Util.getCurrentTime(); - if(nextACKseqNumbers=receiverLossList.getFilteredSequenceNumbers(roundTripTime,true); - sendNAK(seqNumbers); - } - - /** - * process EXP event (see spec. p 13) - */ - protected void processEXPEvent()throws IOException{ - if(session.getSocket()==null)return; - UDTSender sender=session.getSocket().getSender(); - //put all the unacknowledged packets in the senders loss list - sender.putUnacknowledgedPacketsIntoLossList(); - if(expCount>16 && System.currentTimeMillis()-sessionUpSince > IDLE_TIMEOUT){ - if(!connectionExpiryDisabled &&!stopped){ - sendShutdown(); - stop(); - logger.info("Session "+session+" expired."); - return; - } - } - if(!sender.haveLostPackets()){ - sendKeepAlive(); - } - expCount++; - } - - protected void processUDTPacket(UDTPacket p)throws IOException{ - //(3).Check the packet type and process it according to this. - - if(!p.isControlPacket()){ - DataPacket dp=(DataPacket)p; - if(storeStatistics){ - dataPacketInterval.end(); - dataProcessTime.begin(); - } - onDataPacketReceived(dp); - if(storeStatistics){ - dataProcessTime.end(); - dataPacketInterval.begin(); - } - - } - - else if (p.getControlPacketType()==ControlPacketType.ACK2.ordinal()){ - Acknowledgment2 ack2=(Acknowledgment2)p; - onAck2PacketReceived(ack2); - } - - else if (p instanceof Shutdown){ - onShutdown(); - } - - } - - //every nth packet will be discarded... for testing only of course - public static int dropRate=0; - - //number of received data packets - private int n=0; - - protected void onDataPacketReceived(DataPacket dp)throws IOException{ - long currentSequenceNumber = dp.getPacketSequenceNumber(); - - //for TESTING : check whether to drop this packet -// n++; -// //if(dropRate>0 && n % dropRate == 0){ -// if(n % 1111 == 0){ -// logger.info("**** TESTING:::: DROPPING PACKET "+currentSequenceNumber+" FOR TESTING"); -// return; -// } -// //} - boolean OK=session.getSocket().getInputStream().haveNewData(currentSequenceNumber,dp.getData()); - if(!OK){ - logger.info("haveNewData:ʧ"); - //need to drop packet... - return; - } - - long currentDataPacketArrivalTime = Util.getCurrentTime(); - - /*(4).if the seqNo of the current data packet is 16n+1,record the - time interval between this packet and the last data packet - in the packet pair window*/ - if((currentSequenceNumber%16)==1 && lastDataPacketArrivalTime>0){ - long interval=currentDataPacketArrivalTime -lastDataPacketArrivalTime; - packetPairWindow.add(interval); - } - - //(5).record the packet arrival time in the PKT History Window. - packetHistoryWindow.add(currentDataPacketArrivalTime); - - - //store current time - lastDataPacketArrivalTime=currentDataPacketArrivalTime; - logger.info("largestReceivedSeqNumber:"+largestReceivedSeqNumber); - - //(6).number of detected lossed packet - /*(6.a).if the number of the current data packet is greater than LSRN+1, - put all the sequence numbers between (but excluding) these two values - into the receiver's loss list and send them to the sender in an NAK packet*/ - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber+1)>0){ - sendNAK(currentSequenceNumber); - - } - else if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)<0){ - /*(6.b).if the sequence number is less than LRSN,remove it from - * the receiver's loss list - */ - receiverLossList.remove(currentSequenceNumber); - logger.info("receiverLossList remove:"+currentSequenceNumber); - } - - statistics.incNumberOfReceivedDataPackets(); - - //(7).Update the LRSN - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)>0){ - largestReceivedSeqNumber=currentSequenceNumber; - } - - //(8) need to send an ACK? Some cc algorithms use this - if(ackInterval>0){ - if(n % ackInterval == 0)processACKEvent(false); - } - } - - /** - * write a NAK triggered by a received sequence number that is larger than - * the largestReceivedSeqNumber + 1 - * @param currentSequenceNumber - the currently received sequence number - * @throws IOException - */ - protected void sendNAK(long currentSequenceNumber)throws IOException{ - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(largestReceivedSeqNumber+1, currentSequenceNumber); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - //put all the sequence numbers between (but excluding) these two values into the - //receiver loss list - for(long i=largestReceivedSeqNumber+1;isequenceNumbers)throws IOException{ - if(sequenceNumbers.size()==0)return; - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(sequenceNumbers); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(nAckPacket); - statistics.incNumberOfNAKSent(); - - } - - protected long sendLightAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt=buildLightAcknowledgement(ackNumber); - endpoint.doSend(acknowledgmentPkt); - statistics.incNumberOfACKSent(); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - protected long sendAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); - //set the estimate link capacity - estimateLinkCapacity=packetPairWindow.getEstimatedLinkCapacity(); - acknowledgmentPkt.setEstimatedLinkCapacity(estimateLinkCapacity); - //set the packet arrival rate - packetArrivalSpeed=packetHistoryWindow.getPacketArrivalSpeed(); - acknowledgmentPkt.setPacketReceiveRate(packetArrivalSpeed); - - endpoint.doSend(acknowledgmentPkt); - - statistics.incNumberOfACKSent(); - statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - //builds a "light" Acknowledgement - private Acknowledgement buildLightAcknowledgement(long ackNumber){ - Acknowledgement acknowledgmentPkt = new Acknowledgement(); - //the packet sequence number to which all the packets have been received - acknowledgmentPkt.setAckNumber(ackNumber); - //assign this ack a unique increasing ACK sequence number - acknowledgmentPkt.setAckSequenceNumber(++ackSequenceNumber); - acknowledgmentPkt.setRoundTripTime(roundTripTime); - acknowledgmentPkt.setRoundTripTimeVar(roundTripTimeVar); - //set the buffer size - acknowledgmentPkt.setBufferSize(bufferSize); - - acknowledgmentPkt.setDestinationID(session.getDestination().getSocketID()); - acknowledgmentPkt.setSession(session); - - return acknowledgmentPkt; - } - - /** - * spec p. 13:
- 1) Locate the related ACK in the ACK History Window according to the - ACK sequence number in this ACK2.
- 2) Update the largest ACK number ever been acknowledged.
- 3) Calculate new rtt according to the ACK2 arrival time and the ACK - departure time, and update the RTT value as: RTT = (RTT * 7 + - rtt) / 8.
- 4) Update RTTVar by: RTTVar = (RTTVar * 3 + abs(RTT - rtt)) / 4.
- 5) Update both ACK and NAK period to 4 * RTT + RTTVar + SYN.
- */ - protected void onAck2PacketReceived(Acknowledgment2 ack2){ - AckHistoryEntry entry=ackHistoryWindow.getEntry(ack2.getAckSequenceNumber()); - if(entry!=null){ - long ackNumber=entry.getAckNumber(); - largestAcknowledgedAckNumber=Math.max(ackNumber, largestAcknowledgedAckNumber); - - long rtt=entry.getAge(); - if(roundTripTime>0)roundTripTime = (roundTripTime*7 + rtt)/8; - else roundTripTime = rtt; - roundTripTimeVar = (roundTripTimeVar* 3 + Math.abs(roundTripTimeVar- rtt)) / 4; - ackTimerInterval=4*roundTripTime+roundTripTimeVar+Util.getSYNTime(); - nakTimerInterval=ackTimerInterval; - statistics.setRTT(roundTripTime, roundTripTimeVar); - } - } - - protected void sendKeepAlive()throws IOException{ - KeepAlive ka=new KeepAlive(); - ka.setDestinationID(session.getDestination().getSocketID()); - ka.setSession(session); - endpoint.doSend(ka); - } - - protected void sendShutdown()throws IOException{ - Shutdown s=new Shutdown(); - s.setDestinationID(session.getDestination().getSocketID()); - s.setSession(session); - endpoint.doSend(s); - } - - private volatile long ackSequenceNumber=0; - - protected void resetEXPTimer(){ - nextEXP=Util.getCurrentTime()+expTimerInterval; - expCount=0; - } - - protected void resetEXPCount(){ - expCount=0; - } - - public void setAckInterval(long ackInterval){ - this.ackInterval=ackInterval; - } - - protected void onShutdown()throws IOException{ - stop(); - } - - public void stop()throws IOException{ - stopped=true; - session.getSocket().close(); - //stop our sender as well - session.getSocket().getSender().stop(); - } - - @Override - public String toString(){ - StringBuilder sb=new StringBuilder(); - sb.append("UDTReceiver ").append(session).append("\n"); - sb.append("LossList: "+receiverLossList); - return sb.toString(); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/75/a0430dbae1ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/75/a0430dbae1ac001716b9ca6d5abb90bc deleted file mode 100644 index 778d49f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/75/a0430dbae1ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,149 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=10*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - long startTime=System.currentTimeMillis(); - while((count=dis.read(buf,0, bufSize))!=-1) - { - - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - - } - - } - long endTime=System.currentTimeMillis(); - client.close(); - dis.close(); - long speed=fLen/((endTime-startTime)/1000); - log.info("ɣ"+f.getName()+",ƽٶ(M/S)"+speed/1024/1024); - - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/75/b0a223eb03ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/75/b0a223eb03ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 532b638..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/75/b0a223eb03ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,70 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private LinkedBlockingQueue> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡҲҪⲿٶȡ - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(islagerRead) - { - // cd Ϊݶȡ׼ - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - } - else - { - //ԭ룬Сݽȫ - buffer[insert]=data; - numValidChunks.incrementAndGet(); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - - if(this.islagerRead) - { - //cd - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(this.islagerRead) - { - // cd - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - - if(readPosition==size) - {readPosition=0; - if(this.islagerRead) - { - //cd - clearDeHash(this.size-leftNum); - } - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } - - /** - * ôݶȡ - * @param islarge - */ - public void setlargeRead(boolean islarge) - { - this.islagerRead=islarge; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/77/403c36a21aac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/77/403c36a21aac001710ff8a7c6bda0fb8 deleted file mode 100644 index eed32b4..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/77/403c36a21aac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,12 +0,0 @@ -/** - * - */ -package judp; - -/** - * @author jinyu - * - */ -public class DataStruct { - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/78/10e15310c3ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/78/10e15310c3ad0017181ed9113883eda9 deleted file mode 100644 index 8d9a372..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/78/10e15310c3ad0017181ed9113883eda9 +++ /dev/null @@ -1,525 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;s0) - { - - if(lastAckSequenceNumber/10000!=ackNumber/10000) - { - client.connectNum--; - logger.info("lastAckSequenceNumber"+ackNumber); - // - //ackNumber رȫɾرСһɾ - if(lastAckSequenceNumberthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - // - } - } - } - } - - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/78/8067edbee4ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/78/8067edbee4ac001716b9ca6d5abb90bc deleted file mode 100644 index fd792ee..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/78/8067edbee4ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,229 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData(byte[] data) - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - byte[]tmp=recQueue.poll(); - if(tmp==null) - { - TimeUnit.MILLISECONDS.sleep(100); - } - if(writeFile(tmp)) - { - ss.close(); - break; - } - } - - } - - }); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/78/9086b899d8ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/78/9086b899d8ac001716b9ca6d5abb90bc deleted file mode 100644 index 22b9ccb..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/78/9086b899d8ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,152 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -//private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private boolean isRWMaster=true;//Ĭֵһ -private boolean islagerRead=false; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} - -/** - * - * @param port ˿ - */ -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - * @param localIP IP - * @param port ˿ - */ -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - try { - csocket.getInputStream().setLargeRead(islagerRead); - csocket.getInputStream().resetBufMaster(isRWMaster); - } catch (IOException e) { - e.printStackTrace(); - } - - SocketControls.getInstance().addSocket(csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} -/** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * islagerRead=true - * @param isRead - */ -public void resetBufMaster(boolean isRead) -{ - this.isRWMaster=isRead; - -} - -/** - * ôݶȡ - * Ĭ false - * @param islarge - */ -public void setLargeRead(boolean islarge) -{ - this.islagerRead=islarge; -} -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=SocketControls.getInstance().getSocket(); - } - judpSocket jsocket=new judpSocket(socket); - judpSocketManager.getInstance(socket.getEndpoint()).addSocket(jsocket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/78/b07ba83069a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/78/b07ba83069a800171a8482560d609ceb deleted file mode 100644 index 39f7363..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/78/b07ba83069a800171a8482560d609ceb +++ /dev/null @@ -1,91 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - // - if(!list.isEmpty()) - { - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - while((count=dis.read(buf,0, bufSize))!=-1) - { - log.info("1:"); - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - log.info(":"+sum); - - } - client.close(); - dis.close(); - log.info("ɣ"+f.getName()); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7a/60f5446d26ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/7a/60f5446d26ac001710ff8a7c6bda0fb8 deleted file mode 100644 index ca3ae6b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7a/60f5446d26ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,87 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=16; - public static byte[][] splitData(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - while((k = (SocketReference) q.remove()) != null) { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - private void startThread() { - - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7c/00baf1751bac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/7c/00baf1751bac001710ff8a7c6bda0fb8 deleted file mode 100644 index fe052ed..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7c/00baf1751bac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,14 +0,0 @@ -/** - * - */ -package judp; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[] data; -public long id; -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7c/708d70c31aac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/7c/708d70c31aac001710ff8a7c6bda0fb8 deleted file mode 100644 index e69de29..0000000 diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7c/f009da97d5ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/7c/f009da97d5ac001716b9ca6d5abb90bc deleted file mode 100644 index 662c22b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7c/f009da97d5ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,255 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡ - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7d/50c2175e68a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/7d/50c2175e68a800171a8482560d609ceb deleted file mode 100644 index 8355492..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7d/50c2175e68a800171a8482560d609ceb +++ /dev/null @@ -1,78 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public UDTSocket getSocket() -{ - - int index=-1; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(index==-1) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳ - i=-1;//± - index=i; - } - } - else - { - // - if(i==index) - { - continue; - } - else - { - list.get(i).close(); - long id=list.get(i).getSession().getSocketID(); - list.get(i).getEndpoint().removeSession(id); - list.get(i).getReceiver().stop(); - list.get(i).getSender().stop(); - } - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - return null; - -} -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7d/50df241c27ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/7d/50df241c27ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 00bab17..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7d/50df241c27ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,328 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public boolean getCloseState() -{ - return isClose; -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(isClose) - { - return false; - } - byte[][]result=PackagetSub.split(data); - for(int i=0;ihandoffQueue; - - private Thread receiverThread; - - private volatile boolean stopped=false; - - //(optional) ack interval (see CongestionControl interface) - private volatile long ackInterval=-1; - - /** - * if set to true connections will not expire, but will only be - * closed by a Shutdown message - */ - public static boolean connectionExpiryDisabled=false; - - private final boolean storeStatistics; - - - - /** - * create a receiver with a valid {@link UDTSession} - * @param session - */ - public UDTReceiver(UDTSession session,UDPEndPoint endpoint){ - this.endpoint = endpoint; - this.session=session; - this.sessionUpSince=System.currentTimeMillis(); - this.statistics=session.getStatistics(); - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - ackHistoryWindow = new AckHistoryWindow(16); - packetHistoryWindow = new PacketHistoryWindow(16); - receiverLossList = new ReceiverLossList(); - packetPairWindow = new PacketPairWindow(16); - largestReceivedSeqNumber=session.getInitialSequenceNumber()-1; - bufferSize=session.getReceiveBufferSize(); - handoffQueue=new ArrayBlockingQueue(4*session.getFlowWindowSize()); - storeStatistics=Boolean.getBoolean("udt.receiver.storeStatistics"); - initMetrics(); - start(); - } - - private MeanValue dgReceiveInterval; - private MeanValue dataPacketInterval; - private MeanValue processTime; - private MeanValue dataProcessTime; - private void initMetrics(){ - if(!storeStatistics)return; - dgReceiveInterval=new MeanValue("UDT receive interval"); - statistics.addMetric(dgReceiveInterval); - dataPacketInterval=new MeanValue("Data packet interval"); - statistics.addMetric(dataPacketInterval); - processTime=new MeanValue("UDT packet process time"); - statistics.addMetric(processTime); - dataProcessTime=new MeanValue("Data packet process time"); - statistics.addMetric(dataProcessTime); - } - - - //starts the sender algorithm - private void start(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - nextACK=Util.getCurrentTime()+ackTimerInterval; - nextNAK=(long)(Util.getCurrentTime()+1.5*nakTimerInterval); - nextEXP=Util.getCurrentTime()+2*expTimerInterval; - ackInterval=session.getCongestionControl().getAckInterval(); - while(!stopped){ - receiverAlgorithm(); - } - } - catch(Exception ex){ - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING RECEIVER for "+session); - } - }; - receiverThread=UDTThreadFactory.get().newThread(r); - receiverThread.start(); - } - - /* - * packets are written by the endpoint - */ - protected void receive(UDTPacket p)throws IOException{ - if(storeStatistics)dgReceiveInterval.end(); - handoffQueue.offer(p); - if(storeStatistics)dgReceiveInterval.begin(); - } - - /** - * receiver algorithm - * see specification P11. - */ - public void receiverAlgorithm()throws InterruptedException,IOException{ - //check ACK timer - long currentTime=Util.getCurrentTime(); - if(nextACKseqNumbers=receiverLossList.getFilteredSequenceNumbers(roundTripTime,true); - sendNAK(seqNumbers); - } - - /** - * process EXP event (see spec. p 13) - */ - protected void processEXPEvent()throws IOException{ - if(session.getSocket()==null)return; - UDTSender sender=session.getSocket().getSender(); - //put all the unacknowledged packets in the senders loss list - sender.putUnacknowledgedPacketsIntoLossList(); - if(expCount>16 && System.currentTimeMillis()-sessionUpSince > IDLE_TIMEOUT){ - if(!connectionExpiryDisabled &&!stopped){ - sendShutdown(); - stop(); - logger.info("Session "+session+" expired."); - return; - } - } - if(!sender.haveLostPackets()){ - sendKeepAlive(); - } - expCount++; - } - - protected void processUDTPacket(UDTPacket p)throws IOException{ - //(3).Check the packet type and process it according to this. - - if(!p.isControlPacket()){ - DataPacket dp=(DataPacket)p; - if(storeStatistics){ - dataPacketInterval.end(); - dataProcessTime.begin(); - } - onDataPacketReceived(dp); - if(storeStatistics){ - dataProcessTime.end(); - dataPacketInterval.begin(); - } - logger.info("DataPacket udt:"+p.getPacketSequenceNumber()); - } - - else if (p.getControlPacketType()==ControlPacketType.ACK2.ordinal()){ - Acknowledgment2 ack2=(Acknowledgment2)p; - onAck2PacketReceived(ack2); - } - - else if (p instanceof Shutdown){ - onShutdown(); - } - - } - - //every nth packet will be discarded... for testing only of course - public static int dropRate=0; - - //number of received data packets - private int n=0; - - protected void onDataPacketReceived(DataPacket dp)throws IOException{ - long currentSequenceNumber = dp.getPacketSequenceNumber(); - - //for TESTING : check whether to drop this packet -// n++; -// //if(dropRate>0 && n % dropRate == 0){ -// if(n % 1111 == 0){ -// logger.info("**** TESTING:::: DROPPING PACKET "+currentSequenceNumber+" FOR TESTING"); -// return; -// } -// //} - boolean OK=session.getSocket().getInputStream().haveNewData(currentSequenceNumber,dp.getData()); - if(!OK){ - //need to drop packet... - return; - } - - long currentDataPacketArrivalTime = Util.getCurrentTime(); - - /*(4).if the seqNo of the current data packet is 16n+1,record the - time interval between this packet and the last data packet - in the packet pair window*/ - if((currentSequenceNumber%16)==1 && lastDataPacketArrivalTime>0){ - long interval=currentDataPacketArrivalTime -lastDataPacketArrivalTime; - packetPairWindow.add(interval); - } - - //(5).record the packet arrival time in the PKT History Window. - packetHistoryWindow.add(currentDataPacketArrivalTime); - - - //store current time - lastDataPacketArrivalTime=currentDataPacketArrivalTime; - - - //(6).number of detected lossed packet - /*(6.a).if the number of the current data packet is greater than LSRN+1, - put all the sequence numbers between (but excluding) these two values - into the receiver's loss list and send them to the sender in an NAK packet*/ - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber+1)>0){ - sendNAK(currentSequenceNumber); - } - else if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)<0){ - /*(6.b).if the sequence number is less than LRSN,remove it from - * the receiver's loss list - */ - receiverLossList.remove(currentSequenceNumber); - } - - statistics.incNumberOfReceivedDataPackets(); - - //(7).Update the LRSN - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)>0){ - largestReceivedSeqNumber=currentSequenceNumber; - } - - //(8) need to send an ACK? Some cc algorithms use this - if(ackInterval>0){ - if(n % ackInterval == 0)processACKEvent(false); - } - } - - /** - * write a NAK triggered by a received sequence number that is larger than - * the largestReceivedSeqNumber + 1 - * @param currentSequenceNumber - the currently received sequence number - * @throws IOException - */ - protected void sendNAK(long currentSequenceNumber)throws IOException{ - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(largestReceivedSeqNumber+1, currentSequenceNumber); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - //put all the sequence numbers between (but excluding) these two values into the - //receiver loss list - for(long i=largestReceivedSeqNumber+1;isequenceNumbers)throws IOException{ - if(sequenceNumbers.size()==0)return; - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(sequenceNumbers); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(nAckPacket); - statistics.incNumberOfNAKSent(); - } - - protected long sendLightAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt=buildLightAcknowledgement(ackNumber); - endpoint.doSend(acknowledgmentPkt); - statistics.incNumberOfACKSent(); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - protected long sendAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); - //set the estimate link capacity - estimateLinkCapacity=packetPairWindow.getEstimatedLinkCapacity(); - acknowledgmentPkt.setEstimatedLinkCapacity(estimateLinkCapacity); - //set the packet arrival rate - packetArrivalSpeed=packetHistoryWindow.getPacketArrivalSpeed(); - acknowledgmentPkt.setPacketReceiveRate(packetArrivalSpeed); - - endpoint.doSend(acknowledgmentPkt); - - statistics.incNumberOfACKSent(); - statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - //builds a "light" Acknowledgement - private Acknowledgement buildLightAcknowledgement(long ackNumber){ - Acknowledgement acknowledgmentPkt = new Acknowledgement(); - //the packet sequence number to which all the packets have been received - acknowledgmentPkt.setAckNumber(ackNumber); - //assign this ack a unique increasing ACK sequence number - acknowledgmentPkt.setAckSequenceNumber(++ackSequenceNumber); - acknowledgmentPkt.setRoundTripTime(roundTripTime); - acknowledgmentPkt.setRoundTripTimeVar(roundTripTimeVar); - //set the buffer size - acknowledgmentPkt.setBufferSize(bufferSize); - - acknowledgmentPkt.setDestinationID(session.getDestination().getSocketID()); - acknowledgmentPkt.setSession(session); - - return acknowledgmentPkt; - } - - /** - * spec p. 13:
- 1) Locate the related ACK in the ACK History Window according to the - ACK sequence number in this ACK2.
- 2) Update the largest ACK number ever been acknowledged.
- 3) Calculate new rtt according to the ACK2 arrival time and the ACK - departure time, and update the RTT value as: RTT = (RTT * 7 + - rtt) / 8.
- 4) Update RTTVar by: RTTVar = (RTTVar * 3 + abs(RTT - rtt)) / 4.
- 5) Update both ACK and NAK period to 4 * RTT + RTTVar + SYN.
- */ - protected void onAck2PacketReceived(Acknowledgment2 ack2){ - AckHistoryEntry entry=ackHistoryWindow.getEntry(ack2.getAckSequenceNumber()); - if(entry!=null){ - long ackNumber=entry.getAckNumber(); - largestAcknowledgedAckNumber=Math.max(ackNumber, largestAcknowledgedAckNumber); - - long rtt=entry.getAge(); - if(roundTripTime>0)roundTripTime = (roundTripTime*7 + rtt)/8; - else roundTripTime = rtt; - roundTripTimeVar = (roundTripTimeVar* 3 + Math.abs(roundTripTimeVar- rtt)) / 4; - ackTimerInterval=4*roundTripTime+roundTripTimeVar+Util.getSYNTime(); - nakTimerInterval=ackTimerInterval; - statistics.setRTT(roundTripTime, roundTripTimeVar); - } - } - - protected void sendKeepAlive()throws IOException{ - KeepAlive ka=new KeepAlive(); - ka.setDestinationID(session.getDestination().getSocketID()); - ka.setSession(session); - endpoint.doSend(ka); - } - - protected void sendShutdown()throws IOException{ - Shutdown s=new Shutdown(); - s.setDestinationID(session.getDestination().getSocketID()); - s.setSession(session); - endpoint.doSend(s); - } - - private volatile long ackSequenceNumber=0; - - protected void resetEXPTimer(){ - nextEXP=Util.getCurrentTime()+expTimerInterval; - expCount=0; - } - - protected void resetEXPCount(){ - expCount=0; - } - - public void setAckInterval(long ackInterval){ - this.ackInterval=ackInterval; - } - - protected void onShutdown()throws IOException{ - stop(); - } - - public void stop()throws IOException{ - stopped=true; - session.getSocket().close(); - //stop our sender as well - session.getSocket().getSender().stop(); - } - - @Override - public String toString(){ - StringBuilder sb=new StringBuilder(); - sb.append("UDTReceiver ").append(session).append("\n"); - sb.append("LossList: "+receiverLossList); - return sb.toString(); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7d/a00a34b931ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/7d/a00a34b931ac001710ff8a7c6bda0fb8 deleted file mode 100644 index ef16d27..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7d/a00a34b931ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,338 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public boolean getCloseState() -{ - //ײѾر - return isClose|socket.isClose(); -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(getCloseState) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(isClose) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;i0){ - return single[0]; - } - else { - return b; - } - } - - private AppData currentChunk=null; - //offset into currentChunk - int offset=0; - long id=-1; - @Override - public int read(byte[]target)throws IOException{ - try{ - int read=0; - updateCurrentChunk(false); - while(currentChunk!=null){ - byte[]data=currentChunk.data; - int length=Math.min(target.length-read,data.length-offset); - System.arraycopy(data, offset, target, read, length); - read+=length; - offset+=length; - //check if chunk has been fully read - if(offset>=data.length){ - currentChunk=null; - offset=0; - } - - //if no more space left in target, exit now - if(read==target.length){ - return read; - } - - updateCurrentChunk(blocking && read==0); - } - - if(read>0)return read; - if(closed)return -1; - if(expectMoreData.get() || !receiveBuffer.isEmpty())return 0; - //no more data - return -1; - - }catch(Exception ex){ - IOException e= new IOException(); - e.initCause(ex); - throw e; - } - } - - /** - * Reads the next valid chunk of application data from the queue
- * - * In blocking mode,this method will block until data is available or the socket is closed, - * otherwise it will wait for at most 10 milliseconds. - * - * @throws InterruptedException - */ - private void updateCurrentChunk(boolean block)throws IOException{ - if(currentChunk!=null)return; - - while(true){ - try{ - if(block){ - currentChunk=receiveBuffer.poll(1, TimeUnit.MILLISECONDS); - while (!closed && currentChunk==null){ - currentChunk=receiveBuffer.poll(1000, TimeUnit.MILLISECONDS); - } - } - else currentChunk=receiveBuffer.poll(10, TimeUnit.MILLISECONDS); - - }catch(InterruptedException ie){ - IOException ex=new IOException(); - ex.initCause(ie); - throw ex; - } - return; - } - } - - /** - * new application data - * @param data - * - */ - protected boolean haveNewData(long sequenceNumber,byte[]data)throws IOException{ - hasData=true; - return receiveBuffer.offer(new AppData(sequenceNumber,data)); - } - - @Override - public void close()throws IOException{ - if(closed)return; - closed=true; - noMoreData(); - } - - public UDTSocket getSocket(){ - return socket; - } - - /** - * sets the blocking mode - * @param block - */ - public void setBlocking(boolean block){ - this.blocking=block; - } - - public int getReceiveBufferSize(){ - return receiveBuffer.getSize(); - } - - /** - * notify the input stream that there is no more data - * @throws IOException - */ - protected void noMoreData()throws IOException{ - expectMoreData.set(false); - } - - /** - * жûݽ - * cd - * @return - */ - public boolean isHasData() - { - return hasData; - } - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * islagerRead=true - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - receiveBuffer.setBufMaster(isRead); - - } - - /** - * ôݶȡ - * Ĭ false - * @param islarge - */ - public void setLargeRead(boolean islarge) - { - receiveBuffer.setLargeRead(islarge); - } - /** - * used for storing application data and the associated - * sequence number in the queue in ascending order - */ - public static class AppData implements Comparable{ - final long sequenceNumber; - final byte[] data; - public AppData(long sequenceNumber, byte[]data){ - this.sequenceNumber=sequenceNumber; - this.data=data; - } - - @Override - public int compareTo(AppData o) { - return (int)(sequenceNumber-o.sequenceNumber); - } - - @Override - public String toString(){ - return sequenceNumber+"["+data.length+"]"; - } - - public long getSequenceNumber(){ - return sequenceNumber; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result - + (int) (sequenceNumber ^ (sequenceNumber >>> 32)); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - AppData other = (AppData) obj; - if (sequenceNumber != other.sequenceNumber) - return false; - return true; - } - - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7d/d043da1809ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/7d/d043da1809ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 5ae9543..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7d/d043da1809ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,98 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; - -import java.util.WeakHashMap; - -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - @SuppressWarnings("rawtypes") - private final ReferenceQueue q = new ReferenceQueue(); - private volatile long num=0; - /** - * ʹ - */ - private final WeakHashMap hashMap=new WeakHashMap (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @SuppressWarnings("unchecked") - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("socket"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - if(num%200==0) - { - System.gc(); - } - num++; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7d/f014ead31aac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/7d/f014ead31aac001710ff8a7c6bda0fb8 deleted file mode 100644 index 8d1ee8a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7d/f014ead31aac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,12 +0,0 @@ -/** - * - */ -package judp; - -/** - * @author jinyu - * - */ -public class PackagetCombin { - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7e/006d75ddffab001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/7e/006d75ddffab001710ff8a7c6bda0fb8 deleted file mode 100644 index 6fd43fa..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7e/006d75ddffab001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,79 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private LinkedBlockingQueue> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - - - } - private void startThread() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - WeakReference objsocket=queue.take(); - if(objsocket.get()!=null) - { - judpSocket socket=objsocket.get(); - if(socket.getCloseState()) - { - if(endPoint!=null) - { - endPoint.removeSession(socket.getSocketID()); - } - } - } - - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7e/401863511cac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/7e/401863511cac001710ff8a7c6bda0fb8 deleted file mode 100644 index 3b71a22..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7e/401863511cac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,38 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] buffer; -public long id; -public DataStruct(int num) -{ - buffer=new byte[num][]; -} -private boolean check() -{ - -} -public boolean addData(byte[]data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - int index=buf.getInt(); - dataLen=buf.getInt(); - byte[] tmp=new byte[buf.limit()-buf.position()]; - buf.get(tmp); - buffer[index]=tmp; - -} - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7e/b067998b05ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/7e/b067998b05ac001710ff8a7c6bda0fb8 deleted file mode 100644 index d9640f6..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7e/b067998b05ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,93 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.WeakHashMap; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private final ReferenceQueue q = new ReferenceQueue(); - - /** - * ʹ - */ - private final WeakHashMap hashMap=new WeakHashMap (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7f/3056569822ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/7f/3056569822ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 7e284f6..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7f/3056569822ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,208 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public void pauseOutput() - { - try { - client.getOutputStream().pauseOutput(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - public byte[] read() - { - byte[] result=null; - if(client!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(client.isClose()) - { - return null; - } - r=client.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; - } - public int read(byte[]data) - { - try { - return client.read(data); - } catch (IOException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - return -1; - } - public void close() - { - if(client!=null) - { - if(sumLen==0) - { - //ûз - //ر - try { - if(!client.isClose()) - client.shutdown(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - else - { - //ʼ - //SocketManager.getInstance().add(client); - if(!client.isClose()) - client.close(); - } - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7f/40c53669d8ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/7f/40c53669d8ac001716b9ca6d5abb90bc deleted file mode 100644 index 17670bd..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7f/40c53669d8ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,363 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public void setRecBufferSize(int size) -{ - bufSize=size; -} -public boolean getCloseState() -{ - //ײѾر - return isClose|socket.isClose(); -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(getCloseState()) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - while(true) - { - if(getCloseState()) - { - return null; - } - r=readData(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } - - return result; -} - - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(getCloseState()) - { - return false; - } - try { - - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(getCloseState()) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;i> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - - - } - private void startThread() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - WeakReference objsocket=queue.take(); - if(objsocket.get()!=null) - { - judpSocket socket=objsocket.get(); - if(socket.getCloseState()) - { - socket. - } - } - - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7f/b07dd0961bac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/7f/b07dd0961bac001710ff8a7c6bda0fb8 deleted file mode 100644 index ff17ea3..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7f/b07dd0961bac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,14 +0,0 @@ -/** - * - */ -package judp; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] data; -public long id; -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/80/105d7f665ca800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/80/105d7f665ca800171a8482560d609ceb deleted file mode 100644 index 79ba998..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/80/105d7f665ca800171a8482560d609ceb +++ /dev/null @@ -1,223 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.UDTStatistics; - -public class UDTClient { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - private final UDPEndPoint clientEndpoint; - private ClientSession clientSession; - private boolean close=false; - private Thread closeThread=null;//cd - public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address,localport); - logger.info("Created client endpoint on port "+localport); - } - - public UDTClient(InetAddress address)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address); - logger.info("Created client endpoint on port "+clientEndpoint.getLocalPort()); - } - - public UDTClient(UDPEndPoint endpoint)throws SocketException, UnknownHostException{ - clientEndpoint=endpoint; - } - - /** - * establishes a connection to the given server. - * Starts the sender thread. - * @param host - * @param port - * @throws UnknownHostException - */ - public void connect(String host, int port)throws InterruptedException, UnknownHostException, IOException{ - InetAddress address=InetAddress.getByName(host); - Destination destination=new Destination(address,port); - //create client session... - clientSession=new ClientSession(clientEndpoint,destination); - clientEndpoint.addSession(clientSession.getSocketID(), clientSession); - - clientEndpoint.start(); - clientSession.connect(); - //wait for handshake - while(!clientSession.isReady()){ - Thread.sleep(500); - } - logger.info("The UDTClient is connected"); - Thread.sleep(500); - } - - /** - * sends the given data asynchronously - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - public void send(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWrite(data); - } - - public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWriteBlocking(data); - } - - public int read(byte[]data)throws IOException, InterruptedException{ - return clientSession.getSocket().getInputStream().read(data); - } - - /** - * flush outstanding data (and make sure it is acknowledged) - * @throws IOException - * @throws InterruptedException - */ - public void flush()throws IOException, InterruptedException{ - clientSession.getSocket().flush(); - } - - - public void shutdown()throws IOException{ - - if (clientSession.isReady()&& clientSession.active==true) - { - Shutdown shutdown = new Shutdown(); - shutdown.setDestinationID(clientSession.getDestination().getSocketID()); - shutdown.setSession(clientSession); - try{ - clientEndpoint.doSend(shutdown); - TimeUnit.MILLISECONDS.sleep(100); - } - catch(Exception e) - { - logger.log(Level.SEVERE,"ERROR: Connection could not be stopped!",e); - } - clientSession.getSocket().getReceiver().stop(); - clientEndpoint.stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - close=true; - } - } - - public UDTInputStream getInputStream()throws IOException{ - return clientSession.getSocket().getInputStream(); - } - - public UDTOutputStream getOutputStream()throws IOException{ - return clientSession.getSocket().getOutputStream(); - } - - public UDPEndPoint getEndpoint()throws IOException{ - return clientEndpoint; - } - - public UDTStatistics getStatistics(){ - return clientSession.getStatistics(); - } - - public long getSocketID() - { - //cd - return clientSession.getSocketID(); - } - - /** - * ͬر - * ȴݷɺٹر - * ֻȴ10ss - */ - public synchronized void close() - { - close=true; - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - if(clientSession.getSocket().getSender().isSenderEmpty()) - { - try { - shutdown(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } - - public boolean isClose() - { - return close; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/80/d030786d1aac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/80/d030786d1aac001710ff8a7c6bda0fb8 deleted file mode 100644 index 63f3244..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/80/d030786d1aac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,76 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=16; - public static byte[][] split(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i0){ - int len=Math.min(bb.remaining(),chunksize); - byte[]chunk=new byte[len]; - bb.get(chunk); - DataPacket packet=new DataPacket(); - seqNo=sender.getNextSequenceNumber(); - packet.setPacketSequenceNumber(seqNo); - packet.setSession(session); - packet.setDestinationID(session.getDestination().getSocketID()); - packet.setData(chunk); - - //put the packet into the send queue - if(!sender.sendUdtPacket(packet, timeout, units)){ - throw new IOException("Queue full"); - } - - } - if(length>0)active=true; - - } - /** - * will block until the outstanding packets have really been sent out - * and acknowledged - */ - protected void flush() throws InterruptedException{ - if(!active)return; - final long seqNo=sender.getCurrentSequenceNumber(); - if(seqNo<0)throw new IllegalStateException(); - while(!sender.isSentOut(seqNo)){ - Thread.sleep(5); - } - if(seqNo>-1){ - //wait until data has been sent out and acknowledged - while(active && !sender.haveAcknowledgementFor(seqNo)){ - sender.waitForAck(seqNo); - } - } - //TODO need to check if we can pause the sender... - //sender.pause(); - } - - //writes and wait for ack - protected void doWriteBlocking(byte[]data)throws IOException, InterruptedException{ - doWrite(data); - System.out.println("flush"); - flush(); - System.out.println("flush out"); - } - - /** - * close the connection - * @throws IOException - */ - public void close()throws IOException{ - if(inputStream!=null)inputStream.close(); - if(outputStream!=null)outputStream.close(); - active=false; - close=true; - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/81/500e2b00d6ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/81/500e2b00d6ac001716b9ca6d5abb90bc deleted file mode 100644 index 8a8a7be..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/81/500e2b00d6ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,273 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡ - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(islagerRead) - { - // cd Ϊݶȡ׼ - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - } - else - { - //ԭ룬Сݽȫ - buffer[insert]=data; - numValidChunks.incrementAndGet(); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - - if(this.islagerRead) - { - //cd - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(this.islagerRead) - { - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/82/0096696f19ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/82/0096696f19ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 05bd6a2..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/82/0096696f19ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,14 +0,0 @@ -/** - * - */ -package judp; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong subid=new AtomicLong(0); - public static int dataSzie=1472; - public byte[][] split(byte[]data) -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/82/209d88b969a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/82/209d88b969a800171a8482560d609ceb deleted file mode 100644 index 68eb196..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/82/209d88b969a800171a8482560d609ceb +++ /dev/null @@ -1,114 +0,0 @@ -/** - * - */ -package judp; - -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.SynchronousQueue; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean Start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - //judpSocket jsocket=new judpSocket(csocket); - - //SocketManager.getInstance().addGC(jsocket,csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ -try { - SocketControls.getInstance().getSocket(); - judpSocket jsocket= sessionHandoff.take(); - return jsocket; -} catch (InterruptedException e) { - logger.info("judpSocketжϣ"+e.getMessage()); - e.printStackTrace(); -} -return null; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/82/50bd4a31d6ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/82/50bd4a31d6ac001716b9ca6d5abb90bc deleted file mode 100644 index dfedccd..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/82/50bd4a31d6ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,279 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡ - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(islagerRead) - { - // cd Ϊݶȡ׼ - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - } - else - { - //ԭ룬Сݽȫ - buffer[insert]=data; - numValidChunks.incrementAndGet(); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - - if(this.islagerRead) - { - //cd - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(this.islagerRead) - { - // cd - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - - if(readPosition==size) - {readPosition=0; - if(this.islagerRead) - { - //cd - clearDeHash(this.size-leftNum); - } - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/82/7042778204ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/82/7042778204ac001710ff8a7c6bda0fb8 deleted file mode 100644 index f72cd53..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/82/7042778204ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,86 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private LinkedBlockingQueue> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - - } - } - catch(Exception ex) - { - - } - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - private void startThread() { - - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/82/801757f229ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/82/801757f229ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 2e2ea88..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/82/801757f229ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,99 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=20; - - /** - * ָ - * @param data - * @return - */ - public static byte[][] splitData(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize>0?1:0; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i0){ - int len=Math.min(bb.remaining(),chunksize); - byte[]chunk=new byte[len]; - bb.get(chunk); - DataPacket packet=new DataPacket(); - seqNo=sender.getNextSequenceNumber(); - packet.setPacketSequenceNumber(seqNo); - packet.setSession(session); - packet.setDestinationID(session.getDestination().getSocketID()); - packet.setData(chunk); - System.out.println("sender sendUdtPacket1"); - //put the packet into the send queue - if(!sender.sendUdtPacket(packet, timeout, units)){ - throw new IOException("Queue full"); - } - System.out.println("sender sendUdtPacket2"); - } - if(length>0)active=true; - } - /** - * will block until the outstanding packets have really been sent out - * and acknowledged - */ - protected void flush() throws InterruptedException{ - if(!active)return; - final long seqNo=sender.getCurrentSequenceNumber(); - if(seqNo<0)throw new IllegalStateException(); - while(!sender.isSentOut(seqNo)){ - Thread.sleep(5); - } - if(seqNo>-1){ - //wait until data has been sent out and acknowledged - while(active && !sender.haveAcknowledgementFor(seqNo)){ - sender.waitForAck(seqNo); - } - } - //TODO need to check if we can pause the sender... - //sender.pause(); - } - - //writes and wait for ack - protected void doWriteBlocking(byte[]data)throws IOException, InterruptedException{ - doWrite(data); - flush(); - } - - /** - * close the connection - * @throws IOException - */ - public void close()throws IOException{ - if(inputStream!=null)inputStream.close(); - if(outputStream!=null)outputStream.close(); - active=false; - close=true; - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/83/d01fa7f1d6ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/83/d01fa7f1d6ac001716b9ca6d5abb90bc deleted file mode 100644 index 1d41446..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/83/d01fa7f1d6ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,253 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public int dataLen=0; - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - System.out.println("sendBlocking start"); - client.sendBlocking(data); - r=data.length; - sumLen+=r; - System.out.println("sendBlocking end"); - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData=null; - if(dataLen==0) - { - sendData=PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - sendData=sub.split(data, dataLen); - } - for(int i=0;i list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * Ƴsocket - * @return - */ -public UDTSocket getSocket() -{ - - int index=-1; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(index==-1) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳ - index=i; - i=-1;//± - } - } - else - { - // - if(i==index) - { - continue; - } - else - { - list.get(i).close(); - long id=list.get(i).getSession().getSocketID(); - list.get(i).getEndpoint().removeSession(id); - list.get(i).getReceiver().stop(); - list.get(i).getSender().stop(); - } - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - if(index!=-1) - { - return list.get(index); - } - return null; - -} -/** - * socket - */ -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/83/e044245edbac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/83/e044245edbac001716b9ca6d5abb90bc deleted file mode 100644 index 9f48531..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/83/e044245edbac001716b9ca6d5abb90bc +++ /dev/null @@ -1,368 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public void setRecBufferSize(int size) -{ - bufSize=size; -} -public boolean getCloseState() -{ - //ײѾر - return isClose|socket.isClose(); -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(getCloseState()) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - while(true) - { - if(getCloseState()) - { - return null; - } - r=readData(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } - - return result; -} - - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(getCloseState()) - { - return false; - } - try { - - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(getCloseState()) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;isessions=new ConcurrentHashMap(); - - //last received packet - private UDTPacket lastPacket; - - //if the endpoint is configured for a server socket, - //this queue is used to handoff new UDTSessions to the application - private final SynchronousQueue sessionHandoff=new SynchronousQueue(); - - private boolean serverSocketMode=false; - - //has the endpoint been stopped? - private volatile boolean stopped=false; - - public static final int DATAGRAM_SIZE=1400; - - private volatile int sessionnum=0;//cd ʱͳ - - /** - * create an endpoint on the given socket - * - * @param socket - a UDP datagram socket - */ - public UDPEndPoint(DatagramSocket socket){ - this.dgSocket=socket; - port=dgSocket.getLocalPort(); - } - - /** - * bind to any local port on the given host address - * @param localAddress - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress)throws SocketException, UnknownHostException{ - this(localAddress,0); - } - - /** - * Bind to the given address and port - * @param localAddress - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress, int localPort)throws SocketException, UnknownHostException{ - if(localAddress==null){ - dgSocket=new DatagramSocket(localPort, localAddress); - }else{ - dgSocket=new DatagramSocket(localPort); - } - if(localPort>0)this.port = localPort; - else port=dgSocket.getLocalPort(); - - //set a time out to avoid blocking in doReceive() - dgSocket.setSoTimeout(100000); - //buffer size - dgSocket.setReceiveBufferSize(128*1024); - } - - /** - * bind to the default network interface on the machine - * - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(int localPort)throws SocketException, UnknownHostException{ - this(null,localPort); - } - - /** - * bind to an ephemeral port on the default network interface on the machine - * - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint()throws SocketException, UnknownHostException{ - this(null,0); - } - - /** - * start the endpoint. If the serverSocketModeEnabled flag is true, - * a new connection can be handed off to an application. The application needs to - * call #accept() to get the socket - * @param serverSocketModeEnabled - */ - public void start(boolean serverSocketModeEnabled){ - serverSocketMode=serverSocketModeEnabled; - //start receive thread - Runnable receive=new Runnable(){ - @Override - public void run(){ - try{ - doReceive(); - }catch(Exception ex){ - logger.log(Level.WARNING,"",ex); - } - } - }; - Thread t=UDTThreadFactory.get().newThread(receive); - t.setDaemon(true); - t.start(); - logger.info("UDTEndpoint started."); - } - - public void start(){ - start(false); - } - - public void stop(){ - stopped=true; - dgSocket.close(); - } - - /** - * @return the port which this client is bound to - */ - public int getLocalPort() { - return this.dgSocket.getLocalPort(); - } - /** - * @return Gets the local address to which the socket is bound - */ - public InetAddress getLocalAddress(){ - return this.dgSocket.getLocalAddress(); - } - - DatagramSocket getSocket(){ - return dgSocket; - } - - UDTPacket getLastPacket(){ - return lastPacket; - } - - public void addSession(Long destinationID,UDTSession session){ - logger.info("Storing session <"+destinationID+">"); - sessionnum++; - sessions.put(destinationID, session); - } - - public UDTSession getSession(Long destinationID){ - return sessions.get(destinationID); - } - - /** - * Ƴsession - * cd - * @param socketid - * @return - */ - public UDTSession removeSession(long socketid) - { - //cd - sessionnum--; - logger.info("Storing Sessionnum:"+sessionnum); - return sessions.remove(socketid); - } - public Collection getSessions(){ - return sessions.values(); - } - - /** - * wait the given time for a new connection - * @param timeout - the time to wait - * @param unit - the {@link TimeUnit} - * @return a new {@link UDTSession} - * @throws InterruptedException - */ - protected UDTSession accept(long timeout, TimeUnit unit)throws InterruptedException{ - return sessionHandoff.poll(timeout, unit); - } - - - final DatagramPacket dp= new DatagramPacket(new byte[DATAGRAM_SIZE],DATAGRAM_SIZE); - - /** - * single receive, run in the receiverThread, see {@link #start()} - *
    - *
  • Receives UDP packets from the network
  • - *
  • Converts them to UDT packets
  • - *
  • dispatches the UDT packets according to their destination ID.
  • - *
- * @throws IOException - */ - private long lastDestID=-1; - private UDTSession lastSession; - - //MeanValue v=new MeanValue("receiver processing ",true, 256); - - private int n=0; - - private final Object lock=new Object(); - - protected void doReceive()throws IOException{ - while(!stopped){ - try{ - try{ - //v.end(); - - //will block until a packet is received or timeout has expired - dgSocket.receive(dp); - - //v.begin(); - - Destination peer=new Destination(dp.getAddress(), dp.getPort()); - int l=dp.getLength(); - UDTPacket packet=PacketFactory.createPacket(dp.getData(),l); - lastPacket=packet; - - //handle connection handshake - if(packet.isConnectionHandshake()){ - synchronized(lock){ - Long id=Long.valueOf(packet.getDestinationID()); - UDTSession session=sessions.get(id); - if(session==null){ - session=new ServerSession(dp,this); - addSession(session.getSocketID(),session); - //TODO need to check peer to avoid duplicate server session - if(serverSocketMode){ - logger.fine("Pooling new request."); - sessionHandoff.put(session); - logger.fine("Request taken for processing."); - } - } - peer.setSocketID(((ConnectionHandshake)packet).getSocketID()); - session.received(packet,peer); - } - } - else{ - //dispatch to existing session - long dest=packet.getDestinationID(); - UDTSession session; - if(dest==lastDestID){ - session=lastSession; - } - else{ - session=sessions.get(dest); - lastSession=session; - lastDestID=dest; - } - if(session==null){ - n++; - if(n%100==1){ - logger.warning("Unknown session <"+dest+"> requested from <"+peer+"> packet type "+packet.getClass().getName()); - } - } - else{ - session.received(packet,peer); - - } - } - }catch(SocketException ex){ - if(ex.getMessage().equals("socket closed")&&stopped) - { - //Ѿر - } - else - { - logger.log(Level.INFO, "SocketException: "+ex.getMessage()); - } - }catch(SocketTimeoutException ste){ - //can safely ignore... we will retry until the endpoint is stopped - } - - }catch(Exception ex){ - logger.log(Level.WARNING, "Got: "+ex.getMessage(),ex); - } - } - } - - protected void doSend(UDTPacket packet)throws IOException{ - byte[]data=packet.getEncoded(); - DatagramPacket dgp = packet.getSession().getDatagram(); - dgp.setData(data); - dgSocket.send(dgp); - } - - @Override - public String toString(){ - return "UDPEndpoint port="+port; - } - - public void sendRaw(DatagramPacket p)throws IOException{ - dgSocket.send(p); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/84/7015bce5f7ab001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/84/7015bce5f7ab001710ff8a7c6bda0fb8 deleted file mode 100644 index 25b7e89..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/84/7015bce5f7ab001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,87 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * Ƴsocket - * @return - */ -public UDTSocket getSocket() -{ - - int index=-1; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(index==-1) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳ - index=i; - i=-1;//± - - } - } - else - { - // - if(i==index) - { - continue; - } - else - { - list.get(i).close(); - long id=list.get(i).getSession().getSocketID(); - list.get(i).getEndpoint().removeSession(id); - list.get(i).getReceiver().stop(); - list.get(i).getSender().stop(); - } - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - if(index!=-1) - { - return list.get(index); - } - return null; - -} -/** - * socket - */ -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/84/80036963c9ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/84/80036963c9ac001716b9ca6d5abb90bc deleted file mode 100644 index 557fe8d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/84/80036963c9ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,605 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.ControlPacket; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.packets.Shutdown; -import udt.packets.ControlPacket.ControlPacketType; -import udt.receiver.AckHistoryEntry; -import udt.receiver.AckHistoryWindow; -import udt.receiver.PacketHistoryWindow; -import udt.receiver.PacketPairWindow; -import udt.receiver.ReceiverLossList; -import udt.receiver.ReceiverLossListEntry; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - -/** - * receiver part of a UDT entity - * @see UDTSender - */ -public class UDTReceiver { - - private static final Logger logger=Logger.getLogger(UDTReceiver.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //record seqNo of detected lostdata and latest feedback time - private final ReceiverLossList receiverLossList; - - //record each sent ACK and the sent time - private final AckHistoryWindow ackHistoryWindow; - - //Packet history window that stores the time interval between the current and the last seq. - private final PacketHistoryWindow packetHistoryWindow; - - //for storing the arrival time of the last received data packet - private volatile long lastDataPacketArrivalTime=0; - - //largest received data packet sequence number(LRSN) - private volatile long largestReceivedSeqNumber=0; - - //ACK event related - - //last Ack number - private long lastAckNumber=0; - - //largest Ack number ever acknowledged by ACK2 - private volatile long largestAcknowledgedAckNumber=-1; - - //EXP event related - - //a variable to record number of continuous EXP time-out events - private volatile long expCount=0; - - /*records the time interval between each probing pair - compute the median packet pair interval of the last - 16 packet pair intervals (PI) and the estimate link capacity.(packet/s)*/ - private final PacketPairWindow packetPairWindow; - - //estimated link capacity - long estimateLinkCapacity; - // the packet arrival rate - long packetArrivalSpeed; - - //round trip time, calculated from ACK/ACK2 pairs - long roundTripTime=0; - //round trip time variance - long roundTripTimeVar=roundTripTime/2; - - //to check the ACK, NAK, or EXP timer - private long nextACK; - //microseconds to next ACK event - private long ackTimerInterval=Util.getSYNTime(); - - private long nextNAK; - //microseconds to next NAK event - private long nakTimerInterval=Util.getSYNTime(); - - private long nextEXP; - //microseconds to next EXP event - private long expTimerInterval=100*Util.getSYNTime(); - - //instant when the session was created (for expiry checking) - private final long sessionUpSince; - //milliseconds to timeout a new session that stays idle - private final long IDLE_TIMEOUT = 3*60*1000; - - //buffer size for storing data - private final long bufferSize; - - //stores received packets to be sent - private final BlockingQueuehandoffQueue; - - private Thread receiverThread; - - private volatile boolean stopped=false; - - //(optional) ack interval (see CongestionControl interface) - private volatile long ackInterval=-1; - - /** - * if set to true connections will not expire, but will only be - * closed by a Shutdown message - */ - public static boolean connectionExpiryDisabled=false; - - private final boolean storeStatistics; - - - - /** - * create a receiver with a valid {@link UDTSession} - * @param session - */ - public UDTReceiver(UDTSession session,UDPEndPoint endpoint){ - this.endpoint = endpoint; - this.session=session; - this.sessionUpSince=System.currentTimeMillis(); - this.statistics=session.getStatistics(); - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - ackHistoryWindow = new AckHistoryWindow(16); - packetHistoryWindow = new PacketHistoryWindow(16); - receiverLossList = new ReceiverLossList(); - packetPairWindow = new PacketPairWindow(16); - largestReceivedSeqNumber=session.getInitialSequenceNumber()-1; - bufferSize=session.getReceiveBufferSize(); - handoffQueue=new ArrayBlockingQueue(4*session.getFlowWindowSize()); - storeStatistics=Boolean.getBoolean("udt.receiver.storeStatistics"); - initMetrics(); - start(); - } - - private MeanValue dgReceiveInterval; - private MeanValue dataPacketInterval; - private MeanValue processTime; - private MeanValue dataProcessTime; - private void initMetrics(){ - if(!storeStatistics)return; - dgReceiveInterval=new MeanValue("UDT receive interval"); - statistics.addMetric(dgReceiveInterval); - dataPacketInterval=new MeanValue("Data packet interval"); - statistics.addMetric(dataPacketInterval); - processTime=new MeanValue("UDT packet process time"); - statistics.addMetric(processTime); - dataProcessTime=new MeanValue("Data packet process time"); - statistics.addMetric(dataProcessTime); - } - - - //starts the sender algorithm - private void start(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - nextACK=Util.getCurrentTime()+ackTimerInterval; - nextNAK=(long)(Util.getCurrentTime()+1.5*nakTimerInterval); - nextEXP=Util.getCurrentTime()+2*expTimerInterval; - ackInterval=session.getCongestionControl().getAckInterval(); - while(!stopped){ - receiverAlgorithm(); - } - } - catch(Exception ex){ - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING RECEIVER for "+session); - } - }; - receiverThread=UDTThreadFactory.get().newThread(r); - receiverThread.start(); - } - - /* - * packets are written by the endpoint - */ - protected void receive(UDTPacket p)throws IOException{ - if(storeStatistics)dgReceiveInterval.end(); - handoffQueue.offer(p); - if(storeStatistics)dgReceiveInterval.begin(); - } - - /** - * receiver algorithm - * see specification P11. - */ - public void receiverAlgorithm()throws InterruptedException,IOException{ - //check ACK timer - long currentTime=Util.getCurrentTime(); - if(nextACKseqNumbers=receiverLossList.getFilteredSequenceNumbers(roundTripTime,true); - sendNAK(seqNumbers); - } - - /** - * process EXP event (see spec. p 13) - */ - protected void processEXPEvent()throws IOException{ - if(session.getSocket()==null)return; - UDTSender sender=session.getSocket().getSender(); - //put all the unacknowledged packets in the senders loss list - sender.putUnacknowledgedPacketsIntoLossList(); - if(expCount>16 && System.currentTimeMillis()-sessionUpSince > IDLE_TIMEOUT){ - if(!connectionExpiryDisabled &&!stopped){ - sendShutdown(); - stop(); - logger.info("Session "+session+" expired."); - return; - } - } - if(!sender.haveLostPackets()){ - sendKeepAlive(); - } - expCount++; - } - - protected void processUDTPacket(UDTPacket p)throws IOException{ - //(3).Check the packet type and process it according to this. - - if(!p.isControlPacket()){ - DataPacket dp=(DataPacket)p; - if(storeStatistics){ - dataPacketInterval.end(); - dataProcessTime.begin(); - } - onDataPacketReceived(dp); - if(storeStatistics){ - dataProcessTime.end(); - dataPacketInterval.begin(); - } - logger.info("DataPacket udt:"+p.getPacketSequenceNumber()); - } - - else if (p.getControlPacketType()==ControlPacketType.ACK2.ordinal()){ - Acknowledgment2 ack2=(Acknowledgment2)p; - onAck2PacketReceived(ack2); - } - - else if (p instanceof Shutdown){ - onShutdown(); - } - - } - - //every nth packet will be discarded... for testing only of course - public static int dropRate=0; - - //number of received data packets - private int n=0; - - protected void onDataPacketReceived(DataPacket dp)throws IOException{ - long currentSequenceNumber = dp.getPacketSequenceNumber(); - - //for TESTING : check whether to drop this packet -// n++; -// //if(dropRate>0 && n % dropRate == 0){ -// if(n % 1111 == 0){ -// logger.info("**** TESTING:::: DROPPING PACKET "+currentSequenceNumber+" FOR TESTING"); -// return; -// } -// //} - boolean OK=session.getSocket().getInputStream().haveNewData(currentSequenceNumber,dp.getData()); - if(!OK){ - logger.info("haveNewData:ʧ"); - //need to drop packet... - return; - } - - long currentDataPacketArrivalTime = Util.getCurrentTime(); - - /*(4).if the seqNo of the current data packet is 16n+1,record the - time interval between this packet and the last data packet - in the packet pair window*/ - if((currentSequenceNumber%16)==1 && lastDataPacketArrivalTime>0){ - long interval=currentDataPacketArrivalTime -lastDataPacketArrivalTime; - packetPairWindow.add(interval); - } - - //(5).record the packet arrival time in the PKT History Window. - packetHistoryWindow.add(currentDataPacketArrivalTime); - - - //store current time - lastDataPacketArrivalTime=currentDataPacketArrivalTime; - logger.info("largestReceivedSeqNumber:"+largestReceivedSeqNumber); - - //(6).number of detected lossed packet - /*(6.a).if the number of the current data packet is greater than LSRN+1, - put all the sequence numbers between (but excluding) these two values - into the receiver's loss list and send them to the sender in an NAK packet*/ - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber+1)>0){ - sendNAK(currentSequenceNumber); - - } - else if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)<0){ - /*(6.b).if the sequence number is less than LRSN,remove it from - * the receiver's loss list - */ - receiverLossList.remove(currentSequenceNumber); - logger.info("receiverLossList remove:"+currentSequenceNumber); - } - - statistics.incNumberOfReceivedDataPackets(); - - //(7).Update the LRSN - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)>0){ - largestReceivedSeqNumber=currentSequenceNumber; - } - - //(8) need to send an ACK? Some cc algorithms use this - if(ackInterval>0){ - if(n % ackInterval == 0)processACKEvent(false); - } - } - - /** - * write a NAK triggered by a received sequence number that is larger than - * the largestReceivedSeqNumber + 1 - * @param currentSequenceNumber - the currently received sequence number - * @throws IOException - */ - protected void sendNAK(long currentSequenceNumber)throws IOException{ - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(largestReceivedSeqNumber+1, currentSequenceNumber); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - //put all the sequence numbers between (but excluding) these two values into the - //receiver loss list - for(long i=largestReceivedSeqNumber+1;isequenceNumbers)throws IOException{ - if(sequenceNumbers.size()==0)return; - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(sequenceNumbers); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(nAckPacket); - statistics.incNumberOfNAKSent(); - logger.info("sendNAK List:"+sequenceNumbers.size()); - } - - protected long sendLightAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt=buildLightAcknowledgement(ackNumber); - endpoint.doSend(acknowledgmentPkt); - statistics.incNumberOfACKSent(); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - protected long sendAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); - //set the estimate link capacity - estimateLinkCapacity=packetPairWindow.getEstimatedLinkCapacity(); - acknowledgmentPkt.setEstimatedLinkCapacity(estimateLinkCapacity); - //set the packet arrival rate - packetArrivalSpeed=packetHistoryWindow.getPacketArrivalSpeed(); - acknowledgmentPkt.setPacketReceiveRate(packetArrivalSpeed); - - endpoint.doSend(acknowledgmentPkt); - - statistics.incNumberOfACKSent(); - statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - //builds a "light" Acknowledgement - private Acknowledgement buildLightAcknowledgement(long ackNumber){ - Acknowledgement acknowledgmentPkt = new Acknowledgement(); - //the packet sequence number to which all the packets have been received - acknowledgmentPkt.setAckNumber(ackNumber); - //assign this ack a unique increasing ACK sequence number - acknowledgmentPkt.setAckSequenceNumber(++ackSequenceNumber); - acknowledgmentPkt.setRoundTripTime(roundTripTime); - acknowledgmentPkt.setRoundTripTimeVar(roundTripTimeVar); - //set the buffer size - acknowledgmentPkt.setBufferSize(bufferSize); - - acknowledgmentPkt.setDestinationID(session.getDestination().getSocketID()); - acknowledgmentPkt.setSession(session); - - return acknowledgmentPkt; - } - - /** - * spec p. 13:
- 1) Locate the related ACK in the ACK History Window according to the - ACK sequence number in this ACK2.
- 2) Update the largest ACK number ever been acknowledged.
- 3) Calculate new rtt according to the ACK2 arrival time and the ACK - departure time, and update the RTT value as: RTT = (RTT * 7 + - rtt) / 8.
- 4) Update RTTVar by: RTTVar = (RTTVar * 3 + abs(RTT - rtt)) / 4.
- 5) Update both ACK and NAK period to 4 * RTT + RTTVar + SYN.
- */ - protected void onAck2PacketReceived(Acknowledgment2 ack2){ - AckHistoryEntry entry=ackHistoryWindow.getEntry(ack2.getAckSequenceNumber()); - if(entry!=null){ - long ackNumber=entry.getAckNumber(); - largestAcknowledgedAckNumber=Math.max(ackNumber, largestAcknowledgedAckNumber); - - long rtt=entry.getAge(); - if(roundTripTime>0)roundTripTime = (roundTripTime*7 + rtt)/8; - else roundTripTime = rtt; - roundTripTimeVar = (roundTripTimeVar* 3 + Math.abs(roundTripTimeVar- rtt)) / 4; - ackTimerInterval=4*roundTripTime+roundTripTimeVar+Util.getSYNTime(); - nakTimerInterval=ackTimerInterval; - statistics.setRTT(roundTripTime, roundTripTimeVar); - } - } - - protected void sendKeepAlive()throws IOException{ - KeepAlive ka=new KeepAlive(); - ka.setDestinationID(session.getDestination().getSocketID()); - ka.setSession(session); - endpoint.doSend(ka); - } - - protected void sendShutdown()throws IOException{ - Shutdown s=new Shutdown(); - s.setDestinationID(session.getDestination().getSocketID()); - s.setSession(session); - endpoint.doSend(s); - } - - private volatile long ackSequenceNumber=0; - - protected void resetEXPTimer(){ - nextEXP=Util.getCurrentTime()+expTimerInterval; - expCount=0; - } - - protected void resetEXPCount(){ - expCount=0; - } - - public void setAckInterval(long ackInterval){ - this.ackInterval=ackInterval; - } - - protected void onShutdown()throws IOException{ - stop(); - } - - public void stop()throws IOException{ - stopped=true; - session.getSocket().close(); - //stop our sender as well - session.getSocket().getSender().stop(); - } - - @Override - public String toString(){ - StringBuilder sb=new StringBuilder(); - sb.append("UDTReceiver ").append(session).append("\n"); - sb.append("LossList: "+receiverLossList); - return sb.toString(); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/84/a05eab38e6ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/84/a05eab38e6ac001716b9ca6d5abb90bc deleted file mode 100644 index 70064a3..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/84/a05eab38e6ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,248 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - - /** - * дļ - */ - private void recData() - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - byte[]tmp=recQueue.poll(); - if(tmp==null) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - continue; - } - if(writeFile(tmp)) - { - isStop=true; - break; - } - } - - } - - }); - fileW.setDaemon(true); - fileW.setName(fileName+"_Thread"); - fileW.start(); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - // - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - //ļ - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - break; - } - else - { - recData(); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - // - ss.close(); - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/85/209583282cac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/85/209583282cac001710ff8a7c6bda0fb8 deleted file mode 100644 index 406472e..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/85/209583282cac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,88 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] buffer=null; -public long id; -private volatile int sumNum=0; -private volatile int sumLen=0; -private byte[] result=null; -public DataStruct(int num) -{ - buffer=new byte[num][]; -} - -/** - * - * @return - */ -private boolean check() -{ - if(sumNum>=buffer.length) - { - //ɹ - if(sumLen==dataLen) - { - //ʼ - result=new byte[dataLen]; - ByteBuffer cur=ByteBuffer.wrap(result); - for(int i=0;i=buffer.length) - { - //ɹ - if(sumLen==dataLen) - { - //ʼ - result=new byte[dataLen]; - ByteBuffer cur=ByteBuffer.wrap(result); - for(int i=0;i sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=SocketControls.getInstance().getSocket(); - } - judpSocket jsocket=new judpSocket(socket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/85/80f057855ca800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/85/80f057855ca800171a8482560d609ceb deleted file mode 100644 index e266d43..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/85/80f057855ca800171a8482560d609ceb +++ /dev/null @@ -1,227 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.UDTStatistics; - -public class UDTClient { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - private final UDPEndPoint clientEndpoint; - private ClientSession clientSession; - private boolean close=false; - private Thread closeThread=null;//cd - public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address,localport); - logger.info("Created client endpoint on port "+localport); - } - - public UDTClient(InetAddress address)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address); - logger.info("Created client endpoint on port "+clientEndpoint.getLocalPort()); - } - - public UDTClient(UDPEndPoint endpoint)throws SocketException, UnknownHostException{ - clientEndpoint=endpoint; - } - - /** - * establishes a connection to the given server. - * Starts the sender thread. - * @param host - * @param port - * @throws UnknownHostException - */ - public void connect(String host, int port)throws InterruptedException, UnknownHostException, IOException{ - InetAddress address=InetAddress.getByName(host); - Destination destination=new Destination(address,port); - //create client session... - clientSession=new ClientSession(clientEndpoint,destination); - clientEndpoint.addSession(clientSession.getSocketID(), clientSession); - - clientEndpoint.start(); - clientSession.connect(); - //wait for handshake - while(!clientSession.isReady()){ - Thread.sleep(500); - } - logger.info("The UDTClient is connected"); - Thread.sleep(500); - } - - /** - * sends the given data asynchronously - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - public void send(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWrite(data); - } - - public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWriteBlocking(data); - } - - public int read(byte[]data)throws IOException, InterruptedException{ - return clientSession.getSocket().getInputStream().read(data); - } - - /** - * flush outstanding data (and make sure it is acknowledged) - * @throws IOException - * @throws InterruptedException - */ - public void flush()throws IOException, InterruptedException{ - clientSession.getSocket().flush(); - } - - - public void shutdown()throws IOException{ - - if (clientSession.isReady()&& clientSession.active==true) - { - Shutdown shutdown = new Shutdown(); - shutdown.setDestinationID(clientSession.getDestination().getSocketID()); - shutdown.setSession(clientSession); - try{ - clientEndpoint.doSend(shutdown); - TimeUnit.MILLISECONDS.sleep(100); - } - catch(Exception e) - { - logger.log(Level.SEVERE,"ERROR: Connection could not be stopped!",e); - } - clientSession.getSocket().getReceiver().stop(); - clientEndpoint.stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - close=true; - } - } - - public UDTInputStream getInputStream()throws IOException{ - return clientSession.getSocket().getInputStream(); - } - - public UDTOutputStream getOutputStream()throws IOException{ - return clientSession.getSocket().getOutputStream(); - } - - public UDPEndPoint getEndpoint()throws IOException{ - return clientEndpoint; - } - - public UDTStatistics getStatistics(){ - return clientSession.getStatistics(); - } - - public long getSocketID() - { - //cd - return clientSession.getSocketID(); - } - - /** - * ͬر - * ȴݷɺٹر - * ֻȴ10ss - */ - public synchronized void close() - { - close=true; - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(clientSession.getSocket().getSender().isSenderEmpty()) - { - try { - shutdown(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } - - public boolean isClose() - { - return close; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/85/90ae4b9621ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/85/90ae4b9621ac001710ff8a7c6bda0fb8 deleted file mode 100644 index c92649a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/85/90ae4b9621ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,287 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public boolean getCloseState() -{ - return isClose; -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readData() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - - -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} -public String getRemoteHost() { -return socket.getSession().getDestination().getAddress().getHostName(); - -} -public int getRemotePort() { - return socket.getSession().getDestination().getPort(); -} -public long getID() { - - return socketID; -} - - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/85/a0816d39a0ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/85/a0816d39a0ad0017181ed9113883eda9 deleted file mode 100644 index 79a64ce..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/85/a0816d39a0ad0017181ed9113883eda9 +++ /dev/null @@ -1,52 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.StringReader; - -import javax.swing.text.Document; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; - -import org.xml.sax.InputSource; - -/** - * @author jinyu - * - */ -public class ReadXml { -public String readXml(String file) -{ - File f=new File(file); - if(!f.exists()) - { - return ""; - } - // - String xmlStr= readFile(file); - StringReader sr = new StringReader(xmlStr); - InputSource is = new InputSource(sr); - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - DocumentBuilder builder=factory.newDocumentBuilder(); - Document doc = (Document) builder.parse(is); -} -public String readFile(String file) -{ - StringBuilder result = new StringBuilder(); - try{ - BufferedReader br = new BufferedReader(new FileReader(file));//һBufferedReaderȡļ - String s = null; - while((s = br.readLine())!=null){//ʹreadLineһζһ - result.append(System.lineSeparator()+s); - } - br.close(); - }catch(Exception e){ - e.printStackTrace(); - } - return result.toString(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/85/c09cd59465a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/85/c09cd59465a800171a8482560d609ceb deleted file mode 100644 index c24f75a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/85/c09cd59465a800171a8482560d609ceb +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - */ -package judp; - -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/85/f09ac541b3ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/85/f09ac541b3ad0017181ed9113883eda9 deleted file mode 100644 index b283fb5..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/85/f09ac541b3ad0017181ed9113883eda9 +++ /dev/null @@ -1,504 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/86/4061804bb5ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/86/4061804bb5ad0017181ed9113883eda9 deleted file mode 100644 index 3c4ed9c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/86/4061804bb5ad0017181ed9113883eda9 +++ /dev/null @@ -1,522 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;s0) - { - if(lastAckSequenceNumber/10000!=ackNumber/10000) - { - // - //ackNumber رȫɾرСһɾ - if(lastAckSequenceNumberthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - // - } - } - } - } - - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/86/901545d3ceac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/86/901545d3ceac001716b9ca6d5abb90bc deleted file mode 100644 index 8d6a9c8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/86/901545d3ceac001716b9ca6d5abb90bc +++ /dev/null @@ -1,216 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 - buffer[insert]=data; - } - buffer[insert]=data; - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else return null; - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/86/b0f69645e1ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/86/b0f69645e1ac001716b9ca6d5abb90bc deleted file mode 100644 index ab51e34..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/86/b0f69645e1ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,187 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - long speed=0; - try - { - speed=sumBytes/((System.currentTimeMillis()-lastTime)/1000); - } - catch(Exception ex) - { - - } - lastTime=System.currentTimeMillis(); - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/87/905c92e81bac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/87/905c92e81bac001710ff8a7c6bda0fb8 deleted file mode 100644 index b0190e5..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/87/905c92e81bac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,23 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] data; -public long id; -public void addData(byte[]data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int index=buf.getInt(); - int dataLen=buf.getInt(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/87/b04abcedceac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/87/b04abcedceac001716b9ca6d5abb90bc deleted file mode 100644 index 1a9a1c7..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/87/b04abcedceac001716b9ca6d5abb90bc +++ /dev/null @@ -1,221 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ - return false; - } - buffer[insert]=data; - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else return null; - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/87/d06fb23ef8ab001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/87/d06fb23ef8ab001710ff8a7c6bda0fb8 deleted file mode 100644 index c922679..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/87/d06fb23ef8ab001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,131 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); -//private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - // - if(!list.isEmpty()) - { - //ƳѾɹsocket - for(int i=0;i> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - - - } - private void startThread() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - WeakReference objsocket=queue.take(); - if(objsocket.get()!=null) - { - judpSocket socket=objsocket.get(); - if(socket.getCloseState()) - { - socket.close(); - } - } - - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/88/300f6db6a1ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/88/300f6db6a1ad0017181ed9113883eda9 deleted file mode 100644 index 5bbf486..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/88/300f6db6a1ad0017181ed9113883eda9 +++ /dev/null @@ -1,51 +0,0 @@ -/** - * - */ -package net.File; - -import java.util.logging.Logger; - -import net.File.FileMonitor; -import net.File.FilesWatch; - - - - -/** - * @author jinyu - * - */ -public class TestSendFiles { - private static Logger log=Logger.getLogger(TestSendFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //SendFiles send=new SendFiles("192.168.9.152", 5555); - //192.168.30.128 - String path = TestSendFiles.class.getProtectionDomain().getCodeSource().getLocation().getPath(); - ReadXml rd=new ReadXml(); - String xml= rd.readXml("config.xml"); - String[] config=null; - if(xml!=null) - { - config=xml.split(","); - } - SendFiles send=new SendFiles(config[0], Integer.valueOf(config[1])); - FilesWatch watch=new FilesWatch(); - String dir=config[2]; - watch.setWatch(dir); - watch.start(); - while(true) - { - FileMonitor ff= watch.take(); - log.info(ff.file); - if(ff.file.endsWith(".tmp")) - { - continue; - } - send.sendFile(dir+"/"+ff.file); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/88/40c685021dac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/88/40c685021dac001710ff8a7c6bda0fb8 deleted file mode 100644 index f9764fc..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/88/40c685021dac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,49 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] buffer; -public long id; -private volatile int num=0; -private volatile int sum=0; -public DataStruct(int num) -{ - buffer=new byte[num][]; -} -private boolean check() -{ - if(num>=buffer.length) - { - //ɹ - if(sum==dataLen) - { - //ʼ - - } - } -} -public boolean addData(byte[]data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - int index=buf.getInt(); - dataLen=buf.getInt(); - byte[] tmp=new byte[buf.limit()-buf.position()]; - buf.get(tmp); - buffer[index]=tmp; - num++; - sum+=tmp.length; -} - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/88/a03701d4e4ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/88/a03701d4e4ac001716b9ca6d5abb90bc deleted file mode 100644 index 3f7dd9d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/88/a03701d4e4ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,235 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData(byte[] data) - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - byte[]tmp=recQueue.poll(); - if(tmp==null) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - continue; - } - if(writeFile(tmp)) - { - ss.close(); - break; - } - } - - } - - }); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/88/c0bd27e169a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/88/c0bd27e169a800171a8482560d609ceb deleted file mode 100644 index d730a23..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/88/c0bd27e169a800171a8482560d609ceb +++ /dev/null @@ -1,109 +0,0 @@ -/** - * - */ -package judp; - -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.SynchronousQueue; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean Start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - //judpSocket jsocket=new judpSocket(csocket); - - //SocketManager.getInstance().addGC(jsocket,csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - judpSocket jsocket=new judpSocket(socket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/88/f0cdb76ee4ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/88/f0cdb76ee4ac001716b9ca6d5abb90bc deleted file mode 100644 index a7f8c93..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/88/f0cdb76ee4ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,220 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - private String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private long sumBytes=0; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData(byte[] data) - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - - - } - - }); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/89/10b16869e0ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/89/10b16869e0ac001716b9ca6d5abb90bc deleted file mode 100644 index fd0c49b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/89/10b16869e0ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,149 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=10*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - long startTime=System.currentTimeMillis(); - while((count=dis.read(buf,0, bufSize))!=-1) - { - - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - - } - long end=System.currentTimeMillis(); - client.close(); - dis.close(); - log.info("ɣ"+f.getName()); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/89/20a9116191ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/89/20a9116191ad0017181ed9113883eda9 deleted file mode 100644 index 478d04b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/89/20a9116191ad0017181ed9113883eda9 +++ /dev/null @@ -1,503 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) - { - //ȵǰͰ - - lastAckSequenceNumber=ackNumber; - } - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/89/60482f9831ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/89/60482f9831ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 5e16be5..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/89/60482f9831ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,337 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public boolean getCloseState() -{ - return isClose; -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(isClose) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;i hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - // - if(!list.isEmpty()) - { - for(int i=0;i fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/timespan/1000; - sumBytes=0;//Ѿ - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - lastTime=System.currentTimeMillis(); - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8b/2028bc9e03ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/8b/2028bc9e03ac001710ff8a7c6bda0fb8 deleted file mode 100644 index f5ef8ed..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/8b/2028bc9e03ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,77 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private LinkedBlockingQueue> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference objsocket=queue.take(); - if(objsocket.get()!=null) - { - judpSocket socket=objsocket.get(); - if(socket.getCloseState()) - { - - socket.close(); - } - } - - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - private void startThread() { - - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8b/f049864a2dac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/8b/f049864a2dac001710ff8a7c6bda0fb8 deleted file mode 100644 index edbe122..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/8b/f049864a2dac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,100 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=20; - - /** - * ָ - * @param data - * @return - */ - public static byte[][] splitData(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize>0?1:0; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean Start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - //judpSocket jsocket=new judpSocket(csocket); - - //SocketManager.getInstance().addGC(jsocket,csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ -UDTSocket socket=SocketControls.getInstance().getSocket(); -judpSocket jsocket=new judpSocket(socket); -//judpSocket jsocket= sessionHandoff.take(); -return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8c/706d27faa0ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/8c/706d27faa0ad0017181ed9113883eda9 deleted file mode 100644 index 04bf814..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/8c/706d27faa0ad0017181ed9113883eda9 +++ /dev/null @@ -1,50 +0,0 @@ -/** - * - */ -package net.File; - -import java.util.logging.Logger; - -import net.File.FileMonitor; -import net.File.FilesWatch; - - - - -/** - * @author jinyu - * - */ -public class TestSendFiles { - private static Logger log=Logger.getLogger(TestSendFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //SendFiles send=new SendFiles("192.168.9.152", 5555); - //192.168.30.128 - ReadXml rd=new ReadXml(); - String xml= rd.readXml("config.xml"); - String[] config=null; - if(xml!=null) - { - - } - SendFiles send=new SendFiles("192.168.30.128", 5555); - FilesWatch watch=new FilesWatch(); - String dir="F:/monitor"; - watch.setWatch(dir); - watch.start(); - while(true) - { - FileMonitor ff= watch.take(); - log.info(ff.file); - if(ff.file.endsWith(".tmp")) - { - continue; - } - send.sendFile(dir+"/"+ff.file); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8d/402cdc156aa800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/8d/402cdc156aa800171a8482560d609ceb deleted file mode 100644 index 94865bd..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/8d/402cdc156aa800171a8482560d609ceb +++ /dev/null @@ -1,113 +0,0 @@ -/** - * - */ -package judp; - -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.SynchronousQueue; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean Start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - //judpSocket jsocket=new judpSocket(csocket); - - //SocketManager.getInstance().addGC(jsocket,csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=SocketControls.getInstance().getSocket(); - } - judpSocket jsocket=new judpSocket(socket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8d/e0ba0b7bd4ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/8d/e0ba0b7bd4ac001716b9ca6d5abb90bc deleted file mode 100644 index 7963bec..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/8d/e0ba0b7bd4ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,254 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸ - buffer[readPosition]=null;// - } - - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8e/4072bac31bac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/8e/4072bac31bac001710ff8a7c6bda0fb8 deleted file mode 100644 index 573e0a2..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/8e/4072bac31bac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,26 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -/** - * @author jinyu - * - */ -public class PackagetCombin { - private static ConcurrentHashMap hash=new ConcurrentHashMap(); -public static void addData(byte[] data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - DataStruct struct=hash.get(id); - if(struct==null) - { - struct=new DataStruct(); - hash.put(id, struct); - } - struct.a -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8e/40caa7ab5ba800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/8e/40caa7ab5ba800171a8482560d609ceb deleted file mode 100644 index ac9ea61..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/8e/40caa7ab5ba800171a8482560d609ceb +++ /dev/null @@ -1,196 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.UDTStatistics; - -public class UDTClient { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - private final UDPEndPoint clientEndpoint; - private ClientSession clientSession; - private boolean close=false; - private Thread closeThread=null;//cd - public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address,localport); - logger.info("Created client endpoint on port "+localport); - } - - public UDTClient(InetAddress address)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address); - logger.info("Created client endpoint on port "+clientEndpoint.getLocalPort()); - } - - public UDTClient(UDPEndPoint endpoint)throws SocketException, UnknownHostException{ - clientEndpoint=endpoint; - } - - /** - * establishes a connection to the given server. - * Starts the sender thread. - * @param host - * @param port - * @throws UnknownHostException - */ - public void connect(String host, int port)throws InterruptedException, UnknownHostException, IOException{ - InetAddress address=InetAddress.getByName(host); - Destination destination=new Destination(address,port); - //create client session... - clientSession=new ClientSession(clientEndpoint,destination); - clientEndpoint.addSession(clientSession.getSocketID(), clientSession); - - clientEndpoint.start(); - clientSession.connect(); - //wait for handshake - while(!clientSession.isReady()){ - Thread.sleep(500); - } - logger.info("The UDTClient is connected"); - Thread.sleep(500); - } - - /** - * sends the given data asynchronously - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - public void send(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWrite(data); - } - - public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWriteBlocking(data); - } - - public int read(byte[]data)throws IOException, InterruptedException{ - return clientSession.getSocket().getInputStream().read(data); - } - - /** - * flush outstanding data (and make sure it is acknowledged) - * @throws IOException - * @throws InterruptedException - */ - public void flush()throws IOException, InterruptedException{ - clientSession.getSocket().flush(); - } - - - public void shutdown()throws IOException{ - - if (clientSession.isReady()&& clientSession.active==true) - { - Shutdown shutdown = new Shutdown(); - shutdown.setDestinationID(clientSession.getDestination().getSocketID()); - shutdown.setSession(clientSession); - try{ - clientEndpoint.doSend(shutdown); - TimeUnit.MILLISECONDS.sleep(100); - } - catch(Exception e) - { - logger.log(Level.SEVERE,"ERROR: Connection could not be stopped!",e); - } - clientSession.getSocket().getReceiver().stop(); - clientEndpoint.stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - close=true; - } - } - - public UDTInputStream getInputStream()throws IOException{ - return clientSession.getSocket().getInputStream(); - } - - public UDTOutputStream getOutputStream()throws IOException{ - return clientSession.getSocket().getOutputStream(); - } - - public UDPEndPoint getEndpoint()throws IOException{ - return clientEndpoint; - } - - public UDTStatistics getStatistics(){ - return clientSession.getStatistics(); - } - - public long getSocketID() - { - //cd - return clientSession.getSocketID(); - } - - /** - * ͬر - * ȴݷɺٹر - * ֻȴ10ss - */ - public synchronized void close() - { - close=true; - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - - - } - - }) - } - - } - - public boolean isClose() - { - return close; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8e/603dcdc705ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/8e/603dcdc705ac001710ff8a7c6bda0fb8 deleted file mode 100644 index ff8d242..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/8e/603dcdc705ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,92 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.WeakHashMap; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private final ReferenceQueue q = new ReferenceQueue(); - private long num=0; - /** - * ʹ - */ - private final WeakHashMap hashMap=new WeakHashMap (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("socket"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8e/c06f82a71aac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/8e/c06f82a71aac001710ff8a7c6bda0fb8 deleted file mode 100644 index cbf2344..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/8e/c06f82a71aac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,13 +0,0 @@ -/** - * - */ -package judp; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[] data; -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8f/70ff0f2bf7ab001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/8f/70ff0f2bf7ab001710ff8a7c6bda0fb8 deleted file mode 100644 index 47fb712..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/8f/70ff0f2bf7ab001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,125 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); -private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - // - if(!list.isEmpty()) - { - for(int i=0;i=buffer.length) - { - //ɹ - if(sum==dataLen) - { - //ʼ - result=new byte[dataLen]; - ByteBuffer cur=ByteBuffer.wrap(result); - for(int i=0;i hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ - if(highestReadSequenceNumber+1 hash=new ConcurrentHashMap(); -private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - // - if(!list.isEmpty()) - { - //ƳѾɹsocket - for(int i=0;i0){ - int len=Math.min(bb.remaining(),chunksize); - byte[]chunk=new byte[len]; - bb.get(chunk); - DataPacket packet=new DataPacket(); - seqNo=sender.getNextSequenceNumber(); - packet.setPacketSequenceNumber(seqNo); - packet.setSession(session); - packet.setDestinationID(session.getDestination().getSocketID()); - packet.setData(chunk); - //put the packet into the send queue - if(!sender.sendUdtPacket(packet, timeout, units)){ - throw new IOException("Queue full"); - } - } - if(length>0)active=true; - } - /** - * will block until the outstanding packets have really been sent out - * and acknowledged - */ - protected void flush() throws InterruptedException{ - if(!active)return; - final long seqNo=sender.getCurrentSequenceNumber(); - if(seqNo<0)throw new IllegalStateException(); - while(!sender.isSentOut(seqNo)){ - Thread.sleep(5); - } - if(seqNo>-1){ - //wait until data has been sent out and acknowledged - while(active && !sender.haveAcknowledgementFor(seqNo)){ - sender.waitForAck(seqNo); - } - } - //TODO need to check if we can pause the sender... - //sender.pause(); - } - - //writes and wait for ack - protected void doWriteBlocking(byte[]data)throws IOException, InterruptedException{ - doWrite(data); - flush(); - } - - /** - * close the connection - * @throws IOException - */ - public void close()throws IOException{ - if(inputStream!=null)inputStream.close(); - if(outputStream!=null)outputStream.close(); - active=false; - close=true; - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/93/2080768c98ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/93/2080768c98ad0017181ed9113883eda9 deleted file mode 100644 index cb3a344..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/93/2080768c98ad0017181ed9113883eda9 +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.IOException; -import java.util.logging.Logger; - - - - -/** - * @author jinyu - * - */ -public class TestRecFiles { - private static Logger log=Logger.getLogger(TestRecFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //192.168.30.128 - RecviceFiles rec=new RecviceFiles(); - String dir="/home/jinyu/recFiles"; - rec.setDir(dir); - rec.start("192.168.30.128", 5555); - log.info("ļ"); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/93/b0b2529ed9ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/93/b0b2529ed9ac001716b9ca6d5abb90bc deleted file mode 100644 index 3735d11..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/93/b0b2529ed9ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,154 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.UnsupportedEncodingException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=10*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - while((count=dis.read(buf,0, bufSize))!=-1) - { - log.info("1:"); - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - log.info(":"+sum); - - } - client.close(); - dis.close(); - log.info("ɣ"+f.getName()); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/93/e0abad5a03ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/93/e0abad5a03ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 6135c1a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/93/e0abad5a03ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,21 +0,0 @@ -/** - * - */ -package judp; - - -import java.lang.ref.WeakReference; - -/** - * @author jinyu - * @param - * - */ -public class SocketReference extends WeakReference { - private final long id=-1; - public SocketReference(T referent) { - super(referent); - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/93/f0f80f7ad8ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/93/f0f80f7ad8ac001716b9ca6d5abb90bc deleted file mode 100644 index 855d7e3..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/93/f0f80f7ad8ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,363 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public void setRecBufferSize(int size) -{ - bufSize=size; -} -public boolean getCloseState() -{ - //ײѾر - return isClose|socket.isClose(); -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(getCloseState()) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - while(true) - { - if(getCloseState()) - { - return null; - } - r=readData(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } - - return result; -} - - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(getCloseState()) - { - return false; - } - try { - - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(getCloseState()) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;i - * - */ -public class SocketReference extends WeakReference { - private long socketid=-1; - public SocketReference(T referent) { - super(referent); - - } - public SocketReference(T referent,long id) { - super(referent); - this.socketid=id; - } - public SocketReference(T referent, long id, ReferenceQueue q) { - super(referent,q); - this.socketid=id; - } - public long getid() - { - return socketid; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/94/80509c7cd5ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/94/80509c7cd5ac001716b9ca6d5abb90bc deleted file mode 100644 index 76c9a58..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/94/80509c7cd5ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,254 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/94/c0c4843f89ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/94/c0c4843f89ad0017181ed9113883eda9 deleted file mode 100644 index 848dcde..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/94/c0c4843f89ad0017181ed9113883eda9 +++ /dev/null @@ -1,190 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.SocketException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.SequenceNumber; - -/** - * Client side of a client-server UDT connection. - * Once established, the session provides a valid {@link UDTSocket}. - */ -public class ClientSession extends UDTSession { - - private static final Logger logger=Logger.getLogger(ClientSession.class.getName()); - - private UDPEndPoint endPoint; - - public ClientSession(UDPEndPoint endPoint, Destination dest)throws SocketException{ - super("ClientSession localPort="+endPoint.getLocalPort(),dest); - this.endPoint=endPoint; - logger.info("Created "+toString()); - } - - /** - * send connection handshake until a reply from server is received - * TODO check for timeout - * @throws InterruptedException - * @throws IOException - */ - - public void connect() throws InterruptedException,IOException{ - int n=0; - - while(getState()!=ready){ - - sendHandShake(); - if(getState()==invalid)throw new IOException("Can't connect!"); - n++; - if(getState()!=ready)Thread.sleep(500); - } - - cc.init(); - logger.info("Connected, "+n+" handshake packets sent"); - } - - @Override - public void received(UDTPacket packet, Destination peer) { - - lastPacket=packet; - - if (packet instanceof ConnectionHandshake) { - ConnectionHandshake hs=(ConnectionHandshake)packet; - - logger.info("Received connection handshake from "+peer+"\n"+hs); - - if (getState()!=ready) { - if(hs.getConnectionType()==1){ - try{ - //TODO validate parameters sent by peer - long peerSocketID=hs.getSocketID(); - destination.setSocketID(peerSocketID); - sendConfirmation(hs); - }catch(Exception ex){ - logger.log(Level.WARNING,"Error creating socket",ex); - setState(invalid); - } - return; - } - else{ - try{ - //TODO validate parameters sent by peer - long peerSocketID=hs.getSocketID(); - destination.setSocketID(peerSocketID); - setState(ready); - Thread.sleep(50); - logger.info("ʼû:"+hs.getInitialSeqNo()); - System.out.println("ʼû1:"+hs.getInitialSeqNo()); - this.setInitialSequenceNumber(hs.getInitialSeqNo());//cd - System.out.println("ʼû2:"+this.getInitialSequenceNumber()); - socket=new UDTSocket(endPoint,this); - - - }catch(Exception ex){ - logger.log(Level.WARNING,"Error creating socket",ex); - setState(invalid); - } - return; - } - } - } - - if(getState() == ready) { - - if(packet instanceof Shutdown){ - setState(shutdown); - active=false; - logger.info("Connection shutdown initiated by the other side."); - return; - } - active = true; - try{ - if(packet.forSender()){ - socket.getSender().receive(lastPacket); - }else{ - socket.getReceiver().receive(lastPacket); - } - }catch(Exception ex){ - //session is invalid - logger.log(Level.SEVERE,"Error in "+toString(),ex); - setState(invalid); - } - return; - } - } - - - //handshake for connect - protected void sendHandShake()throws IOException{ - ConnectionHandshake handshake = new ConnectionHandshake(); - handshake.setConnectionType(ConnectionHandshake.CONNECTION_TYPE_REGULAR); - handshake.setSocketType(ConnectionHandshake.SOCKET_TYPE_DGRAM); - long initialSequenceNo=SequenceNumber.random(); - setInitialSequenceNumber(initialSequenceNo); - handshake.setInitialSeqNo(initialSequenceNo); - handshake.setPacketSize(getDatagramSize()); - handshake.setSocketID(mySocketID); - handshake.setMaxFlowWndSize(flowWindowSize); - handshake.setSession(this); - logger.info("Sending "+handshake); - endPoint.doSend(handshake); - } - - //2nd handshake for connect - protected void sendConfirmation(ConnectionHandshake hs)throws IOException{ - ConnectionHandshake handshake = new ConnectionHandshake(); - handshake.setConnectionType(-1); - handshake.setSocketType(ConnectionHandshake.SOCKET_TYPE_DGRAM); - handshake.setInitialSeqNo(hs.getInitialSeqNo()); - handshake.setPacketSize(hs.getPacketSize()); - handshake.setSocketID(mySocketID); - handshake.setMaxFlowWndSize(flowWindowSize); - handshake.setSession(this); - logger.info("Sending confirmation "+handshake); - endPoint.doSend(handshake); - } - - - public UDTPacket getLastPkt(){ - return lastPacket; - } - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/94/c0e9a906f7ab001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/94/c0e9a906f7ab001710ff8a7c6bda0fb8 deleted file mode 100644 index 8e5e548..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/94/c0e9a906f7ab001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,115 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.TimeUnit; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); -private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - // - if(!list.isEmpty()) - { - for(int i=0;i fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private long sumBytes=0; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData(byte[] data) - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - - - } - - }); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/94/c0f5f1f904ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/94/c0f5f1f904ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 1865828..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/94/c0f5f1f904ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,33 +0,0 @@ -/** - * - */ -package judp; - - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; - -/** - * @author jinyu - * @param - * - */ -public class SocketReference extends WeakReference { - private long socketid=-1; - public SocketReference(T referent) { - super(referent); - - } - public SocketReference(T referent,long id) { - super(referent); - this.socketid=id; - } - public SocketReference(T referent, long socketID, ReferenceQueue q) { - super(referent,q); - this.socketid=id; - } - public long getid() - { - return socketid; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/95/106ce8205ca800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/95/106ce8205ca800171a8482560d609ceb deleted file mode 100644 index 5a0a8c9..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/95/106ce8205ca800171a8482560d609ceb +++ /dev/null @@ -1,199 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.UDTStatistics; - -public class UDTClient { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - private final UDPEndPoint clientEndpoint; - private ClientSession clientSession; - private boolean close=false; - private Thread closeThread=null;//cd - public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address,localport); - logger.info("Created client endpoint on port "+localport); - } - - public UDTClient(InetAddress address)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address); - logger.info("Created client endpoint on port "+clientEndpoint.getLocalPort()); - } - - public UDTClient(UDPEndPoint endpoint)throws SocketException, UnknownHostException{ - clientEndpoint=endpoint; - } - - /** - * establishes a connection to the given server. - * Starts the sender thread. - * @param host - * @param port - * @throws UnknownHostException - */ - public void connect(String host, int port)throws InterruptedException, UnknownHostException, IOException{ - InetAddress address=InetAddress.getByName(host); - Destination destination=new Destination(address,port); - //create client session... - clientSession=new ClientSession(clientEndpoint,destination); - clientEndpoint.addSession(clientSession.getSocketID(), clientSession); - - clientEndpoint.start(); - clientSession.connect(); - //wait for handshake - while(!clientSession.isReady()){ - Thread.sleep(500); - } - logger.info("The UDTClient is connected"); - Thread.sleep(500); - } - - /** - * sends the given data asynchronously - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - public void send(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWrite(data); - } - - public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWriteBlocking(data); - } - - public int read(byte[]data)throws IOException, InterruptedException{ - return clientSession.getSocket().getInputStream().read(data); - } - - /** - * flush outstanding data (and make sure it is acknowledged) - * @throws IOException - * @throws InterruptedException - */ - public void flush()throws IOException, InterruptedException{ - clientSession.getSocket().flush(); - } - - - public void shutdown()throws IOException{ - - if (clientSession.isReady()&& clientSession.active==true) - { - Shutdown shutdown = new Shutdown(); - shutdown.setDestinationID(clientSession.getDestination().getSocketID()); - shutdown.setSession(clientSession); - try{ - clientEndpoint.doSend(shutdown); - TimeUnit.MILLISECONDS.sleep(100); - } - catch(Exception e) - { - logger.log(Level.SEVERE,"ERROR: Connection could not be stopped!",e); - } - clientSession.getSocket().getReceiver().stop(); - clientEndpoint.stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - close=true; - } - } - - public UDTInputStream getInputStream()throws IOException{ - return clientSession.getSocket().getInputStream(); - } - - public UDTOutputStream getOutputStream()throws IOException{ - return clientSession.getSocket().getOutputStream(); - } - - public UDPEndPoint getEndpoint()throws IOException{ - return clientEndpoint; - } - - public UDTStatistics getStatistics(){ - return clientSession.getStatistics(); - } - - public long getSocketID() - { - //cd - return clientSession.getSocketID(); - } - - /** - * ͬر - * ȴݷɺٹر - * ֻȴ10ss - */ - public synchronized void close() - { - close=true; - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - clientSession. - } - - } - - }); - } - - } - - public boolean isClose() - { - return close; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/95/80feebb422ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/95/80feebb422ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 38700f4..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/95/80feebb422ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,217 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public void pauseOutput() - { - try { - client.getOutputStream().pauseOutput(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - /** - * ȡ - * @return - */ - public byte[] read() - { - byte[] result=null; - if(client!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(client.isClose()) - { - return null; - } - r=client.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; - } - public int read(byte[]data) - { - try { - return client.read(data); - } catch (IOException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - return -1; - } - - /** - * ر - */ - public void close() - { - if(client!=null) - { - if(sumLen==0) - { - //ûз - //ر - try { - if(!client.isClose()) - client.shutdown(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - else - { - //ʼ - //SocketManager.getInstance().add(client); - if(!client.isClose()) - client.close(); - } - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/95/d0b13b4665a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/95/d0b13b4665a800171a8482560d609ceb deleted file mode 100644 index f1d0563..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/95/d0b13b4665a800171a8482560d609ceb +++ /dev/null @@ -1,67 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.Map; -import java.util.Map.Entry; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - - for(Entry entry:hash.entrySet()) - { - - } - } - - }); - processSocket.setDaemon(true); - processSocket.setName("processSocket"); - processSocket.start(); - -} - -public static synchronized SocketControls getInstance() { - - if (instance == null) { - - instance = new SocketControls(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/96/50660e361aac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/96/50660e361aac001710ff8a7c6bda0fb8 deleted file mode 100644 index 589d1a5..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/96/50660e361aac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,74 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=20; - public static byte[][] split(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - byte[][] result=new byte[num][]; - for(int i=0;i=buffer.length) - { - //ɹ - - } -} -public boolean addData(byte[]data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - int index=buf.getInt(); - dataLen=buf.getInt(); - byte[] tmp=new byte[buf.limit()-buf.position()]; - buf.get(tmp); - buffer[index]=tmp; - num++; - sum+=tmp.length; -} - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/98/40b88e4fdeac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/98/40b88e4fdeac001716b9ca6d5abb90bc deleted file mode 100644 index 73c5430..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/98/40b88e4fdeac001716b9ca6d5abb90bc +++ /dev/null @@ -1,183 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long startTime=System.currentTimeMillis(); - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - long speed=0; - try - { - long speed=sumBytes/((System.currentTimeMillis()-startTime)/1000); - } - - log.info("ļٶȣ"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/98/806ec5ec63a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/98/806ec5ec63a800171a8482560d609ceb deleted file mode 100644 index 3b94973..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/98/806ec5ec63a800171a8482560d609ceb +++ /dev/null @@ -1,21 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; -import java.util.concurrent.ConcurrentHashMap; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private ConcurrentHashMap hash=new ConcurrentHashMap(); -public void addSocket(UDTSocket socket) -{ - hash.get(socket.getSession().getDestination().getSocketID()); - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/98/905f0aa3a3ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/98/905f0aa3a3ad0017181ed9113883eda9 deleted file mode 100644 index 37a1e18..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/98/905f0aa3a3ad0017181ed9113883eda9 +++ /dev/null @@ -1,369 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -//private int readLen=0; -public int dataLen=0; -public void setRecBufferSize(int size) -{ - bufSize=size; -} -public boolean getCloseState() -{ - //ײѾر - return isClose|socket.isClose(); -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - break; - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(getCloseState()) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - //readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - while(true) - { - if(getCloseState()) - { - return null; - } - r=readData(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - // readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } - - return result; -} - - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(getCloseState()) - { - return false; - } - try { - - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(getCloseState()) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - //client.decreNum(); - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - } - - } - client.close(); - dis.close(); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/98/e0ddaa03e4ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/98/e0ddaa03e4ac001716b9ca6d5abb90bc deleted file mode 100644 index 4d70528..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/98/e0ddaa03e4ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,209 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - ConcurrentLinkedQueue recData=new ConcurrentLinkedQueue(); - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData(byte[] data) - { - - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/99/0038300d04ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/99/0038300d04ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 71a5f57..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/99/0038300d04ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,70 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private LinkedBlockingQueue> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - while((k = (SocketReference) q.remove()) != null) { - - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - private void startThread() { - - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/99/108ba746dbac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/99/108ba746dbac001716b9ca6d5abb90bc deleted file mode 100644 index 6275295..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/99/108ba746dbac001716b9ca6d5abb90bc +++ /dev/null @@ -1,88 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] buffer=null; -public long id; -private volatile int sumNum=0; -private volatile int sumLen=0; -private byte[] result=null; -public DataStruct(int num) -{ - buffer=new byte[num][]; -} - -/** - * - * @return - */ -private boolean check() -{ - if(sumNum>=buffer.length) - { - //ɹ - if(sumLen==dataLen) - { - //ʼ - result=new byte[dataLen]; - ByteBuffer cur=ByteBuffer.wrap(result); - for(int i=0;ihandoffQueue; - - private Thread receiverThread; - - private volatile boolean stopped=false; - - //(optional) ack interval (see CongestionControl interface) - private volatile long ackInterval=-1; - - /** - * if set to true connections will not expire, but will only be - * closed by a Shutdown message - */ - public static boolean connectionExpiryDisabled=false; - - private final boolean storeStatistics; - - - - /** - * create a receiver with a valid {@link UDTSession} - * @param session - */ - public UDTReceiver(UDTSession session,UDPEndPoint endpoint){ - this.endpoint = endpoint; - this.session=session; - this.sessionUpSince=System.currentTimeMillis(); - this.statistics=session.getStatistics(); - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - ackHistoryWindow = new AckHistoryWindow(16); - packetHistoryWindow = new PacketHistoryWindow(16); - receiverLossList = new ReceiverLossList(); - packetPairWindow = new PacketPairWindow(16); - largestReceivedSeqNumber=session.getInitialSequenceNumber()-1; - bufferSize=session.getReceiveBufferSize(); - handoffQueue=new ArrayBlockingQueue(4*session.getFlowWindowSize()); - storeStatistics=Boolean.getBoolean("udt.receiver.storeStatistics"); - initMetrics(); - start(); - } - - private MeanValue dgReceiveInterval; - private MeanValue dataPacketInterval; - private MeanValue processTime; - private MeanValue dataProcessTime; - private void initMetrics(){ - if(!storeStatistics)return; - dgReceiveInterval=new MeanValue("UDT receive interval"); - statistics.addMetric(dgReceiveInterval); - dataPacketInterval=new MeanValue("Data packet interval"); - statistics.addMetric(dataPacketInterval); - processTime=new MeanValue("UDT packet process time"); - statistics.addMetric(processTime); - dataProcessTime=new MeanValue("Data packet process time"); - statistics.addMetric(dataProcessTime); - } - - - //starts the sender algorithm - private void start(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - nextACK=Util.getCurrentTime()+ackTimerInterval; - nextNAK=(long)(Util.getCurrentTime()+1.5*nakTimerInterval); - nextEXP=Util.getCurrentTime()+2*expTimerInterval; - ackInterval=session.getCongestionControl().getAckInterval(); - while(!stopped){ - receiverAlgorithm(); - } - } - catch(Exception ex){ - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING RECEIVER for "+session); - } - }; - receiverThread=UDTThreadFactory.get().newThread(r); - receiverThread.start(); - } - - /* - * packets are written by the endpoint - */ - protected void receive(UDTPacket p)throws IOException{ - if(storeStatistics)dgReceiveInterval.end(); - handoffQueue.offer(p); - if(storeStatistics)dgReceiveInterval.begin(); - } - - /** - * receiver algorithm - * see specification P11. - */ - public void receiverAlgorithm()throws InterruptedException,IOException{ - //check ACK timer - long currentTime=Util.getCurrentTime(); - if(nextACKseqNumbers=receiverLossList.getFilteredSequenceNumbers(roundTripTime,true); - sendNAK(seqNumbers); - } - - /** - * process EXP event (see spec. p 13) - */ - protected void processEXPEvent()throws IOException{ - if(session.getSocket()==null)return; - UDTSender sender=session.getSocket().getSender(); - //put all the unacknowledged packets in the senders loss list - sender.putUnacknowledgedPacketsIntoLossList(); - if(expCount>16 && System.currentTimeMillis()-sessionUpSince > IDLE_TIMEOUT){ - if(!connectionExpiryDisabled &&!stopped){ - sendShutdown(); - stop(); - logger.info("Session "+session+" expired."); - return; - } - } - if(!sender.haveLostPackets()){ - sendKeepAlive(); - } - expCount++; - } - - protected void processUDTPacket(UDTPacket p)throws IOException{ - //(3).Check the packet type and process it according to this. - - if(!p.isControlPacket()){ - DataPacket dp=(DataPacket)p; - if(storeStatistics){ - dataPacketInterval.end(); - dataProcessTime.begin(); - } - onDataPacketReceived(dp); - if(storeStatistics){ - dataProcessTime.end(); - dataPacketInterval.begin(); - } - logger.info("DataPacket udt:"+p.getPacketSequenceNumber()); - } - - else if (p.getControlPacketType()==ControlPacketType.ACK2.ordinal()){ - Acknowledgment2 ack2=(Acknowledgment2)p; - onAck2PacketReceived(ack2); - } - - else if (p instanceof Shutdown){ - onShutdown(); - } - - } - - //every nth packet will be discarded... for testing only of course - public static int dropRate=0; - - //number of received data packets - private int n=0; - - protected void onDataPacketReceived(DataPacket dp)throws IOException{ - long currentSequenceNumber = dp.getPacketSequenceNumber(); - - //for TESTING : check whether to drop this packet -// n++; -// //if(dropRate>0 && n % dropRate == 0){ -// if(n % 1111 == 0){ -// logger.info("**** TESTING:::: DROPPING PACKET "+currentSequenceNumber+" FOR TESTING"); -// return; -// } -// //} - boolean OK=session.getSocket().getInputStream().haveNewData(currentSequenceNumber,dp.getData()); - if(!OK){ - //need to drop packet... - return; - } - - long currentDataPacketArrivalTime = Util.getCurrentTime(); - - /*(4).if the seqNo of the current data packet is 16n+1,record the - time interval between this packet and the last data packet - in the packet pair window*/ - if((currentSequenceNumber%16)==1 && lastDataPacketArrivalTime>0){ - long interval=currentDataPacketArrivalTime -lastDataPacketArrivalTime; - packetPairWindow.add(interval); - } - - //(5).record the packet arrival time in the PKT History Window. - packetHistoryWindow.add(currentDataPacketArrivalTime); - - - //store current time - lastDataPacketArrivalTime=currentDataPacketArrivalTime; - - - //(6).number of detected lossed packet - /*(6.a).if the number of the current data packet is greater than LSRN+1, - put all the sequence numbers between (but excluding) these two values - into the receiver's loss list and send them to the sender in an NAK packet*/ - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber+1)>0){ - sendNAK(currentSequenceNumber); - logger.info("sendNAK:"+currentSequenceNumber); - } - else if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)<0){ - /*(6.b).if the sequence number is less than LRSN,remove it from - * the receiver's loss list - */ - receiverLossList.remove(currentSequenceNumber); - logger.info("receiverLossList remove:"+currentSequenceNumber); - } - logger.info("largestReceivedSeqNumber:"+largestReceivedSeqNumber); - statistics.incNumberOfReceivedDataPackets(); - - //(7).Update the LRSN - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)>0){ - largestReceivedSeqNumber=currentSequenceNumber; - } - - //(8) need to send an ACK? Some cc algorithms use this - if(ackInterval>0){ - if(n % ackInterval == 0)processACKEvent(false); - } - } - - /** - * write a NAK triggered by a received sequence number that is larger than - * the largestReceivedSeqNumber + 1 - * @param currentSequenceNumber - the currently received sequence number - * @throws IOException - */ - protected void sendNAK(long currentSequenceNumber)throws IOException{ - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(largestReceivedSeqNumber+1, currentSequenceNumber); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - //put all the sequence numbers between (but excluding) these two values into the - //receiver loss list - for(long i=largestReceivedSeqNumber+1;isequenceNumbers)throws IOException{ - if(sequenceNumbers.size()==0)return; - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(sequenceNumbers); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(nAckPacket); - statistics.incNumberOfNAKSent(); - logger.info("sendNAK List:"+sequenceNumbers.size()); - } - - protected long sendLightAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt=buildLightAcknowledgement(ackNumber); - endpoint.doSend(acknowledgmentPkt); - statistics.incNumberOfACKSent(); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - protected long sendAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); - //set the estimate link capacity - estimateLinkCapacity=packetPairWindow.getEstimatedLinkCapacity(); - acknowledgmentPkt.setEstimatedLinkCapacity(estimateLinkCapacity); - //set the packet arrival rate - packetArrivalSpeed=packetHistoryWindow.getPacketArrivalSpeed(); - acknowledgmentPkt.setPacketReceiveRate(packetArrivalSpeed); - - endpoint.doSend(acknowledgmentPkt); - - statistics.incNumberOfACKSent(); - statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - //builds a "light" Acknowledgement - private Acknowledgement buildLightAcknowledgement(long ackNumber){ - Acknowledgement acknowledgmentPkt = new Acknowledgement(); - //the packet sequence number to which all the packets have been received - acknowledgmentPkt.setAckNumber(ackNumber); - //assign this ack a unique increasing ACK sequence number - acknowledgmentPkt.setAckSequenceNumber(++ackSequenceNumber); - acknowledgmentPkt.setRoundTripTime(roundTripTime); - acknowledgmentPkt.setRoundTripTimeVar(roundTripTimeVar); - //set the buffer size - acknowledgmentPkt.setBufferSize(bufferSize); - - acknowledgmentPkt.setDestinationID(session.getDestination().getSocketID()); - acknowledgmentPkt.setSession(session); - - return acknowledgmentPkt; - } - - /** - * spec p. 13:
- 1) Locate the related ACK in the ACK History Window according to the - ACK sequence number in this ACK2.
- 2) Update the largest ACK number ever been acknowledged.
- 3) Calculate new rtt according to the ACK2 arrival time and the ACK - departure time, and update the RTT value as: RTT = (RTT * 7 + - rtt) / 8.
- 4) Update RTTVar by: RTTVar = (RTTVar * 3 + abs(RTT - rtt)) / 4.
- 5) Update both ACK and NAK period to 4 * RTT + RTTVar + SYN.
- */ - protected void onAck2PacketReceived(Acknowledgment2 ack2){ - AckHistoryEntry entry=ackHistoryWindow.getEntry(ack2.getAckSequenceNumber()); - if(entry!=null){ - long ackNumber=entry.getAckNumber(); - largestAcknowledgedAckNumber=Math.max(ackNumber, largestAcknowledgedAckNumber); - - long rtt=entry.getAge(); - if(roundTripTime>0)roundTripTime = (roundTripTime*7 + rtt)/8; - else roundTripTime = rtt; - roundTripTimeVar = (roundTripTimeVar* 3 + Math.abs(roundTripTimeVar- rtt)) / 4; - ackTimerInterval=4*roundTripTime+roundTripTimeVar+Util.getSYNTime(); - nakTimerInterval=ackTimerInterval; - statistics.setRTT(roundTripTime, roundTripTimeVar); - } - } - - protected void sendKeepAlive()throws IOException{ - KeepAlive ka=new KeepAlive(); - ka.setDestinationID(session.getDestination().getSocketID()); - ka.setSession(session); - endpoint.doSend(ka); - } - - protected void sendShutdown()throws IOException{ - Shutdown s=new Shutdown(); - s.setDestinationID(session.getDestination().getSocketID()); - s.setSession(session); - endpoint.doSend(s); - } - - private volatile long ackSequenceNumber=0; - - protected void resetEXPTimer(){ - nextEXP=Util.getCurrentTime()+expTimerInterval; - expCount=0; - } - - protected void resetEXPCount(){ - expCount=0; - } - - public void setAckInterval(long ackInterval){ - this.ackInterval=ackInterval; - } - - protected void onShutdown()throws IOException{ - stop(); - } - - public void stop()throws IOException{ - stopped=true; - session.getSocket().close(); - //stop our sender as well - session.getSocket().getSender().stop(); - } - - @Override - public String toString(){ - StringBuilder sb=new StringBuilder(); - sb.append("UDTReceiver ").append(session).append("\n"); - sb.append("LossList: "+receiverLossList); - return sb.toString(); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/9a/5047c66c59ac00171c63d91e40f02a62 b/.metadata/.plugins/org.eclipse.core.resources/.history/9a/5047c66c59ac00171c63d91e40f02a62 deleted file mode 100644 index 66b8f57..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/9a/5047c66c59ac00171c63d91e40f02a62 +++ /dev/null @@ -1,153 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.UnsupportedEncodingException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=20*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - log.info(":"+sum); - } - client.close(); - dis.close(); - log.info("ɣ"+f.getName()); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/9a/9020bf8105ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/9a/9020bf8105ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 82c88da..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/9a/9020bf8105ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,92 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.WeakHashMap; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private final ReferenceQueue q = new ReferenceQueue(); - - /** - * ʹ - */ - private final WeakHashMap hashMap=new WeakHashMap (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/9a/90e58c27dbac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/9a/90e58c27dbac001716b9ca6d5abb90bc deleted file mode 100644 index b759723..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/9a/90e58c27dbac001716b9ca6d5abb90bc +++ /dev/null @@ -1,291 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.io.InputStream; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; -import udt.util.ReceiveBuffer; - -/** - * The UDTInputStream receives data blocks from the {@link UDTSocket} - * as they become available, and places them into an ordered, - * bounded queue (the flow window) for reading by the application - * - * - */ -public class UDTInputStream extends InputStream { - - //the socket owning this inputstream - private final UDTSocket socket; - - private final ReceiveBuffer receiveBuffer; - - //set to 'false' by the receiver when it gets a shutdown signal from the peer - //see the noMoreData() method - private final AtomicBoolean expectMoreData=new AtomicBoolean(true); - - private volatile boolean closed=false; - - private volatile boolean blocking=true; - - private volatile boolean hasData=false;//cd - - - - /** - * create a new {@link UDTInputStream} connected to the given socket - * @param socket - the {@link UDTSocket} - * @throws IOException - */ - public UDTInputStream(UDTSocket socket)throws IOException{ - this.socket=socket; - int capacity=socket!=null? 2 * socket.getSession().getFlowWindowSize() : 128 ; - long initialSequenceNum=socket!=null?socket.getSession().getInitialSequenceNumber():1; - receiveBuffer=new ReceiveBuffer(capacity,initialSequenceNum); - } - - private final byte[]single=new byte[1]; - - @Override - public int read()throws IOException{ - int b=0; - while(b==0) - b=read(single); - - if(b>0){ - return single[0]; - } - else { - return b; - } - } - - private AppData currentChunk=null; - //offset into currentChunk - int offset=0; - long id=-1; - @Override - public int read(byte[]target)throws IOException{ - try{ - int read=0; - updateCurrentChunk(false); - while(currentChunk!=null){ - byte[]data=currentChunk.data; - int length=Math.min(target.length-read,data.length-offset); - System.arraycopy(data, offset, target, read, length); - read+=length; - offset+=length; - //check if chunk has been fully read - if(offset>=data.length){ - currentChunk=null; - offset=0; - } - - //if no more space left in target, exit now - if(read==target.length){ - return read; - } - - updateCurrentChunk(blocking && read==0); - } - - if(read>0)return read; - if(closed)return -1; - if(expectMoreData.get() || !receiveBuffer.isEmpty())return 0; - //no more data - return -1; - - }catch(Exception ex){ - IOException e= new IOException(); - e.initCause(ex); - throw e; - } - } - - /** - * Reads the next valid chunk of application data from the queue
- * - * In blocking mode,this method will block until data is available or the socket is closed, - * otherwise it will wait for at most 10 milliseconds. - * - * @throws InterruptedException - */ - private void updateCurrentChunk(boolean block)throws IOException{ - if(currentChunk!=null)return; - - while(true){ - try{ - if(block){ - currentChunk=receiveBuffer.poll(1, TimeUnit.MILLISECONDS); - while (!closed && currentChunk==null){ - currentChunk=receiveBuffer.poll(1000, TimeUnit.MILLISECONDS); - } - } - else currentChunk=receiveBuffer.poll(10, TimeUnit.MILLISECONDS); - - }catch(InterruptedException ie){ - IOException ex=new IOException(); - ex.initCause(ie); - throw ex; - } - return; - } - } - - /** - * new application data - * @param data - * - */ - protected boolean haveNewData(long sequenceNumber,byte[]data)throws IOException{ - hasData=true; - return receiveBuffer.offer(new AppData(sequenceNumber,data)); - } - - @Override - public void close()throws IOException{ - if(closed)return; - closed=true; - noMoreData(); - } - - public UDTSocket getSocket(){ - return socket; - } - - /** - * sets the blocking mode - * @param block - */ - public void setBlocking(boolean block){ - this.blocking=block; - } - - public int getReceiveBufferSize(){ - return receiveBuffer.getSize(); - } - - /** - * notify the input stream that there is no more data - * @throws IOException - */ - protected void noMoreData()throws IOException{ - expectMoreData.set(false); - } - - /** - * жûݽ - * cd - * @return - */ - public boolean isHasData() - { - return hasData; - } - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * islagerRead=true - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - receiveBuffer.resetBufMaster(isRead); - - } - - /** - * ôݶȡ - * Ĭ false - * @param islarge - */ - public void setLargeRead(boolean islarge) - { - receiveBuffer.setLargeRead(islarge); - } - /** - * used for storing application data and the associated - * sequence number in the queue in ascending order - */ - public static class AppData implements Comparable{ - final long sequenceNumber; - final byte[] data; - public AppData(long sequenceNumber, byte[]data){ - this.sequenceNumber=sequenceNumber; - this.data=data; - } - - @Override - public int compareTo(AppData o) { - return (int)(sequenceNumber-o.sequenceNumber); - } - - @Override - public String toString(){ - return sequenceNumber+"["+data.length+"]"; - } - - public long getSequenceNumber(){ - return sequenceNumber; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result - + (int) (sequenceNumber ^ (sequenceNumber >>> 32)); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - AppData other = (AppData) obj; - if (sequenceNumber != other.sequenceNumber) - return false; - return true; - } - - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/9a/a0ca38a134ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/9a/a0ca38a134ac001710ff8a7c6bda0fb8 deleted file mode 100644 index a92c305..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/9a/a0ca38a134ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,338 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public boolean getCloseState() -{ - //ײѾر - return isClose|socket.isClose(); -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(getCloseState()) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(getCloseState()) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(getCloseState()) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(getCloseState()) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;i fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - - /** - * дļ - */ - private void recData() - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - byte[]tmp=recQueue.poll(); - if(tmp==null) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - continue; - } - if(writeFile(tmp)) - { - isStop=true; - break; - } - } - // - recQueue.clear(); - } - - }); - fileW.setDaemon(true); - fileW.setName(fileName+"_Thread"); - fileW.start(); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - // - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - //ļ - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - break; - } - else - { - recData(); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - // - ss.close(); - - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/9b/a0c5a62123ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/9b/a0c5a62123ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 9296ded..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/9b/a0c5a62123ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,240 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public void pauseOutput() - { - try { - client.getOutputStream().pauseOutput(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - /** - * ȡ - * ֻsplitͶӦ - * @return - */ - public byte[] read() - { - byte[] result=null; - if(client!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(client.isClose()) - { - return null; - } - r=client.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; - } - public int read(byte[]data) - { - try { - return client.read(data); - } catch (IOException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - return -1; - } - - /** - * ر - */ - public void close() - { - if(client!=null) - { - if(sumLen==0) - { - //ûз - //ر - try { - if(!client.isClose()) - client.shutdown(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - else - { - //ʼ - //SocketManager.getInstance().add(client); - if(!client.isClose()) - client.close(); - } - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/9c/2087ada01fac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/9c/2087ada01fac001710ff8a7c6bda0fb8 deleted file mode 100644 index 6155966..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/9c/2087ada01fac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -/** - * @author jinyu - * - */ -public class PackagetCombin { - private static ConcurrentHashMap hash=new ConcurrentHashMap(); - private ConcurrentLinkedQueue queue=new ConcurrentLinkedQueue(); -public boolean addData(byte[] data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - DataStruct struct=hash.get(id); - if(struct==null) - { - struct=new DataStruct(num); - hash.put(id, struct); - } - boolean r= struct.addData(data); - if(r) - { - queue.offer(struct.getData()); - } - return r; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/9c/701d65425ca800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/9c/701d65425ca800171a8482560d609ceb deleted file mode 100644 index 5bb506b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/9c/701d65425ca800171a8482560d609ceb +++ /dev/null @@ -1,216 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.UDTStatistics; - -public class UDTClient { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - private final UDPEndPoint clientEndpoint; - private ClientSession clientSession; - private boolean close=false; - private Thread closeThread=null;//cd - public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address,localport); - logger.info("Created client endpoint on port "+localport); - } - - public UDTClient(InetAddress address)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address); - logger.info("Created client endpoint on port "+clientEndpoint.getLocalPort()); - } - - public UDTClient(UDPEndPoint endpoint)throws SocketException, UnknownHostException{ - clientEndpoint=endpoint; - } - - /** - * establishes a connection to the given server. - * Starts the sender thread. - * @param host - * @param port - * @throws UnknownHostException - */ - public void connect(String host, int port)throws InterruptedException, UnknownHostException, IOException{ - InetAddress address=InetAddress.getByName(host); - Destination destination=new Destination(address,port); - //create client session... - clientSession=new ClientSession(clientEndpoint,destination); - clientEndpoint.addSession(clientSession.getSocketID(), clientSession); - - clientEndpoint.start(); - clientSession.connect(); - //wait for handshake - while(!clientSession.isReady()){ - Thread.sleep(500); - } - logger.info("The UDTClient is connected"); - Thread.sleep(500); - } - - /** - * sends the given data asynchronously - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - public void send(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWrite(data); - } - - public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWriteBlocking(data); - } - - public int read(byte[]data)throws IOException, InterruptedException{ - return clientSession.getSocket().getInputStream().read(data); - } - - /** - * flush outstanding data (and make sure it is acknowledged) - * @throws IOException - * @throws InterruptedException - */ - public void flush()throws IOException, InterruptedException{ - clientSession.getSocket().flush(); - } - - - public void shutdown()throws IOException{ - - if (clientSession.isReady()&& clientSession.active==true) - { - Shutdown shutdown = new Shutdown(); - shutdown.setDestinationID(clientSession.getDestination().getSocketID()); - shutdown.setSession(clientSession); - try{ - clientEndpoint.doSend(shutdown); - TimeUnit.MILLISECONDS.sleep(100); - } - catch(Exception e) - { - logger.log(Level.SEVERE,"ERROR: Connection could not be stopped!",e); - } - clientSession.getSocket().getReceiver().stop(); - clientEndpoint.stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - close=true; - } - } - - public UDTInputStream getInputStream()throws IOException{ - return clientSession.getSocket().getInputStream(); - } - - public UDTOutputStream getOutputStream()throws IOException{ - return clientSession.getSocket().getOutputStream(); - } - - public UDPEndPoint getEndpoint()throws IOException{ - return clientEndpoint; - } - - public UDTStatistics getStatistics(){ - return clientSession.getStatistics(); - } - - public long getSocketID() - { - //cd - return clientSession.getSocketID(); - } - - /** - * ͬر - * ȴݷɺٹر - * ֻȴ10ss - */ - public synchronized void close() - { - close=true; - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - if(clientSession.getSocket().getSender().isSenderEmpty()) - { - try { - shutdown(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } - - } - - }); - } - - } - - public boolean isClose() - { - return close; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/9c/d0238e50c3ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/9c/d0238e50c3ad0017181ed9113883eda9 deleted file mode 100644 index fd0de3f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/9c/d0238e50c3ad0017181ed9113883eda9 +++ /dev/null @@ -1,494 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/9c/d051dafe19ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/9c/d051dafe19ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 892959d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/9c/d051dafe19ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,74 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=20; - public static byte[][] split(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - byte[][] result=new byte[num][]; - for(int i=0;i hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - entry.getValue().getSocket(); - } - } - } - - }); - processSocket.setDaemon(true); - processSocket.setName("processSocket"); - processSocket.start(); - -} - -public static synchronized SocketControls getInstance() { - - if (instance == null) { - - instance = new SocketControls(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/9d/5049179dd5ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/9d/5049179dd5ac001716b9ca6d5abb90bc deleted file mode 100644 index eccfe90..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/9d/5049179dd5ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,259 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡ - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(islagerRead) - { - // cd Ϊݶȡ׼ - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/9d/a0bc950e1eac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/9d/a0bc950e1eac001710ff8a7c6bda0fb8 deleted file mode 100644 index 4958bf3..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/9d/a0bc950e1eac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,27 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -/** - * @author jinyu - * - */ -public class PackagetCombin { - private static ConcurrentHashMap hash=new ConcurrentHashMap(); -public static void addData(byte[] data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - DataStruct struct=hash.get(id); - if(struct==null) - { - struct=new DataStruct(); - hash.put(id, struct); - } - struct.addData(data); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/9e/e01bd697e1ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/9e/e01bd697e1ac001716b9ca6d5abb90bc deleted file mode 100644 index 9c4eb48..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/9e/e01bd697e1ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,198 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/timespan/1000; - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - lastTime=System.currentTimeMillis(); - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/9f/00cb17ba1dac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/9f/00cb17ba1dac001710ff8a7c6bda0fb8 deleted file mode 100644 index c3490cd..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/9f/00cb17ba1dac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,65 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] buffer=null; -public long id; -private volatile int num=0; -private volatile int sum=0; -private byte[] result=null; -public DataStruct(int num) -{ - buffer=new byte[num][]; -} -private boolean check() -{ - if(num>=buffer.length) - { - //ɹ - if(sum==dataLen) - { - //ʼ - result=new byte[dataLen]; - int index=0; - ByteBuffer cur=ByteBuffer.wrap(result); - for(int i=0;i - * - */ -public class SocketReference extends WeakReference { - private long socketid=-1; - public SocketReference(T referent) { - super(referent); - - } - public SocketReference(T referent,long id) { - super(referent); - this.socketid=id; - } - public long getid() - { - return socketid; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/9f/d08d5d2106ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/9f/d08d5d2106ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 783f49c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/9f/d08d5d2106ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,71 +0,0 @@ -/** - * - */ -package Test; - -import java.util.concurrent.TimeUnit; - -import judp.judpServer; -import judp.judpSocket; - -/** - * @author jinyu - * - */ -public class TestServer { - public static void main(String[] args) { - - judpServer server=new judpServer("127.0.0.1",5555); - server.start(); - while(true) - { - judpSocket socket=server.accept(); - // - - Thread rec=new Thread(new Runnable() { - @Override - public void run() { - try - { - byte[] data=new byte[1024]; - int r=0; - while(r!=-1) - { - r=socket.readData(data); - if(r==0) - { - - try { - TimeUnit.MILLISECONDS.sleep(100); - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - if(r==-1) - { - System.out.println("ȡ-1˳"); - break; - } - byte[]tmp=new byte[r]; - System.arraycopy(data, 0, tmp, 0, r); - System.out.println(new String(tmp)); - - } - //socket.close(); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - }} - ); - rec.setDaemon(true); - rec.setName(String.valueOf(socket.socketID)); - rec.start(); - - } - - - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a/30e9d046d4ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/a/30e9d046d4ac001716b9ca6d5abb90bc deleted file mode 100644 index b9d5031..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a/30e9d046d4ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,248 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a/50ae4bb952ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/a/50ae4bb952ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 99a1b1e..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a/50ae4bb952ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,150 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.UnsupportedEncodingException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=20*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i20) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else - { - - } - } - String serverinfp=new String(infobytes,0,infobytes.length,PackagetCharSet.CharSet); - if(!serverinfp.equals("initServer:"+f.getName())) - { - client.close(); - return; - } - //client.decreNum(); - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - //ByteBuffer buffer=ByteBuffer.wrap(buf); - - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count+name.length+4]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - } - - } - client.close(); - dis.close(); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a/a081b90164a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/a/a081b90164a800171a8482560d609ceb deleted file mode 100644 index ceb1ed1..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a/a081b90164a800171a8482560d609ceb +++ /dev/null @@ -1,25 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; -import java.util.concurrent.ConcurrentHashMap; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private ConcurrentHashMap hash=new ConcurrentHashMap(); -public void addSocket(UDTSocket socket) -{ - judpGroupSocket group=hash.get(socket.getSession().getDestination().getSocketID()); - if(group==null) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a/c0ee8e47e4ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/a/c0ee8e47e4ac001716b9ca6d5abb90bc deleted file mode 100644 index 99c22aa..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a/c0ee8e47e4ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,211 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData(byte[] data) - { - - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a/d022dccc6da800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/a/d022dccc6da800171a8482560d609ceb deleted file mode 100644 index a93cc94..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a/d022dccc6da800171a8482560d609ceb +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.IOException; -import java.util.logging.Logger; - - - - -/** - * @author jinyu - * - */ -public class TestRecFiles { - private static Logger log=Logger.getLogger(Test.TestRecFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - RecviceFiles rec=new RecviceFiles(); - String dir="F://dbfile"; - rec.setDir(dir); - rec.start("127.0.0.1", 5555); - log.info("ļ"); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a/d05ac2d168a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/a/d05ac2d168a800171a8482560d609ceb deleted file mode 100644 index 5ae29cc..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a/d05ac2d168a800171a8482560d609ceb +++ /dev/null @@ -1,71 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - entry.getValue().getSocket(); - } - } - } - - }); - processSocket.setDaemon(true); - processSocket.setName("processSocket"); - processSocket.start(); - -} - -public static synchronized SocketControls getInstance() { - - if (instance == null) { - - instance = new SocketControls(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a/d0c43373c3ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/a/d0c43373c3ad0017181ed9113883eda9 deleted file mode 100644 index 9614ec0..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a/d0c43373c3ad0017181ed9113883eda9 +++ /dev/null @@ -1,492 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a0/308af7d8f8ab001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/a0/308af7d8f8ab001710ff8a7c6bda0fb8 deleted file mode 100644 index c4c0b93..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a0/308af7d8f8ab001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,351 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.DatagramPacket; -import java.net.DatagramSocket; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.SocketTimeoutException; -import java.net.UnknownHostException; -import java.util.Collection; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.SynchronousQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.PacketFactory; -import udt.util.UDTThreadFactory; - -/** - * the UDPEndpoint takes care of sending and receiving UDP network packets, - * dispatching them to the correct {@link UDTSession} - */ -public class UDPEndPoint { - - private static final Logger logger=Logger.getLogger(ClientSession.class.getName()); - - private final int port; - - private final DatagramSocket dgSocket; - - //active sessions keyed by socket ID - private final Mapsessions=new ConcurrentHashMap(); - - //last received packet - private UDTPacket lastPacket; - - //if the endpoint is configured for a server socket, - //this queue is used to handoff new UDTSessions to the application - private final SynchronousQueue sessionHandoff=new SynchronousQueue(); - - private boolean serverSocketMode=false; - - //has the endpoint been stopped? - private volatile boolean stopped=false; - - public static final int DATAGRAM_SIZE=1400; - - private volatile int sessionnum=0;//cd ʱͳ - - /** - * create an endpoint on the given socket - * - * @param socket - a UDP datagram socket - */ - public UDPEndPoint(DatagramSocket socket){ - this.dgSocket=socket; - port=dgSocket.getLocalPort(); - } - - /** - * bind to any local port on the given host address - * @param localAddress - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress)throws SocketException, UnknownHostException{ - this(localAddress,0); - } - - /** - * Bind to the given address and port - * @param localAddress - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress, int localPort)throws SocketException, UnknownHostException{ - if(localAddress==null){ - dgSocket=new DatagramSocket(localPort, localAddress); - }else{ - dgSocket=new DatagramSocket(localPort); - } - if(localPort>0)this.port = localPort; - else port=dgSocket.getLocalPort(); - - //set a time out to avoid blocking in doReceive() - dgSocket.setSoTimeout(100000); - //buffer size - dgSocket.setReceiveBufferSize(128*1024); - } - - /** - * bind to the default network interface on the machine - * - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(int localPort)throws SocketException, UnknownHostException{ - this(null,localPort); - } - - /** - * bind to an ephemeral port on the default network interface on the machine - * - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint()throws SocketException, UnknownHostException{ - this(null,0); - } - - /** - * start the endpoint. If the serverSocketModeEnabled flag is true, - * a new connection can be handed off to an application. The application needs to - * call #accept() to get the socket - * @param serverSocketModeEnabled - */ - public void start(boolean serverSocketModeEnabled){ - serverSocketMode=serverSocketModeEnabled; - //start receive thread - Runnable receive=new Runnable(){ - @Override - public void run(){ - try{ - doReceive(); - }catch(Exception ex){ - logger.log(Level.WARNING,"",ex); - } - } - }; - Thread t=UDTThreadFactory.get().newThread(receive); - t.setDaemon(true); - t.start(); - logger.info("UDTEndpoint started."); - } - - public void start(){ - start(false); - } - - public void stop(){ - stopped=true; - dgSocket.close(); - } - - /** - * @return the port which this client is bound to - */ - public int getLocalPort() { - return this.dgSocket.getLocalPort(); - } - /** - * @return Gets the local address to which the socket is bound - */ - public InetAddress getLocalAddress(){ - return this.dgSocket.getLocalAddress(); - } - - DatagramSocket getSocket(){ - return dgSocket; - } - - UDTPacket getLastPacket(){ - return lastPacket; - } - - public void addSession(Long destinationID,UDTSession session){ - logger.info("Storing session <"+destinationID+">"); - sessionnum++; - sessions.put(destinationID, session); - } - - public UDTSession getSession(Long destinationID){ - return sessions.get(destinationID); - } - - /** - * Ƴsession - * cd - * @param socketid - * @return - */ - public UDTSession removeSession(long socketid) - { - //cd - sessionnum--; - logger.info("Storing Sessionnum:"+sessionnum); - return sessions.remove(socketid); - } - public Collection getSessions(){ - return sessions.values(); - } - - /** - * wait the given time for a new connection - * @param timeout - the time to wait - * @param unit - the {@link TimeUnit} - * @return a new {@link UDTSession} - * @throws InterruptedException - */ - protected UDTSession accept(long timeout, TimeUnit unit)throws InterruptedException{ - return sessionHandoff.poll(timeout, unit); - } - - - final DatagramPacket dp= new DatagramPacket(new byte[DATAGRAM_SIZE],DATAGRAM_SIZE); - - /** - * single receive, run in the receiverThread, see {@link #start()} - *
    - *
  • Receives UDP packets from the network
  • - *
  • Converts them to UDT packets
  • - *
  • dispatches the UDT packets according to their destination ID.
  • - *
- * @throws IOException - */ - private long lastDestID=-1; - private UDTSession lastSession; - - //MeanValue v=new MeanValue("receiver processing ",true, 256); - - private int n=0; - - private final Object lock=new Object(); - - protected void doReceive()throws IOException{ - while(!stopped){ - try{ - try{ - //v.end(); - - //will block until a packet is received or timeout has expired - dgSocket.receive(dp); - - //v.begin(); - - Destination peer=new Destination(dp.getAddress(), dp.getPort()); - int l=dp.getLength(); - UDTPacket packet=PacketFactory.createPacket(dp.getData(),l); - lastPacket=packet; - - //handle connection handshake - if(packet.isConnectionHandshake()){ - synchronized(lock){ - Long id=Long.valueOf(packet.getDestinationID()); - UDTSession session=sessions.get(id); - if(session==null){ - session=new ServerSession(dp,this); - addSession(session.getSocketID(),session); - //TODO need to check peer to avoid duplicate server session - if(serverSocketMode){ - logger.fine("Pooling new request."); - sessionHandoff.put(session); - logger.fine("Request taken for processing."); - } - } - peer.setSocketID(((ConnectionHandshake)packet).getSocketID()); - session.received(packet,peer); - } - } - else{ - //dispatch to existing session - long dest=packet.getDestinationID(); - UDTSession session; - if(dest==lastDestID){ - session=lastSession; - } - else{ - session=sessions.get(dest); - lastSession=session; - lastDestID=dest; - } - if(session==null){ - n++; - if(n%100==1){ - logger.warning("Unknown session <"+dest+"> requested from <"+peer+"> packet type "+packet.getClass().getName()); - } - } - else{ - session.received(packet,peer); - } - } - }catch(SocketException ex){ - if(ex.getMessage().equals("socket closed")&&stopped) - { - //Ѿر - } - logger.log(Level.INFO, "SocketException: "+ex.getMessage()); - }catch(SocketTimeoutException ste){ - //can safely ignore... we will retry until the endpoint is stopped - } - - }catch(Exception ex){ - logger.log(Level.WARNING, "Got: "+ex.getMessage(),ex); - } - } - } - - protected void doSend(UDTPacket packet)throws IOException{ - byte[]data=packet.getEncoded(); - DatagramPacket dgp = packet.getSession().getDatagram(); - dgp.setData(data); - dgSocket.send(dgp); - } - - @Override - public String toString(){ - return "UDPEndpoint port="+port; - } - - public void sendRaw(DatagramPacket p)throws IOException{ - dgSocket.send(p); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a0/60b6f0541dac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/a0/60b6f0541dac001710ff8a7c6bda0fb8 deleted file mode 100644 index 41c29ef..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a0/60b6f0541dac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,62 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] buffer=null; -public long id; -private volatile int num=0; -private volatile int sum=0; -private byte[] result=null; -public DataStruct(int num) -{ - buffer=new byte[num][]; -} -private boolean check() -{ - if(num>=buffer.length) - { - //ɹ - if(sum==dataLen) - { - //ʼ - result=new byte[dataLen]; - int index=0; - for(int i=0;isendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a0/e0c0b8d904ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/a0/e0c0b8d904ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 9c8fbec..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a0/e0c0b8d904ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,88 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private LinkedBlockingQueue> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID()); - queue.add(tmp); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a1/003e3e7b4fac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/a1/003e3e7b4fac001710ff8a7c6bda0fb8 deleted file mode 100644 index 4a2ed8f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a1/003e3e7b4fac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,243 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public int dataLen=0; - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData=null; - if(dataLen==0) - { - sendData=PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - sendData=sub.split(data, dataLen); - } - for(int i=0;i hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else return null; - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a1/a07bc2d560ac00171ca19969f19d2325 b/.metadata/.plugins/org.eclipse.core.resources/.history/a1/a07bc2d560ac00171ca19969f19d2325 deleted file mode 100644 index 1264aed..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a1/a07bc2d560ac00171ca19969f19d2325 +++ /dev/null @@ -1,248 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public int dataLen=0; - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - System.out.println("sendBlocking start"); - client.send(data); - r=data.length; - sumLen+=r; - System.out.println("sendBlocking end"); - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData=null; - if(dataLen==0) - { - sendData=PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - sendData=sub.split(data, dataLen); - } - for(int i=0;i sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - //judpSocket jsocket=new judpSocket(csocket); - - //SocketManager.getInstance().addGC(jsocket,csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=SocketControls.getInstance().getSocket(); - } - judpSocket jsocket=new judpSocket(socket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a1/d04b3b71a5ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/a1/d04b3b71a5ad0017181ed9113883eda9 deleted file mode 100644 index 9842219..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a1/d04b3b71a5ad0017181ed9113883eda9 +++ /dev/null @@ -1,56 +0,0 @@ -/** - * ļTestSendFile.java - * - * 汾Ϣ - * ڣ2017827 - * Copyright Corporation 2017 - * Ȩ - * - */ -package Test; - -import java.io.IOException; - -import judp.judpSendFile; - -/** - * - * Ŀƣjudp - * ƣTestSendFile - * - * ˣjinyu - * ʱ䣺2017827 6:32:25 - * ޸ˣjinyu - * ޸ʱ䣺2017827 6:32:25 - * ޸ıע - * @version - * - */ -public class TestSendFile { - - /** - - * TODO( C ѡ) - - * @param name - - * @return - - * - - - */ - public static void main(String[] args) { - judpSendFile jsend=new judpSendFile("192.168.10.86",5555); - jsend.startSend(); - - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a2/20852d9403ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/a2/20852d9403ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 9cbb6de..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a2/20852d9403ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,76 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private LinkedBlockingQueue> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - - - } - private void startThread() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference objsocket=queue.take(); - if(objsocket.get()!=null) - { - judpSocket socket=objsocket.get(); - if(socket.getCloseState()) - { - socket.close(); - } - } - - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a2/407e00c504ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/a2/407e00c504ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 8e9a497..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a2/407e00c504ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,88 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private LinkedBlockingQueue> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID()); - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a2/5061348b26ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/a2/5061348b26ac001710ff8a7c6bda0fb8 deleted file mode 100644 index c1a18f2..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a2/5061348b26ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,86 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=16; - public static byte[][] splitData(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i list=new ArrayList(); -public judpGroupSocket() -{ - -} -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} -public judpGroupSocket getSocket() -{ - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a3/401ed82266ac00171f75fe2361138dfd b/.metadata/.plugins/org.eclipse.core.resources/.history/a3/401ed82266ac00171f75fe2361138dfd deleted file mode 100644 index d7a45f2..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a3/401ed82266ac00171f75fe2361138dfd +++ /dev/null @@ -1,236 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.net.DatagramPacket; -import java.util.Random; -import java.util.concurrent.atomic.AtomicLong; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.util.UDTStatistics; - -public abstract class UDTSession { - - private static final Logger logger=Logger.getLogger(UDTSession.class.getName()); - - protected int mode; - protected volatile boolean active; - private volatile int state=start; - protected volatile UDTPacket lastPacket; - - //state constants - public static final int start=0; - public static final int handshaking=1; - public static final int ready=2; - public static final int keepalive=3; - public static final int shutdown=4; - - public static final int invalid=99; - - protected volatile UDTSocket socket; - - protected final UDTStatistics statistics; - - protected int receiveBufferSize=64*32768; - - protected final CongestionControl cc; - - //cache dgPacket (peer stays the same always) - private DatagramPacket dgPacket; - - /** - * flow window size, i.e. how many data packets are - * in-flight at a single time - */ - protected int flowWindowSize=1024; - - /** - * remote UDT entity (address and socket ID) - */ - protected final Destination destination; - - /** - * local port - */ - protected int localPort; - - - public static final int DEFAULT_DATAGRAM_SIZE=UDPEndPoint.DATAGRAM_SIZE; - - /** - * key for a system property defining the CC class to be used - * @see CongestionControl - */ - public static final String CC_CLASS="udt.congestioncontrol.class"; - - /** - * Buffer size (i.e. datagram size) - * This is negotiated during connection setup - */ - protected int datagramSize=DEFAULT_DATAGRAM_SIZE; - - protected Long initialSequenceNumber=null; - - protected final long mySocketID; - - private final static AtomicLong nextSocketID=new AtomicLong(20+new Random().nextInt(5000)); - - - public UDTSession(String description, Destination destination){ - statistics=new UDTStatistics(description); - mySocketID=nextSocketID.incrementAndGet(); - this.destination=destination; - this.dgPacket=new DatagramPacket(new byte[0],0,destination.getAddress(),destination.getPort()); - String clazzP=System.getProperty(CC_CLASS,UDTCongestionControl.class.getName()); - Object ccObject=null; - try{ - Classclazz=Class.forName(clazzP); - ccObject=clazz.getDeclaredConstructor(UDTSession.class).newInstance(this); - }catch(Exception e){ - logger.log(Level.WARNING,"Can't setup congestion control class <"+clazzP+">, using default.",e); - ccObject=new UDTCongestionControl(this); - } - cc=(CongestionControl)ccObject; - logger.info("Using "+cc.getClass().getName()); - } - - - public abstract void received(UDTPacket packet, Destination peer); - - - public UDTSocket getSocket() { - return socket; - } - - public CongestionControl getCongestionControl() { - return cc; - } - - public int getState() { - return state; - } - - public void setMode(int mode) { - this.mode = mode; - } - - public void setSocket(UDTSocket socket) { - this.socket = socket; - } - - public void setState(int state) { - logger.info(toString()+" connection state CHANGED to <"+state+">"); - this.state = state; - } - - public boolean isReady(){ - return state==ready; - } - - public boolean isActive() { - return active == true; - } - - public void setActive(boolean active) { - this.active = active; - } - - public boolean isShutdown(){ - return state==shutdown || state==invalid; - } - - public Destination getDestination() { - return destination; - } - - public int getDatagramSize() { - return datagramSize; - } - - public void setDatagramSize(int datagramSize) { - this.datagramSize = datagramSize; - } - - public int getReceiveBufferSize() { - return receiveBufferSize; - } - - public void setReceiveBufferSize(int bufferSize) { - this.receiveBufferSize = bufferSize; - } - - public int getFlowWindowSize() { - return flowWindowSize; - } - - public void setFlowWindowSize(int flowWindowSize) { - this.flowWindowSize = flowWindowSize; - } - - public UDTStatistics getStatistics(){ - return statistics; - } - - public long getSocketID(){ - return mySocketID; - } - - - public synchronized long getInitialSequenceNumber(){ - if(initialSequenceNumber==null){ - initialSequenceNumber=1l; //TODO must be random? - } - return initialSequenceNumber; - } - - public synchronized void setInitialSequenceNumber(long initialSequenceNumber){ - this.initialSequenceNumber=initialSequenceNumber; - } - - public DatagramPacket getDatagram(){ - return dgPacket; - } - - @Override - public String toString(){ - StringBuilder sb=new StringBuilder(); - sb.append(super.toString()); - sb.append(" ["); - sb.append("socketID=").append(this.mySocketID); - sb.append(" ]"); - return sb.toString(); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a3/a0965bb1e4ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/a3/a0965bb1e4ac001716b9ca6d5abb90bc deleted file mode 100644 index aad5ca7..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a3/a0965bb1e4ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,223 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData(byte[] data) - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - if(writeFile(tmp)) - { - ss.close(); - break; - } - } - - } - - }); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a3/e0491a3469a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/a3/e0491a3469a800171a8482560d609ceb deleted file mode 100644 index 121c403..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a3/e0491a3469a800171a8482560d609ceb +++ /dev/null @@ -1,91 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - // - if(!list.isEmpty()) - { - for(int i=0;i hash=new ConcurrentHashMap(); -//private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - // - if(!list.isEmpty()) - { - //ƳѾɹsocket - for(int i=0;isendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - // cd - private volatile int bufferNum=0; - private volatile boolean isModify=true; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - // - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a5/2062891a03ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/a5/2062891a03ac001710ff8a7c6bda0fb8 deleted file mode 100644 index addcb39..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a5/2062891a03ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,22 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; - -/** - * @author jinyu - * @param - * - */ -public class SocketQueue extends WeakReference { - public SocketQueue(T referent) { - super(referent); - - } - -private long id=-1; - public -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a6/9039b1d7dfac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/a6/9039b1d7dfac001716b9ca6d5abb90bc deleted file mode 100644 index d7c1f11..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a6/9039b1d7dfac001716b9ca6d5abb90bc +++ /dev/null @@ -1,187 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long startTime=System.currentTimeMillis(); - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - startTime=System.currentTimeMillis(); - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - long speed=0; - try - { - speed=sumBytes/((System.currentTimeMillis()-startTime)/1000); - } - catch(Exception ex) - { - - } - log.info("ļٶȣ"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a7/00e268836da800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/a7/00e268836da800171a8482560d609ceb deleted file mode 100644 index 35194ca..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a7/00e268836da800171a8482560d609ceb +++ /dev/null @@ -1,42 +0,0 @@ -/** - * - */ -package net.File; - -import java.util.logging.Logger; - -import net.File.FileMonitor; -import net.File.FilesWatch; - - - - -/** - * @author jinyu - * - */ -public class TestSendFiles { - private static Logger log=Logger.getLogger(TestSendFile.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //SendFiles send=new SendFiles("192.168.9.152", 5555); - SendFiles send=new SendFiles("127.0.0.1", 5555); - FilesWatch watch=new FilesWatch(); - String dir="F:/monitor"; - watch.setWatch(dir); - watch.start(); - while(true) - { - FileMonitor ff= watch.take(); - log.info(ff.file); - if(ff.file.endsWith(".tmp")) - { - continue; - } - send.sendFile(dir+"/"+ff.file); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a7/30568a8fa0ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/a7/30568a8fa0ad0017181ed9113883eda9 deleted file mode 100644 index a95a751..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a7/30568a8fa0ad0017181ed9113883eda9 +++ /dev/null @@ -1,53 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.StringReader; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; - -import org.w3c.dom.Document; -import org.xml.sax.InputSource; - -/** - * @author jinyu - * - */ -public class ReadXml { -public String readXml(String file) -{ - File f=new File(file); - if(!f.exists()) - { - return ""; - } - // - String xmlStr= readFile(file); - StringReader sr = new StringReader(xmlStr); - InputSource is = new InputSource(sr); - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - DocumentBuilder builder=factory.newDocumentBuilder(); - Document doc = (Document) builder.parse(is); - doc.gete -} -public String readFile(String file) -{ - StringBuilder result = new StringBuilder(); - try{ - BufferedReader br = new BufferedReader(new FileReader(file));//һBufferedReaderȡļ - String s = null; - while((s = br.readLine())!=null){//ʹreadLineһζһ - result.append(System.lineSeparator()+s); - } - br.close(); - }catch(Exception e){ - e.printStackTrace(); - } - return result.toString(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a7/70b19de71dac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/a7/70b19de71dac001710ff8a7c6bda0fb8 deleted file mode 100644 index 121c7d0..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a7/70b19de71dac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,68 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] buffer=null; -public long id; -private volatile int num=0; -private volatile int sum=0; -private byte[] result=null; -public DataStruct(int num) -{ - buffer=new byte[num][]; -} -private boolean check() -{ - if(num>=buffer.length) - { - //ɹ - if(sum==dataLen) - { - //ʼ - result=new byte[dataLen]; - ByteBuffer cur=ByteBuffer.wrap(result); - for(int i=0;i hashMap=new WeakHashMap (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a7/a0902db74fac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/a7/a0902db74fac001710ff8a7c6bda0fb8 deleted file mode 100644 index 2331cbf..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a7/a0902db74fac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,139 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.UnsupportedEncodingException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=20*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡ - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(islagerRead) - { - // cd Ϊݶȡ׼ - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - } - else - { - //ԭ룬Сݽȫ - buffer[insert]=data; - numValidChunks.incrementAndGet(); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ cd - // ǵֵ - if(this.islagerRead) - { - //cd - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a8/4095613d68a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/a8/4095613d68a800171a8482560d609ceb deleted file mode 100644 index d5fc4e8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a8/4095613d68a800171a8482560d609ceb +++ /dev/null @@ -1,79 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public UDTSocket getSocket() -{ - - int index=-1; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(index==-1) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳ - i=-1;//± - index=i; - } - } - else - { - // - if(i==index) - { - continue; - } - else - { - list.get(i).close(); - long id=list.get(i).getSession().getSocketID(); - list.get(i).getEndpoint().removeSession(id); - list.get(i).getReceiver().stop(); - list.get(i).getSender().stop(); - //cd - } - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - return null; - -} -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a8/803e3c42d7ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/a8/803e3c42d7ac001716b9ca6d5abb90bc deleted file mode 100644 index 6318e80..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a8/803e3c42d7ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,279 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public int dataLen=0; - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - System.out.println("sendBlocking start"); - client.sendBlocking(data); - r=data.length; - sumLen+=r; - System.out.println("sendBlocking end"); - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData=null; - if(dataLen==0) - { - sendData=PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - sendData=sub.split(data, dataLen); - } - for(int i=0;i> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a8/c021eb1429ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/a8/c021eb1429ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 238736e..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a8/c021eb1429ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,99 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=20; - - /** - * ָ - * @param data - * @return - */ - public static byte[][] splitData(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - } - - } - client.close(); - dis.close(); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a8/e00509dad7ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/a8/e00509dad7ac001716b9ca6d5abb90bc deleted file mode 100644 index 9177c05..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a8/e00509dad7ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,143 +0,0 @@ -/** - * - */ -package judp; - -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -//private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private boolean isRWMaster=true;//Ĭֵһ -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} - -/** - * - * @param port ˿ - */ -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - * @param localIP IP - * @param port ˿ - */ -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} -/** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * islagerRead=true - * @param isRead - */ -public void resetBufMaster(boolean isRead) -{ - this.isRWMaster=isRead; - -} - -/** - * ôݶȡ - * Ĭ false - * @param islarge - */ -public void setLargeRead(boolean islarge) -{ - this.islagerRead=islarge; -} -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=SocketControls.getInstance().getSocket(); - } - judpSocket jsocket=new judpSocket(socket); - judpSocketManager.getInstance(socket.getEndpoint()).addSocket(jsocket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a9/20cde3669fad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/a9/20cde3669fad0017181ed9113883eda9 deleted file mode 100644 index 8e092e4..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a9/20cde3669fad0017181ed9113883eda9 +++ /dev/null @@ -1,33 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.File; -import java.io.StringReader; - -import javax.swing.text.Document; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; - -import org.xml.sax.InputSource; - -/** - * @author jinyu - * - */ -public class ReadXml { -public String readXml(String file) -{ - File f=new File(file); - if(!f.exists()) - { - return null; - } - StringReader sr = new StringReader(xmlStr); - InputSource is = new InputSource(sr); - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - DocumentBuilder builder=factory.newDocumentBuilder(); - Document doc = (Document) builder.parse(is); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a9/40e9ecc6e6ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/a9/40e9ecc6e6ac001716b9ca6d5abb90bc deleted file mode 100644 index 6584270..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a9/40e9ecc6e6ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,249 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - - /** - * дļ - */ - private void recData() - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - byte[]tmp=recQueue.poll(); - if(tmp==null) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - continue; - } - if(writeFile(tmp)) - { - isStop=true; - break; - } - } - - } - - }); - fileW.setDaemon(true); - fileW.setName(fileName+"_Thread"); - fileW.start(); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - // - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - //ļ - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - break; - } - else - { - recData(); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - // - ss.close(); - recQueue.clear(); - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a9/500e93c5d5ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/a9/500e93c5d5ac001716b9ca6d5abb90bc deleted file mode 100644 index a3a9de9..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a9/500e93c5d5ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,265 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡ - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(islagerRead) - { - // cd Ϊݶȡ׼ - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - } - else - { - //ԭ룬Сݽȫ - buffer[insert]=data; - numValidChunks.incrementAndGet(); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a9/50f9bfc666a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/a9/50f9bfc666a800171a8482560d609ceb deleted file mode 100644 index 938c3ee..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a9/50f9bfc666a800171a8482560d609ceb +++ /dev/null @@ -1,54 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public UDTSocket getSocket() -{ - for( int i = 0 ; i < list.size() ; i++) { - try { - if(list.get(i).getInputStream().isHasData()) - { - return list.get(i); - } - } catch (IOException e) { - e.printStackTrace(); - } - } - return null; - -} -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a9/8036f5d929ad001713e0de43c08806fd b/.metadata/.plugins/org.eclipse.core.resources/.history/a9/8036f5d929ad001713e0de43c08806fd deleted file mode 100644 index 56330c7..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a9/8036f5d929ad001713e0de43c08806fd +++ /dev/null @@ -1,188 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.SocketException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.SequenceNumber; - -/** - * Client side of a client-server UDT connection. - * Once established, the session provides a valid {@link UDTSocket}. - */ -public class ClientSession extends UDTSession { - - private static final Logger logger=Logger.getLogger(ClientSession.class.getName()); - - private UDPEndPoint endPoint; - - public ClientSession(UDPEndPoint endPoint, Destination dest)throws SocketException{ - super("ClientSession localPort="+endPoint.getLocalPort(),dest); - this.endPoint=endPoint; - logger.info("Created "+toString()); - } - - /** - * send connection handshake until a reply from server is received - * TODO check for timeout - * @throws InterruptedException - * @throws IOException - */ - - public void connect() throws InterruptedException,IOException{ - int n=0; - - while(getState()!=ready){ - - sendHandShake(); - if(getState()==invalid)throw new IOException("Can't connect!"); - n++; - if(getState()!=ready)Thread.sleep(500); - } - - cc.init(); - logger.info("Connected, "+n+" handshake packets sent"); - } - - @Override - public void received(UDTPacket packet, Destination peer) { - - lastPacket=packet; - - if (packet instanceof ConnectionHandshake) { - ConnectionHandshake hs=(ConnectionHandshake)packet; - - logger.info("Received connection handshake from "+peer+"\n"+hs); - - if (getState()!=ready) { - if(hs.getConnectionType()==1){ - try{ - //TODO validate parameters sent by peer - long peerSocketID=hs.getSocketID(); - destination.setSocketID(peerSocketID); - sendConfirmation(hs); - }catch(Exception ex){ - logger.log(Level.WARNING,"Error creating socket",ex); - setState(invalid); - } - return; - } - else{ - try{ - //TODO validate parameters sent by peer - long peerSocketID=hs.getSocketID(); - destination.setSocketID(peerSocketID); - setState(ready); - TimeUnit.MILLISECONDS.sleep(50); - this.setInitialSequenceNumber(hs.getInitialSeqNo());//cd - socket=new UDTSocket(endPoint,this); - - - }catch(Exception ex){ - logger.log(Level.WARNING,"Error creating socket",ex); - setState(invalid); - } - return; - } - } - } - - if(getState() == ready) { - - if(packet instanceof Shutdown){ - setState(shutdown); - active=false; - logger.info("Connection shutdown initiated by the other side."); - return; - } - active = true; - try{ - if(packet.forSender()){ - socket.getSender().receive(lastPacket); - }else{ - socket.getReceiver().receive(lastPacket); - } - }catch(Exception ex){ - //session is invalid - logger.log(Level.SEVERE,"Error in "+toString(),ex); - setState(invalid); - } - return; - } - } - - - //handshake for connect - protected void sendHandShake()throws IOException{ - ConnectionHandshake handshake = new ConnectionHandshake(); - handshake.setConnectionType(ConnectionHandshake.CONNECTION_TYPE_REGULAR); - handshake.setSocketType(ConnectionHandshake.SOCKET_TYPE_DGRAM); - long initialSequenceNo=SequenceNumber.random(); - setInitialSequenceNumber(initialSequenceNo); - handshake.setInitialSeqNo(initialSequenceNo); - handshake.setPacketSize(getDatagramSize()); - handshake.setSocketID(mySocketID); - handshake.setMaxFlowWndSize(flowWindowSize); - handshake.setSession(this); - logger.info("Sending "+handshake); - endPoint.doSend(handshake); - } - - //2nd handshake for connect - protected void sendConfirmation(ConnectionHandshake hs)throws IOException{ - ConnectionHandshake handshake = new ConnectionHandshake(); - handshake.setConnectionType(-1); - handshake.setSocketType(ConnectionHandshake.SOCKET_TYPE_DGRAM); - handshake.setInitialSeqNo(hs.getInitialSeqNo()); - handshake.setPacketSize(hs.getPacketSize()); - handshake.setSocketID(mySocketID); - handshake.setMaxFlowWndSize(flowWindowSize); - handshake.setSession(this); - logger.info("Sending confirmation "+handshake); - endPoint.doSend(handshake); - } - - - public UDTPacket getLastPkt(){ - return lastPacket; - } - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a9/b04660ada0ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/a9/b04660ada0ad0017181ed9113883eda9 deleted file mode 100644 index 12007a3..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a9/b04660ada0ad0017181ed9113883eda9 +++ /dev/null @@ -1,61 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.StringReader; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; - -import org.w3c.dom.Document; -import org.w3c.dom.NodeList; -import org.xml.sax.InputSource; - -/** - * @author jinyu - * - */ -public class ReadXml { -public String readXml(String file) -{ - File f=new File(file); - if(!f.exists()) - { - return ""; - } - // - String xmlStr= readFile(file); - StringReader sr = new StringReader(xmlStr); - InputSource is = new InputSource(sr); - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - DocumentBuilder builder=factory.newDocumentBuilder(); - Document doc = (Document) builder.parse(is); - NodeList list=doc.getElementsByTagName("IP"); - String ip= list.item(0).getTextContent(); - list=doc.getElementsByTagName("Port"); - String port=list.item(0).getTextContent(); - list=doc.getElementsByTagName("Dir"); - String dir=list.item(0).getTextContent(); - String strxml=ip+","+port+","+dir; - return strxml - } -public String readFile(String file) -{ - StringBuilder result = new StringBuilder(); - try{ - BufferedReader br = new BufferedReader(new FileReader(file));//һBufferedReaderȡļ - String s = null; - while((s = br.readLine())!=null){//ʹreadLineһζһ - result.append(System.lineSeparator()+s); - } - br.close(); - }catch(Exception e){ - e.printStackTrace(); - } - return result.toString(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a9/c081497ec9ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/a9/c081497ec9ac001716b9ca6d5abb90bc deleted file mode 100644 index 1adc8b6..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a9/c081497ec9ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,355 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.DatagramPacket; -import java.net.DatagramSocket; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.SocketTimeoutException; -import java.net.UnknownHostException; -import java.util.Collection; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.SynchronousQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.PacketFactory; -import udt.util.UDTThreadFactory; - -/** - * the UDPEndpoint takes care of sending and receiving UDP network packets, - * dispatching them to the correct {@link UDTSession} - */ -public class UDPEndPoint { - - private static final Logger logger=Logger.getLogger(ClientSession.class.getName()); - - private final int port; - - private final DatagramSocket dgSocket; - - //active sessions keyed by socket ID - private final Mapsessions=new ConcurrentHashMap(); - - //last received packet - private UDTPacket lastPacket; - - //if the endpoint is configured for a server socket, - //this queue is used to handoff new UDTSessions to the application - private final SynchronousQueue sessionHandoff=new SynchronousQueue(); - - private boolean serverSocketMode=false; - - //has the endpoint been stopped? - private volatile boolean stopped=false; - - public static final int DATAGRAM_SIZE=1400; - - private volatile int sessionnum=0;//cd ʱͳ - - /** - * create an endpoint on the given socket - * - * @param socket - a UDP datagram socket - */ - public UDPEndPoint(DatagramSocket socket){ - this.dgSocket=socket; - port=dgSocket.getLocalPort(); - } - - /** - * bind to any local port on the given host address - * @param localAddress - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress)throws SocketException, UnknownHostException{ - this(localAddress,0); - } - - /** - * Bind to the given address and port - * @param localAddress - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress, int localPort)throws SocketException, UnknownHostException{ - if(localAddress==null){ - dgSocket=new DatagramSocket(localPort, localAddress); - }else{ - dgSocket=new DatagramSocket(localPort); - } - if(localPort>0)this.port = localPort; - else port=dgSocket.getLocalPort(); - - //set a time out to avoid blocking in doReceive() - dgSocket.setSoTimeout(100000); - //buffer size - dgSocket.setReceiveBufferSize(128*1024); - } - - /** - * bind to the default network interface on the machine - * - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(int localPort)throws SocketException, UnknownHostException{ - this(null,localPort); - } - - /** - * bind to an ephemeral port on the default network interface on the machine - * - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint()throws SocketException, UnknownHostException{ - this(null,0); - } - - /** - * start the endpoint. If the serverSocketModeEnabled flag is true, - * a new connection can be handed off to an application. The application needs to - * call #accept() to get the socket - * @param serverSocketModeEnabled - */ - public void start(boolean serverSocketModeEnabled){ - serverSocketMode=serverSocketModeEnabled; - //start receive thread - Runnable receive=new Runnable(){ - @Override - public void run(){ - try{ - doReceive(); - }catch(Exception ex){ - logger.log(Level.WARNING,"",ex); - } - } - }; - Thread t=UDTThreadFactory.get().newThread(receive); - t.setDaemon(true); - t.start(); - logger.info("UDTEndpoint started."); - } - - public void start(){ - start(false); - } - - public void stop(){ - stopped=true; - dgSocket.close(); - } - - /** - * @return the port which this client is bound to - */ - public int getLocalPort() { - return this.dgSocket.getLocalPort(); - } - /** - * @return Gets the local address to which the socket is bound - */ - public InetAddress getLocalAddress(){ - return this.dgSocket.getLocalAddress(); - } - - DatagramSocket getSocket(){ - return dgSocket; - } - - UDTPacket getLastPacket(){ - return lastPacket; - } - - public void addSession(Long destinationID,UDTSession session){ - logger.info("Storing session <"+destinationID+">"); - sessionnum++; - sessions.put(destinationID, session); - } - - public UDTSession getSession(Long destinationID){ - return sessions.get(destinationID); - } - - /** - * Ƴsession - * cd - * @param socketid - * @return - */ - public UDTSession removeSession(long socketid) - { - //cd - sessionnum--; - logger.info("Storing Sessionnum:"+sessionnum); - return sessions.remove(socketid); - } - public Collection getSessions(){ - return sessions.values(); - } - - /** - * wait the given time for a new connection - * @param timeout - the time to wait - * @param unit - the {@link TimeUnit} - * @return a new {@link UDTSession} - * @throws InterruptedException - */ - protected UDTSession accept(long timeout, TimeUnit unit)throws InterruptedException{ - return sessionHandoff.poll(timeout, unit); - } - - - final DatagramPacket dp= new DatagramPacket(new byte[DATAGRAM_SIZE],DATAGRAM_SIZE); - - /** - * single receive, run in the receiverThread, see {@link #start()} - *
    - *
  • Receives UDP packets from the network
  • - *
  • Converts them to UDT packets
  • - *
  • dispatches the UDT packets according to their destination ID.
  • - *
- * @throws IOException - */ - private long lastDestID=-1; - private UDTSession lastSession; - - //MeanValue v=new MeanValue("receiver processing ",true, 256); - - private int n=0; - - private final Object lock=new Object(); - - protected void doReceive()throws IOException{ - while(!stopped){ - try{ - try{ - //v.end(); - - //will block until a packet is received or timeout has expired - dgSocket.receive(dp); - - //v.begin(); - - Destination peer=new Destination(dp.getAddress(), dp.getPort()); - int l=dp.getLength(); - UDTPacket packet=PacketFactory.createPacket(dp.getData(),l); - lastPacket=packet; - - //handle connection handshake - if(packet.isConnectionHandshake()){ - synchronized(lock){ - Long id=Long.valueOf(packet.getDestinationID()); - UDTSession session=sessions.get(id); - if(session==null){ - session=new ServerSession(dp,this); - addSession(session.getSocketID(),session); - //TODO need to check peer to avoid duplicate server session - if(serverSocketMode){ - logger.fine("Pooling new request."); - sessionHandoff.put(session); - logger.fine("Request taken for processing."); - } - } - peer.setSocketID(((ConnectionHandshake)packet).getSocketID()); - session.received(packet,peer); - } - } - else{ - //dispatch to existing session - long dest=packet.getDestinationID(); - UDTSession session; - if(dest==lastDestID){ - session=lastSession; - } - else{ - session=sessions.get(dest); - lastSession=session; - lastDestID=dest; - } - if(session==null){ - n++; - if(n%100==1){ - logger.warning("Unknown session <"+dest+"> requested from <"+peer+"> packet type "+packet.getClass().getName()); - } - } - else{ - session.received(packet,peer); - //logger.log(Level.INFO, ": "+packet.getPacketSequenceNumber()); - } - } - }catch(SocketException ex){ - if(ex.getMessage().equals("socket closed")&&stopped) - { - //Ѿر - } - else - { - logger.log(Level.INFO, "SocketException: "+ex.getMessage()); - } - }catch(SocketTimeoutException ste){ - //can safely ignore... we will retry until the endpoint is stopped - } - - }catch(Exception ex){ - logger.log(Level.WARNING, "Got: "+ex.getMessage(),ex); - } - } - } - - protected void doSend(UDTPacket packet)throws IOException{ - byte[]data=packet.getEncoded(); - DatagramPacket dgp = packet.getSession().getDatagram(); - dgp.setData(data); - dgSocket.send(dgp); - } - - @Override - public String toString(){ - return "UDPEndpoint port="+port; - } - - public void sendRaw(DatagramPacket p)throws IOException{ - dgSocket.send(p); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a9/c0ecdbb15ba800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/a9/c0ecdbb15ba800171a8482560d609ceb deleted file mode 100644 index f4ef351..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a9/c0ecdbb15ba800171a8482560d609ceb +++ /dev/null @@ -1,196 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.UDTStatistics; - -public class UDTClient { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - private final UDPEndPoint clientEndpoint; - private ClientSession clientSession; - private boolean close=false; - private Thread closeThread=null;//cd - public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address,localport); - logger.info("Created client endpoint on port "+localport); - } - - public UDTClient(InetAddress address)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address); - logger.info("Created client endpoint on port "+clientEndpoint.getLocalPort()); - } - - public UDTClient(UDPEndPoint endpoint)throws SocketException, UnknownHostException{ - clientEndpoint=endpoint; - } - - /** - * establishes a connection to the given server. - * Starts the sender thread. - * @param host - * @param port - * @throws UnknownHostException - */ - public void connect(String host, int port)throws InterruptedException, UnknownHostException, IOException{ - InetAddress address=InetAddress.getByName(host); - Destination destination=new Destination(address,port); - //create client session... - clientSession=new ClientSession(clientEndpoint,destination); - clientEndpoint.addSession(clientSession.getSocketID(), clientSession); - - clientEndpoint.start(); - clientSession.connect(); - //wait for handshake - while(!clientSession.isReady()){ - Thread.sleep(500); - } - logger.info("The UDTClient is connected"); - Thread.sleep(500); - } - - /** - * sends the given data asynchronously - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - public void send(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWrite(data); - } - - public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWriteBlocking(data); - } - - public int read(byte[]data)throws IOException, InterruptedException{ - return clientSession.getSocket().getInputStream().read(data); - } - - /** - * flush outstanding data (and make sure it is acknowledged) - * @throws IOException - * @throws InterruptedException - */ - public void flush()throws IOException, InterruptedException{ - clientSession.getSocket().flush(); - } - - - public void shutdown()throws IOException{ - - if (clientSession.isReady()&& clientSession.active==true) - { - Shutdown shutdown = new Shutdown(); - shutdown.setDestinationID(clientSession.getDestination().getSocketID()); - shutdown.setSession(clientSession); - try{ - clientEndpoint.doSend(shutdown); - TimeUnit.MILLISECONDS.sleep(100); - } - catch(Exception e) - { - logger.log(Level.SEVERE,"ERROR: Connection could not be stopped!",e); - } - clientSession.getSocket().getReceiver().stop(); - clientEndpoint.stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - close=true; - } - } - - public UDTInputStream getInputStream()throws IOException{ - return clientSession.getSocket().getInputStream(); - } - - public UDTOutputStream getOutputStream()throws IOException{ - return clientSession.getSocket().getOutputStream(); - } - - public UDPEndPoint getEndpoint()throws IOException{ - return clientEndpoint; - } - - public UDTStatistics getStatistics(){ - return clientSession.getStatistics(); - } - - public long getSocketID() - { - //cd - return clientSession.getSocketID(); - } - - /** - * ͬر - * ȴݷɺٹر - * ֻȴ10ss - */ - public synchronized void close() - { - close=true; - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - - - } - - }); - } - - } - - public boolean isClose() - { - return close; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/aa/403bb575e1ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/aa/403bb575e1ac001716b9ca6d5abb90bc deleted file mode 100644 index e150146..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/aa/403bb575e1ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,187 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - long speed=0; - try - { - speed=sumBytes/((System.currentTimeMillis()-lastTime)/1000); - } - catch(Exception ex) - { - - } - lastTime=System.currentTimeMillis(); - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/aa/4083116e1dac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/aa/4083116e1dac001710ff8a7c6bda0fb8 deleted file mode 100644 index 0df0b5f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/aa/4083116e1dac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,63 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] buffer=null; -public long id; -private volatile int num=0; -private volatile int sum=0; -private byte[] result=null; -public DataStruct(int num) -{ - buffer=new byte[num][]; -} -private boolean check() -{ - if(num>=buffer.length) - { - //ɹ - if(sum==dataLen) - { - //ʼ - result=new byte[dataLen]; - int index=0; - ByteBuffer cur=ByteBuffer.wrap(result); - for(int i=0;i"); - FileOutputStream fos=null; - try{ - fos=new FileOutputStream(file); - - System.out.println("[ReceiveFile] Reading <"+size+"> bytes."); - long start = System.currentTimeMillis(); - ApplicationCode.CopySocketFile(fos, client,size,false); - long end = System.currentTimeMillis(); - double rate=1000.0*size/1024/1024/(end-start); - System.out.println("[ReceiveFile] Rate: "+format.format(rate)+" MBytes/sec. " - +format.format(8*rate)+" MBit/sec."); - System.out.println("ļɣ"+rspFile); - client.close(); - - } - catch(Exception ex) - { - - } - finally{ - try { - fos.close(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - }}); - recfile.setDaemon(true); - recfile.setName("ļ_"+localFile); - recfile.start(); - - }catch(Exception ex){ - throw new RuntimeException(ex); - } - - - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ab/506f76f61fac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/ab/506f76f61fac001710ff8a7c6bda0fb8 deleted file mode 100644 index 02860bf..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ab/506f76f61fac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,87 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] buffer=null; -public long id; -private volatile int num=0; -private volatile int sum=0; -private byte[] result=null; -public DataStruct(int num) -{ - buffer=new byte[num][]; -} - -/** - * - * @return - */ -private boolean check() -{ - if(num>=buffer.length) - { - //ɹ - if(sum==dataLen) - { - //ʼ - result=new byte[dataLen]; - ByteBuffer cur=ByteBuffer.wrap(result); - for(int i=0;i sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private boolean isRWMaster=true;//Ĭֵһ -private boolean islagerRead=false; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} - -/** - * - * @param port ˿ - */ -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - * @param localIP IP - * @param port ˿ - */ -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} -/** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * islagerRead=true - * @param isRead - */ -public void resetBufMaster(boolean isRead) -{ - this.isRWMaster=isRead; - -} - -/** - * ôݶȡ - * Ĭ false - * @param islarge - */ -public void setLargeRead(boolean islarge) -{ - this.islagerRead=islarge; -} -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=SocketControls.getInstance().getSocket(); - } - judpSocket jsocket=new judpSocket(socket); - judpSocketManager.getInstance(socket.getEndpoint()).addSocket(jsocket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ab/b09a89816da800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/ab/b09a89816da800171a8482560d609ceb deleted file mode 100644 index 9513601..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ab/b09a89816da800171a8482560d609ceb +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.IOException; -import java.util.logging.Logger; - - - - -/** - * @author jinyu - * - */ -public class TestRecFiles { - private static Logger log=Logger.getLogger(TestRecFile.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - RecviceFiles rec=new RecviceFiles(); - String dir="F://dbfile"; - rec.setDir(dir); - rec.start("127.0.0.1", 5555); - log.info("ļ"); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ac/30abf1fab4ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/ac/30abf1fab4ad0017181ed9113883eda9 deleted file mode 100644 index d42c7af..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ac/30abf1fab4ad0017181ed9113883eda9 +++ /dev/null @@ -1,187 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.SocketException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.SequenceNumber; - -/** - * Client side of a client-server UDT connection. - * Once established, the session provides a valid {@link UDTSocket}. - */ -public class ClientSession extends UDTSession { - - private static final Logger logger=Logger.getLogger(ClientSession.class.getName()); - - private UDPEndPoint endPoint; - public volatile int connectNum=0; - public ClientSession(UDPEndPoint endPoint, Destination dest)throws SocketException{ - super("ClientSession localPort="+endPoint.getLocalPort(),dest); - this.endPoint=endPoint; - logger.info("Created "+toString()); - } - - /** - * send connection handshake until a reply from server is received - * TODO check for timeout - * @throws InterruptedException - * @throws IOException - */ - - public void connect() throws InterruptedException,IOException{ - int n=0; - - while(getState()!=ready){ - - sendHandShake(); - if(getState()==invalid)throw new IOException("Can't connect!"); - n++; - if(getState()!=ready)Thread.sleep(500); - } - - cc.init(); - logger.info("Connected, "+n+" handshake packets sent"); - } - - @Override - public void received(UDTPacket packet, Destination peer) { - - lastPacket=packet; - - if (packet instanceof ConnectionHandshake) { - ConnectionHandshake hs=(ConnectionHandshake)packet; - - logger.info("Received connection handshake from "+peer+"\n"+hs); - - if (getState()!=ready) { - if(hs.getConnectionType()==1){ - try{ - //TODO validate parameters sent by peer - long peerSocketID=hs.getSocketID(); - destination.setSocketID(peerSocketID); - sendConfirmation(hs); - }catch(Exception ex){ - logger.log(Level.WARNING,"Error creating socket",ex); - setState(invalid); - } - return; - } - else{ - try{ - //TODO validate parameters sent by peer - long peerSocketID=hs.getSocketID(); - destination.setSocketID(peerSocketID); - setState(ready); - Thread.sleep(50); - this.setInitialSequenceNumber(hs.getInitialSeqNo());//cd - System.out.println("ʼû2:"+this.getInitialSequenceNumber()); - socket=new UDTSocket(endPoint,this); - - }catch(Exception ex){ - logger.log(Level.WARNING,"Error creating socket",ex); - setState(invalid); - } - return; - } - } - } - - if(getState() == ready) { - - if(packet instanceof Shutdown){ - setState(shutdown); - active=false; - logger.info("Connection shutdown initiated by the other side."); - return; - } - active = true; - try{ - if(packet.forSender()){ - socket.getSender().receive(lastPacket); - }else{ - socket.getReceiver().receive(lastPacket); - } - }catch(Exception ex){ - //session is invalid - logger.log(Level.SEVERE,"Error in "+toString(),ex); - setState(invalid); - } - return; - } - } - - - //handshake for connect - protected void sendHandShake()throws IOException{ - ConnectionHandshake handshake = new ConnectionHandshake(); - handshake.setConnectionType(ConnectionHandshake.CONNECTION_TYPE_REGULAR); - handshake.setSocketType(ConnectionHandshake.SOCKET_TYPE_DGRAM); - long initialSequenceNo=SequenceNumber.random(); - setInitialSequenceNumber(initialSequenceNo); - handshake.setInitialSeqNo(initialSequenceNo); - handshake.setPacketSize(getDatagramSize()); - handshake.setSocketID(mySocketID); - handshake.setMaxFlowWndSize(flowWindowSize); - handshake.setSession(this); - logger.info("Sending "+handshake); - endPoint.doSend(handshake); - } - - //2nd handshake for connect - protected void sendConfirmation(ConnectionHandshake hs)throws IOException{ - ConnectionHandshake handshake = new ConnectionHandshake(); - handshake.setConnectionType(-1); - handshake.setSocketType(ConnectionHandshake.SOCKET_TYPE_DGRAM); - handshake.setInitialSeqNo(hs.getInitialSeqNo()); - handshake.setPacketSize(hs.getPacketSize()); - handshake.setSocketID(mySocketID); - handshake.setMaxFlowWndSize(flowWindowSize); - handshake.setSession(this); - logger.info("Sending confirmation "+handshake); - endPoint.doSend(handshake); - } - - - public UDTPacket getLastPkt(){ - return lastPacket; - } - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ac/805f8d8db5ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/ac/805f8d8db5ac001716b9ca6d5abb90bc deleted file mode 100644 index 1014f4d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ac/805f8d8db5ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,355 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.DatagramPacket; -import java.net.DatagramSocket; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.SocketTimeoutException; -import java.net.UnknownHostException; -import java.util.Collection; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.SynchronousQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.PacketFactory; -import udt.util.UDTThreadFactory; - -/** - * the UDPEndpoint takes care of sending and receiving UDP network packets, - * dispatching them to the correct {@link UDTSession} - */ -public class UDPEndPoint { - - private static final Logger logger=Logger.getLogger(ClientSession.class.getName()); - - private final int port; - - private final DatagramSocket dgSocket; - - //active sessions keyed by socket ID - private final Mapsessions=new ConcurrentHashMap(); - - //last received packet - private UDTPacket lastPacket; - - //if the endpoint is configured for a server socket, - //this queue is used to handoff new UDTSessions to the application - private final SynchronousQueue sessionHandoff=new SynchronousQueue(); - - private boolean serverSocketMode=false; - - //has the endpoint been stopped? - private volatile boolean stopped=false; - - public static final int DATAGRAM_SIZE=1400; - - private volatile int sessionnum=0;//cd ʱͳ - - /** - * create an endpoint on the given socket - * - * @param socket - a UDP datagram socket - */ - public UDPEndPoint(DatagramSocket socket){ - this.dgSocket=socket; - port=dgSocket.getLocalPort(); - } - - /** - * bind to any local port on the given host address - * @param localAddress - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress)throws SocketException, UnknownHostException{ - this(localAddress,0); - } - - /** - * Bind to the given address and port - * @param localAddress - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress, int localPort)throws SocketException, UnknownHostException{ - if(localAddress==null){ - dgSocket=new DatagramSocket(localPort, localAddress); - }else{ - dgSocket=new DatagramSocket(localPort); - } - if(localPort>0)this.port = localPort; - else port=dgSocket.getLocalPort(); - - //set a time out to avoid blocking in doReceive() - dgSocket.setSoTimeout(100000); - //buffer size - dgSocket.setReceiveBufferSize(128*1024); - } - - /** - * bind to the default network interface on the machine - * - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(int localPort)throws SocketException, UnknownHostException{ - this(null,localPort); - } - - /** - * bind to an ephemeral port on the default network interface on the machine - * - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint()throws SocketException, UnknownHostException{ - this(null,0); - } - - /** - * start the endpoint. If the serverSocketModeEnabled flag is true, - * a new connection can be handed off to an application. The application needs to - * call #accept() to get the socket - * @param serverSocketModeEnabled - */ - public void start(boolean serverSocketModeEnabled){ - serverSocketMode=serverSocketModeEnabled; - //start receive thread - Runnable receive=new Runnable(){ - @Override - public void run(){ - try{ - doReceive(); - }catch(Exception ex){ - logger.log(Level.WARNING,"",ex); - } - } - }; - Thread t=UDTThreadFactory.get().newThread(receive); - t.setDaemon(true); - t.start(); - logger.info("UDTEndpoint started."); - } - - public void start(){ - start(false); - } - - public void stop(){ - stopped=true; - dgSocket.close(); - } - - /** - * @return the port which this client is bound to - */ - public int getLocalPort() { - return this.dgSocket.getLocalPort(); - } - /** - * @return Gets the local address to which the socket is bound - */ - public InetAddress getLocalAddress(){ - return this.dgSocket.getLocalAddress(); - } - - DatagramSocket getSocket(){ - return dgSocket; - } - - UDTPacket getLastPacket(){ - return lastPacket; - } - - public void addSession(Long destinationID,UDTSession session){ - logger.info("Storing session <"+destinationID+">"); - sessionnum++; - sessions.put(destinationID, session); - } - - public UDTSession getSession(Long destinationID){ - return sessions.get(destinationID); - } - - /** - * Ƴsession - * cd - * @param socketid - * @return - */ - public UDTSession removeSession(long socketid) - { - //cd - sessionnum--; - logger.info("Storing Sessionnum:"+sessionnum); - return sessions.remove(socketid); - } - public Collection getSessions(){ - return sessions.values(); - } - - /** - * wait the given time for a new connection - * @param timeout - the time to wait - * @param unit - the {@link TimeUnit} - * @return a new {@link UDTSession} - * @throws InterruptedException - */ - protected UDTSession accept(long timeout, TimeUnit unit)throws InterruptedException{ - return sessionHandoff.poll(timeout, unit); - } - - - final DatagramPacket dp= new DatagramPacket(new byte[DATAGRAM_SIZE],DATAGRAM_SIZE); - - /** - * single receive, run in the receiverThread, see {@link #start()} - *
    - *
  • Receives UDP packets from the network
  • - *
  • Converts them to UDT packets
  • - *
  • dispatches the UDT packets according to their destination ID.
  • - *
- * @throws IOException - */ - private long lastDestID=-1; - private UDTSession lastSession; - - //MeanValue v=new MeanValue("receiver processing ",true, 256); - - private int n=0; - - private final Object lock=new Object(); - - protected void doReceive()throws IOException{ - while(!stopped){ - try{ - try{ - //v.end(); - - //will block until a packet is received or timeout has expired - dgSocket.receive(dp); - - //v.begin(); - - Destination peer=new Destination(dp.getAddress(), dp.getPort()); - int l=dp.getLength(); - UDTPacket packet=PacketFactory.createPacket(dp.getData(),l); - lastPacket=packet; - - //handle connection handshake - if(packet.isConnectionHandshake()){ - synchronized(lock){ - Long id=Long.valueOf(packet.getDestinationID()); - UDTSession session=sessions.get(id); - if(session==null){ - session=new ServerSession(dp,this); - addSession(session.getSocketID(),session); - //TODO need to check peer to avoid duplicate server session - if(serverSocketMode){ - logger.fine("Pooling new request."); - sessionHandoff.put(session); - logger.fine("Request taken for processing."); - } - } - peer.setSocketID(((ConnectionHandshake)packet).getSocketID()); - session.received(packet,peer); - } - } - else{ - //dispatch to existing session - long dest=packet.getDestinationID(); - UDTSession session; - if(dest==lastDestID){ - session=lastSession; - } - else{ - session=sessions.get(dest); - lastSession=session; - lastDestID=dest; - } - if(session==null){ - n++; - if(n%100==1){ - logger.warning("Unknown session <"+dest+"> requested from <"+peer+"> packet type "+packet.getClass().getName()); - } - } - else{ - session.received(packet,peer); - logger.log(Level.INFO, ": "+packet.getPacketSequenceNumber()); - } - } - }catch(SocketException ex){ - if(ex.getMessage().equals("socket closed")&&stopped) - { - //Ѿر - } - else - { - logger.log(Level.INFO, "SocketException: "+ex.getMessage()); - } - }catch(SocketTimeoutException ste){ - //can safely ignore... we will retry until the endpoint is stopped - } - - }catch(Exception ex){ - logger.log(Level.WARNING, "Got: "+ex.getMessage(),ex); - } - } - } - - protected void doSend(UDTPacket packet)throws IOException{ - byte[]data=packet.getEncoded(); - DatagramPacket dgp = packet.getSession().getDatagram(); - dgp.setData(data); - dgSocket.send(dgp); - } - - @Override - public String toString(){ - return "UDPEndpoint port="+port; - } - - public void sendRaw(DatagramPacket p)throws IOException{ - dgSocket.send(p); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ac/a0ca04a35ba800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/ac/a0ca04a35ba800171a8482560d609ceb deleted file mode 100644 index ac9ea61..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ac/a0ca04a35ba800171a8482560d609ceb +++ /dev/null @@ -1,196 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.UDTStatistics; - -public class UDTClient { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - private final UDPEndPoint clientEndpoint; - private ClientSession clientSession; - private boolean close=false; - private Thread closeThread=null;//cd - public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address,localport); - logger.info("Created client endpoint on port "+localport); - } - - public UDTClient(InetAddress address)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address); - logger.info("Created client endpoint on port "+clientEndpoint.getLocalPort()); - } - - public UDTClient(UDPEndPoint endpoint)throws SocketException, UnknownHostException{ - clientEndpoint=endpoint; - } - - /** - * establishes a connection to the given server. - * Starts the sender thread. - * @param host - * @param port - * @throws UnknownHostException - */ - public void connect(String host, int port)throws InterruptedException, UnknownHostException, IOException{ - InetAddress address=InetAddress.getByName(host); - Destination destination=new Destination(address,port); - //create client session... - clientSession=new ClientSession(clientEndpoint,destination); - clientEndpoint.addSession(clientSession.getSocketID(), clientSession); - - clientEndpoint.start(); - clientSession.connect(); - //wait for handshake - while(!clientSession.isReady()){ - Thread.sleep(500); - } - logger.info("The UDTClient is connected"); - Thread.sleep(500); - } - - /** - * sends the given data asynchronously - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - public void send(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWrite(data); - } - - public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWriteBlocking(data); - } - - public int read(byte[]data)throws IOException, InterruptedException{ - return clientSession.getSocket().getInputStream().read(data); - } - - /** - * flush outstanding data (and make sure it is acknowledged) - * @throws IOException - * @throws InterruptedException - */ - public void flush()throws IOException, InterruptedException{ - clientSession.getSocket().flush(); - } - - - public void shutdown()throws IOException{ - - if (clientSession.isReady()&& clientSession.active==true) - { - Shutdown shutdown = new Shutdown(); - shutdown.setDestinationID(clientSession.getDestination().getSocketID()); - shutdown.setSession(clientSession); - try{ - clientEndpoint.doSend(shutdown); - TimeUnit.MILLISECONDS.sleep(100); - } - catch(Exception e) - { - logger.log(Level.SEVERE,"ERROR: Connection could not be stopped!",e); - } - clientSession.getSocket().getReceiver().stop(); - clientEndpoint.stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - close=true; - } - } - - public UDTInputStream getInputStream()throws IOException{ - return clientSession.getSocket().getInputStream(); - } - - public UDTOutputStream getOutputStream()throws IOException{ - return clientSession.getSocket().getOutputStream(); - } - - public UDPEndPoint getEndpoint()throws IOException{ - return clientEndpoint; - } - - public UDTStatistics getStatistics(){ - return clientSession.getStatistics(); - } - - public long getSocketID() - { - //cd - return clientSession.getSocketID(); - } - - /** - * ͬر - * ȴݷɺٹر - * ֻȴ10ss - */ - public synchronized void close() - { - close=true; - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - - - } - - }) - } - - } - - public boolean isClose() - { - return close; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ad/40667fc262a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/ad/40667fc262a800171a8482560d609ceb deleted file mode 100644 index 2fdf3a6..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ad/40667fc262a800171a8482560d609ceb +++ /dev/null @@ -1,16 +0,0 @@ -/** - * - */ -package judp; - -/** - * @author jinyu - * - */ -public class judpGroupSocket { - -public judpGroupSocket() -{ - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ad/4083114ddeac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/ad/4083114ddeac001716b9ca6d5abb90bc deleted file mode 100644 index 5b6b3aa..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ad/4083114ddeac001716b9ca6d5abb90bc +++ /dev/null @@ -1,179 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long startTime=System.currentTimeMillis(); - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - long speed=sumBytes/((System.currentTimeMillis()-startTime)/1000); - - log.info("ļٶȣ"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ad/70fcec3e27ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/ad/70fcec3e27ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 58dd9c8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ad/70fcec3e27ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,337 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public boolean getCloseState() -{ - return isClose; -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(isClose) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - sub.split(data, dataLen); - } - for(int i=0;i list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public UDTSocket getSocket() -{ - - int index=-1; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(index==-1) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳ - i=-1;//± - index=i; - } - } - else - { - // - if(i==index) - { - continue; - } - else - { - list.get(i).close(); - long id=list.get(i).getSession().getSocketID(); - list.get(i).getEndpoint().removeSession(id); - list.get(i).getReceiver().stop(); - list.get(i).getSender().stop(); - //cd - - - - } - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - return null; - -} -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/af/0088a7b1c9ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/af/0088a7b1c9ac001716b9ca6d5abb90bc deleted file mode 100644 index 8bbaa68..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/af/0088a7b1c9ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,605 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.ControlPacket; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.packets.Shutdown; -import udt.packets.ControlPacket.ControlPacketType; -import udt.receiver.AckHistoryEntry; -import udt.receiver.AckHistoryWindow; -import udt.receiver.PacketHistoryWindow; -import udt.receiver.PacketPairWindow; -import udt.receiver.ReceiverLossList; -import udt.receiver.ReceiverLossListEntry; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - -/** - * receiver part of a UDT entity - * @see UDTSender - */ -public class UDTReceiver { - - private static final Logger logger=Logger.getLogger(UDTReceiver.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //record seqNo of detected lostdata and latest feedback time - private final ReceiverLossList receiverLossList; - - //record each sent ACK and the sent time - private final AckHistoryWindow ackHistoryWindow; - - //Packet history window that stores the time interval between the current and the last seq. - private final PacketHistoryWindow packetHistoryWindow; - - //for storing the arrival time of the last received data packet - private volatile long lastDataPacketArrivalTime=0; - - //largest received data packet sequence number(LRSN) - private volatile long largestReceivedSeqNumber=0; - - //ACK event related - - //last Ack number - private long lastAckNumber=0; - - //largest Ack number ever acknowledged by ACK2 - private volatile long largestAcknowledgedAckNumber=-1; - - //EXP event related - - //a variable to record number of continuous EXP time-out events - private volatile long expCount=0; - - /*records the time interval between each probing pair - compute the median packet pair interval of the last - 16 packet pair intervals (PI) and the estimate link capacity.(packet/s)*/ - private final PacketPairWindow packetPairWindow; - - //estimated link capacity - long estimateLinkCapacity; - // the packet arrival rate - long packetArrivalSpeed; - - //round trip time, calculated from ACK/ACK2 pairs - long roundTripTime=0; - //round trip time variance - long roundTripTimeVar=roundTripTime/2; - - //to check the ACK, NAK, or EXP timer - private long nextACK; - //microseconds to next ACK event - private long ackTimerInterval=Util.getSYNTime(); - - private long nextNAK; - //microseconds to next NAK event - private long nakTimerInterval=Util.getSYNTime(); - - private long nextEXP; - //microseconds to next EXP event - private long expTimerInterval=100*Util.getSYNTime(); - - //instant when the session was created (for expiry checking) - private final long sessionUpSince; - //milliseconds to timeout a new session that stays idle - private final long IDLE_TIMEOUT = 3*60*1000; - - //buffer size for storing data - private final long bufferSize; - - //stores received packets to be sent - private final BlockingQueuehandoffQueue; - - private Thread receiverThread; - - private volatile boolean stopped=false; - - //(optional) ack interval (see CongestionControl interface) - private volatile long ackInterval=-1; - - /** - * if set to true connections will not expire, but will only be - * closed by a Shutdown message - */ - public static boolean connectionExpiryDisabled=false; - - private final boolean storeStatistics; - - - - /** - * create a receiver with a valid {@link UDTSession} - * @param session - */ - public UDTReceiver(UDTSession session,UDPEndPoint endpoint){ - this.endpoint = endpoint; - this.session=session; - this.sessionUpSince=System.currentTimeMillis(); - this.statistics=session.getStatistics(); - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - ackHistoryWindow = new AckHistoryWindow(16); - packetHistoryWindow = new PacketHistoryWindow(16); - receiverLossList = new ReceiverLossList(); - packetPairWindow = new PacketPairWindow(16); - largestReceivedSeqNumber=session.getInitialSequenceNumber()-1; - bufferSize=session.getReceiveBufferSize(); - handoffQueue=new ArrayBlockingQueue(4*session.getFlowWindowSize()); - storeStatistics=Boolean.getBoolean("udt.receiver.storeStatistics"); - initMetrics(); - start(); - } - - private MeanValue dgReceiveInterval; - private MeanValue dataPacketInterval; - private MeanValue processTime; - private MeanValue dataProcessTime; - private void initMetrics(){ - if(!storeStatistics)return; - dgReceiveInterval=new MeanValue("UDT receive interval"); - statistics.addMetric(dgReceiveInterval); - dataPacketInterval=new MeanValue("Data packet interval"); - statistics.addMetric(dataPacketInterval); - processTime=new MeanValue("UDT packet process time"); - statistics.addMetric(processTime); - dataProcessTime=new MeanValue("Data packet process time"); - statistics.addMetric(dataProcessTime); - } - - - //starts the sender algorithm - private void start(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - nextACK=Util.getCurrentTime()+ackTimerInterval; - nextNAK=(long)(Util.getCurrentTime()+1.5*nakTimerInterval); - nextEXP=Util.getCurrentTime()+2*expTimerInterval; - ackInterval=session.getCongestionControl().getAckInterval(); - while(!stopped){ - receiverAlgorithm(); - } - } - catch(Exception ex){ - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING RECEIVER for "+session); - } - }; - receiverThread=UDTThreadFactory.get().newThread(r); - receiverThread.start(); - } - - /* - * packets are written by the endpoint - */ - protected void receive(UDTPacket p)throws IOException{ - if(storeStatistics)dgReceiveInterval.end(); - handoffQueue.offer(p); - if(storeStatistics)dgReceiveInterval.begin(); - } - - /** - * receiver algorithm - * see specification P11. - */ - public void receiverAlgorithm()throws InterruptedException,IOException{ - //check ACK timer - long currentTime=Util.getCurrentTime(); - if(nextACKseqNumbers=receiverLossList.getFilteredSequenceNumbers(roundTripTime,true); - sendNAK(seqNumbers); - } - - /** - * process EXP event (see spec. p 13) - */ - protected void processEXPEvent()throws IOException{ - if(session.getSocket()==null)return; - UDTSender sender=session.getSocket().getSender(); - //put all the unacknowledged packets in the senders loss list - sender.putUnacknowledgedPacketsIntoLossList(); - if(expCount>16 && System.currentTimeMillis()-sessionUpSince > IDLE_TIMEOUT){ - if(!connectionExpiryDisabled &&!stopped){ - sendShutdown(); - stop(); - logger.info("Session "+session+" expired."); - return; - } - } - if(!sender.haveLostPackets()){ - sendKeepAlive(); - } - expCount++; - } - - protected void processUDTPacket(UDTPacket p)throws IOException{ - //(3).Check the packet type and process it according to this. - - if(!p.isControlPacket()){ - DataPacket dp=(DataPacket)p; - if(storeStatistics){ - dataPacketInterval.end(); - dataProcessTime.begin(); - } - onDataPacketReceived(dp); - if(storeStatistics){ - dataProcessTime.end(); - dataPacketInterval.begin(); - } - logger.info("DataPacket udt:"+p.getPacketSequenceNumber()); - } - - else if (p.getControlPacketType()==ControlPacketType.ACK2.ordinal()){ - Acknowledgment2 ack2=(Acknowledgment2)p; - onAck2PacketReceived(ack2); - } - - else if (p instanceof Shutdown){ - onShutdown(); - } - - } - - //every nth packet will be discarded... for testing only of course - public static int dropRate=0; - - //number of received data packets - private int n=0; - - protected void onDataPacketReceived(DataPacket dp)throws IOException{ - long currentSequenceNumber = dp.getPacketSequenceNumber(); - - //for TESTING : check whether to drop this packet -// n++; -// //if(dropRate>0 && n % dropRate == 0){ -// if(n % 1111 == 0){ -// logger.info("**** TESTING:::: DROPPING PACKET "+currentSequenceNumber+" FOR TESTING"); -// return; -// } -// //} - boolean OK=session.getSocket().getInputStream().haveNewData(currentSequenceNumber,dp.getData()); - if(!OK){ - logger.info("haveNewData:ʧ"); - //need to drop packet... - return; - } - - long currentDataPacketArrivalTime = Util.getCurrentTime(); - - /*(4).if the seqNo of the current data packet is 16n+1,record the - time interval between this packet and the last data packet - in the packet pair window*/ - if((currentSequenceNumber%16)==1 && lastDataPacketArrivalTime>0){ - long interval=currentDataPacketArrivalTime -lastDataPacketArrivalTime; - packetPairWindow.add(interval); - } - - //(5).record the packet arrival time in the PKT History Window. - packetHistoryWindow.add(currentDataPacketArrivalTime); - - - //store current time - lastDataPacketArrivalTime=currentDataPacketArrivalTime; - logger.info("largestReceivedSeqNumber:"+largestReceivedSeqNumber); - - //(6).number of detected lossed packet - /*(6.a).if the number of the current data packet is greater than LSRN+1, - put all the sequence numbers between (but excluding) these two values - into the receiver's loss list and send them to the sender in an NAK packet*/ - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber+1)>0){ - sendNAK(currentSequenceNumber); - - } - else if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)<0){ - /*(6.b).if the sequence number is less than LRSN,remove it from - * the receiver's loss list - */ - receiverLossList.remove(currentSequenceNumber); - logger.info("receiverLossList remove:"+currentSequenceNumber); - } - - statistics.incNumberOfReceivedDataPackets(); - - //(7).Update the LRSN - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)>0){ - largestReceivedSeqNumber=currentSequenceNumber; - } - - //(8) need to send an ACK? Some cc algorithms use this - if(ackInterval>0){ - if(n % ackInterval == 0)processACKEvent(false); - } - } - - /** - * write a NAK triggered by a received sequence number that is larger than - * the largestReceivedSeqNumber + 1 - * @param currentSequenceNumber - the currently received sequence number - * @throws IOException - */ - protected void sendNAK(long currentSequenceNumber)throws IOException{ - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(largestReceivedSeqNumber+1, currentSequenceNumber); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - //put all the sequence numbers between (but excluding) these two values into the - //receiver loss list - for(long i=largestReceivedSeqNumber+1;isequenceNumbers)throws IOException{ - if(sequenceNumbers.size()==0)return; - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(sequenceNumbers); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(nAckPacket); - statistics.incNumberOfNAKSent(); - - } - - protected long sendLightAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt=buildLightAcknowledgement(ackNumber); - endpoint.doSend(acknowledgmentPkt); - statistics.incNumberOfACKSent(); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - protected long sendAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); - //set the estimate link capacity - estimateLinkCapacity=packetPairWindow.getEstimatedLinkCapacity(); - acknowledgmentPkt.setEstimatedLinkCapacity(estimateLinkCapacity); - //set the packet arrival rate - packetArrivalSpeed=packetHistoryWindow.getPacketArrivalSpeed(); - acknowledgmentPkt.setPacketReceiveRate(packetArrivalSpeed); - - endpoint.doSend(acknowledgmentPkt); - - statistics.incNumberOfACKSent(); - statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - //builds a "light" Acknowledgement - private Acknowledgement buildLightAcknowledgement(long ackNumber){ - Acknowledgement acknowledgmentPkt = new Acknowledgement(); - //the packet sequence number to which all the packets have been received - acknowledgmentPkt.setAckNumber(ackNumber); - //assign this ack a unique increasing ACK sequence number - acknowledgmentPkt.setAckSequenceNumber(++ackSequenceNumber); - acknowledgmentPkt.setRoundTripTime(roundTripTime); - acknowledgmentPkt.setRoundTripTimeVar(roundTripTimeVar); - //set the buffer size - acknowledgmentPkt.setBufferSize(bufferSize); - - acknowledgmentPkt.setDestinationID(session.getDestination().getSocketID()); - acknowledgmentPkt.setSession(session); - - return acknowledgmentPkt; - } - - /** - * spec p. 13:
- 1) Locate the related ACK in the ACK History Window according to the - ACK sequence number in this ACK2.
- 2) Update the largest ACK number ever been acknowledged.
- 3) Calculate new rtt according to the ACK2 arrival time and the ACK - departure time, and update the RTT value as: RTT = (RTT * 7 + - rtt) / 8.
- 4) Update RTTVar by: RTTVar = (RTTVar * 3 + abs(RTT - rtt)) / 4.
- 5) Update both ACK and NAK period to 4 * RTT + RTTVar + SYN.
- */ - protected void onAck2PacketReceived(Acknowledgment2 ack2){ - AckHistoryEntry entry=ackHistoryWindow.getEntry(ack2.getAckSequenceNumber()); - if(entry!=null){ - long ackNumber=entry.getAckNumber(); - largestAcknowledgedAckNumber=Math.max(ackNumber, largestAcknowledgedAckNumber); - - long rtt=entry.getAge(); - if(roundTripTime>0)roundTripTime = (roundTripTime*7 + rtt)/8; - else roundTripTime = rtt; - roundTripTimeVar = (roundTripTimeVar* 3 + Math.abs(roundTripTimeVar- rtt)) / 4; - ackTimerInterval=4*roundTripTime+roundTripTimeVar+Util.getSYNTime(); - nakTimerInterval=ackTimerInterval; - statistics.setRTT(roundTripTime, roundTripTimeVar); - } - } - - protected void sendKeepAlive()throws IOException{ - KeepAlive ka=new KeepAlive(); - ka.setDestinationID(session.getDestination().getSocketID()); - ka.setSession(session); - endpoint.doSend(ka); - } - - protected void sendShutdown()throws IOException{ - Shutdown s=new Shutdown(); - s.setDestinationID(session.getDestination().getSocketID()); - s.setSession(session); - endpoint.doSend(s); - } - - private volatile long ackSequenceNumber=0; - - protected void resetEXPTimer(){ - nextEXP=Util.getCurrentTime()+expTimerInterval; - expCount=0; - } - - protected void resetEXPCount(){ - expCount=0; - } - - public void setAckInterval(long ackInterval){ - this.ackInterval=ackInterval; - } - - protected void onShutdown()throws IOException{ - stop(); - } - - public void stop()throws IOException{ - stopped=true; - session.getSocket().close(); - //stop our sender as well - session.getSocket().getSender().stop(); - } - - @Override - public String toString(){ - StringBuilder sb=new StringBuilder(); - sb.append("UDTReceiver ").append(session).append("\n"); - sb.append("LossList: "+receiverLossList); - return sb.toString(); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/af/308465da1bac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/af/308465da1bac001710ff8a7c6bda0fb8 deleted file mode 100644 index 303cadc..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/af/308465da1bac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,26 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -/** - * @author jinyu - * - */ -public class PackagetCombin { - private static ConcurrentHashMap hash=new ConcurrentHashMap(); -public static void addData(byte[] data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - DataStruct struct=hash.get(id); - if(struct==null) - { - struct=new DataStruct(); - hash.put(id, struct); - } - struct.addData(data); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/af/b087283700ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/af/b087283700ac001710ff8a7c6bda0fb8 deleted file mode 100644 index e69de29..0000000 diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b/30f2f53008ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/b/30f2f53008ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 5205b29..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b/30f2f53008ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,98 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; - -import java.util.WeakHashMap; - -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - @SuppressWarnings("rawtypes") - private final ReferenceQueue q = new ReferenceQueue(); - private long num=0; - /** - * ʹ - */ - private final WeakHashMap hashMap=new WeakHashMap (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @SuppressWarnings("unchecked") - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("socket"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - if(num%200==0) - { - System.gc(); - } - num++; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b/700303e004ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/b/700303e004ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 335644e..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b/700303e004ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,32 +0,0 @@ -/** - * - */ -package judp; - - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; - -/** - * @author jinyu - * @param - * - */ -public class SocketReference extends WeakReference { - private long socketid=-1; - public SocketReference(T referent) { - super(referent); - - } - public SocketReference(T referent,long id) { - super(referent); - this.socketid=id; - } - public SocketReference(judpSocket socket, long socketID2, ReferenceQueue q) { - // TODO Auto-generated constructor stub - } - public long getid() - { - return socketid; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b/806d1b51b4ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/b/806d1b51b4ad0017181ed9113883eda9 deleted file mode 100644 index 3fd2f0f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b/806d1b51b4ad0017181ed9113883eda9 +++ /dev/null @@ -1,524 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - // - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b/9082330aa0ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/b/9082330aa0ad0017181ed9113883eda9 deleted file mode 100644 index e60097a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b/9082330aa0ad0017181ed9113883eda9 +++ /dev/null @@ -1,33 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.File; -import java.io.StringReader; - -import javax.swing.text.Document; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; - -import org.xml.sax.InputSource; - -/** - * @author jinyu - * - */ -public class ReadXml { -public String readXml(String file) -{ - File f=new File(file); - if(!f.exists()) - { - return ""; - } - StringReader sr = new StringReader(xmlStr); - InputSource is = new InputSource(sr); - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - DocumentBuilder builder=factory.newDocumentBuilder(); - Document doc = (Document) builder.parse(is); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b/c059b6a503ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/b/c059b6a503ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 92f4bf0..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b/c059b6a503ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,77 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private LinkedBlockingQueue> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference objsocket=q.poll(); - if(objsocket.get()!=null) - { - judpSocket socket=objsocket.get(); - if(socket.getCloseState()) - { - - socket.close(); - } - } - - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - private void startThread() { - - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b0/70d2168260a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/b0/70d2168260a800171a8482560d609ceb deleted file mode 100644 index 2f32423..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b0/70d2168260a800171a8482560d609ceb +++ /dev/null @@ -1,262 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.io.InputStream; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; -import udt.util.ReceiveBuffer; - -/** - * The UDTInputStream receives data blocks from the {@link UDTSocket} - * as they become available, and places them into an ordered, - * bounded queue (the flow window) for reading by the application - * - * - */ -public class UDTInputStream extends InputStream { - - //the socket owning this inputstream - private final UDTSocket socket; - - private final ReceiveBuffer receiveBuffer; - - //set to 'false' by the receiver when it gets a shutdown signal from the peer - //see the noMoreData() method - private final AtomicBoolean expectMoreData=new AtomicBoolean(true); - - private volatile boolean closed=false; - - private volatile boolean blocking=true; - - private volatile boolean hasData=false;//cd - - - - /** - * create a new {@link UDTInputStream} connected to the given socket - * @param socket - the {@link UDTSocket} - * @throws IOException - */ - public UDTInputStream(UDTSocket socket)throws IOException{ - this.socket=socket; - int capacity=socket!=null? 2 * socket.getSession().getFlowWindowSize() : 128 ; - long initialSequenceNum=socket!=null?socket.getSession().getInitialSequenceNumber():1; - receiveBuffer=new ReceiveBuffer(capacity,initialSequenceNum); - } - - private final byte[]single=new byte[1]; - - @Override - public int read()throws IOException{ - int b=0; - while(b==0) - b=read(single); - - if(b>0){ - return single[0]; - } - else { - return b; - } - } - - private AppData currentChunk=null; - //offset into currentChunk - int offset=0; - long id=-1; - @Override - public int read(byte[]target)throws IOException{ - try{ - int read=0; - updateCurrentChunk(false); - while(currentChunk!=null){ - byte[]data=currentChunk.data; - int length=Math.min(target.length-read,data.length-offset); - System.arraycopy(data, offset, target, read, length); - read+=length; - offset+=length; - //check if chunk has been fully read - if(offset>=data.length){ - currentChunk=null; - offset=0; - } - - //if no more space left in target, exit now - if(read==target.length){ - return read; - } - - updateCurrentChunk(blocking && read==0); - } - - if(read>0)return read; - if(closed)return -1; - if(expectMoreData.get() || !receiveBuffer.isEmpty())return 0; - //no more data - return -1; - - }catch(Exception ex){ - IOException e= new IOException(); - e.initCause(ex); - throw e; - } - } - - /** - * Reads the next valid chunk of application data from the queue
- * - * In blocking mode,this method will block until data is available or the socket is closed, - * otherwise it will wait for at most 10 milliseconds. - * - * @throws InterruptedException - */ - private void updateCurrentChunk(boolean block)throws IOException{ - if(currentChunk!=null)return; - - while(true){ - try{ - if(block){ - currentChunk=receiveBuffer.poll(1, TimeUnit.MILLISECONDS); - while (!closed && currentChunk==null){ - currentChunk=receiveBuffer.poll(1000, TimeUnit.MILLISECONDS); - } - } - else currentChunk=receiveBuffer.poll(10, TimeUnit.MILLISECONDS); - - }catch(InterruptedException ie){ - IOException ex=new IOException(); - ex.initCause(ie); - throw ex; - } - return; - } - } - - /** - * new application data - * @param data - * - */ - protected boolean haveNewData(long sequenceNumber,byte[]data)throws IOException{ - return receiveBuffer.offer(new AppData(sequenceNumber,data)); - } - - @Override - public void close()throws IOException{ - if(closed)return; - closed=true; - noMoreData(); - } - - public UDTSocket getSocket(){ - return socket; - } - - /** - * sets the blocking mode - * @param block - */ - public void setBlocking(boolean block){ - this.blocking=block; - } - - public int getReceiveBufferSize(){ - return receiveBuffer.getSize(); - } - - /** - * notify the input stream that there is no more data - * @throws IOException - */ - protected void noMoreData()throws IOException{ - expectMoreData.set(false); - } - - /** - * used for storing application data and the associated - * sequence number in the queue in ascending order - */ - public static class AppData implements Comparable{ - final long sequenceNumber; - final byte[] data; - public AppData(long sequenceNumber, byte[]data){ - this.sequenceNumber=sequenceNumber; - this.data=data; - } - - @Override - public int compareTo(AppData o) { - return (int)(sequenceNumber-o.sequenceNumber); - } - - @Override - public String toString(){ - return sequenceNumber+"["+data.length+"]"; - } - - public long getSequenceNumber(){ - return sequenceNumber; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result - + (int) (sequenceNumber ^ (sequenceNumber >>> 32)); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - AppData other = (AppData) obj; - if (sequenceNumber != other.sequenceNumber) - return false; - return true; - } - - public boolean isHasData() - { - - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b1/0051cea6d5ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/b1/0051cea6d5ac001716b9ca6d5abb90bc deleted file mode 100644 index f405083..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b1/0051cea6d5ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,263 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡ - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(islagerRead) - { - // cd Ϊݶȡ׼ - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - } - else - { - - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b1/504219b51dac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/b1/504219b51dac001710ff8a7c6bda0fb8 deleted file mode 100644 index 6f9a5fe..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b1/504219b51dac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,63 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] buffer=null; -public long id; -private volatile int num=0; -private volatile int sum=0; -private byte[] result=null; -public DataStruct(int num) -{ - buffer=new byte[num][]; -} -private boolean check() -{ - if(num>=buffer.length) - { - //ɹ - if(sum==dataLen) - { - //ʼ - result=new byte[dataLen]; - int index=0; - ByteBuffer cur=ByteBuffer.wrap(result); - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - while((count=dis.read(buf,0, bufSize))!=-1) - { - log.info("1:"); - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - log.info(":"+sum); - - } - client.close(); - dis.close(); - log.info("ɣ"+f.getName()); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b1/d074365422ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/b1/d074365422ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 903398a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b1/d074365422ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,208 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public void pauseOutput() - { - try { - client.getOutputStream().pauseOutput(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - public byte[] read() - { - byte[] result=null; - if(client!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=client.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; - } - public int read(byte[]data) - { - try { - return client.read(data); - } catch (IOException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - return -1; - } - public void close() - { - if(client!=null) - { - if(sumLen==0) - { - //ûз - //ر - try { - if(!client.isClose()) - client.shutdown(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - else - { - //ʼ - //SocketManager.getInstance().add(client); - if(!client.isClose()) - client.close(); - } - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b1/f0e13d3e5ca800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/b1/f0e13d3e5ca800171a8482560d609ceb deleted file mode 100644 index 4b8d7dd..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b1/f0e13d3e5ca800171a8482560d609ceb +++ /dev/null @@ -1,207 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.UDTStatistics; - -public class UDTClient { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - private final UDPEndPoint clientEndpoint; - private ClientSession clientSession; - private boolean close=false; - private Thread closeThread=null;//cd - public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address,localport); - logger.info("Created client endpoint on port "+localport); - } - - public UDTClient(InetAddress address)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address); - logger.info("Created client endpoint on port "+clientEndpoint.getLocalPort()); - } - - public UDTClient(UDPEndPoint endpoint)throws SocketException, UnknownHostException{ - clientEndpoint=endpoint; - } - - /** - * establishes a connection to the given server. - * Starts the sender thread. - * @param host - * @param port - * @throws UnknownHostException - */ - public void connect(String host, int port)throws InterruptedException, UnknownHostException, IOException{ - InetAddress address=InetAddress.getByName(host); - Destination destination=new Destination(address,port); - //create client session... - clientSession=new ClientSession(clientEndpoint,destination); - clientEndpoint.addSession(clientSession.getSocketID(), clientSession); - - clientEndpoint.start(); - clientSession.connect(); - //wait for handshake - while(!clientSession.isReady()){ - Thread.sleep(500); - } - logger.info("The UDTClient is connected"); - Thread.sleep(500); - } - - /** - * sends the given data asynchronously - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - public void send(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWrite(data); - } - - public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWriteBlocking(data); - } - - public int read(byte[]data)throws IOException, InterruptedException{ - return clientSession.getSocket().getInputStream().read(data); - } - - /** - * flush outstanding data (and make sure it is acknowledged) - * @throws IOException - * @throws InterruptedException - */ - public void flush()throws IOException, InterruptedException{ - clientSession.getSocket().flush(); - } - - - public void shutdown()throws IOException{ - - if (clientSession.isReady()&& clientSession.active==true) - { - Shutdown shutdown = new Shutdown(); - shutdown.setDestinationID(clientSession.getDestination().getSocketID()); - shutdown.setSession(clientSession); - try{ - clientEndpoint.doSend(shutdown); - TimeUnit.MILLISECONDS.sleep(100); - } - catch(Exception e) - { - logger.log(Level.SEVERE,"ERROR: Connection could not be stopped!",e); - } - clientSession.getSocket().getReceiver().stop(); - clientEndpoint.stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - close=true; - } - } - - public UDTInputStream getInputStream()throws IOException{ - return clientSession.getSocket().getInputStream(); - } - - public UDTOutputStream getOutputStream()throws IOException{ - return clientSession.getSocket().getOutputStream(); - } - - public UDPEndPoint getEndpoint()throws IOException{ - return clientEndpoint; - } - - public UDTStatistics getStatistics(){ - return clientSession.getStatistics(); - } - - public long getSocketID() - { - //cd - return clientSession.getSocketID(); - } - - /** - * ͬر - * ȴݷɺٹر - * ֻȴ10ss - */ - public synchronized void close() - { - close=true; - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - if(clientSession.getSocket().getSender().isSenderEmpty()) - { - try { - shutdown(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - } - - } - - public boolean isClose() - { - return close; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b2/204ab9a023ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/b2/204ab9a023ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 9818ccd..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b2/204ab9a023ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,316 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public boolean getCloseState() -{ - return isClose; -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readData() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} -/** - * - * ݲܷ - */ -public boolean sendSplitData(byte[]data) { - if(isClose) - { - return false; - } - - return false; -} -/** - * ȡԶhost - * @return - */ -public String getRemoteHost() { -return socket.getSession().getDestination().getAddress().getHostName(); - -} - -/** - * ȡԶ˶˿ - * @return - */ -public int getRemotePort() { - return socket.getSession().getDestination().getPort(); -} - -/** - * socketid - * @return - */ -public long getID() { - - return socketID; -} - - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b2/b0190bb66aa800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/b2/b0190bb66aa800171a8482560d609ceb deleted file mode 100644 index 85d3a72..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b2/b0190bb66aa800171a8482560d609ceb +++ /dev/null @@ -1,42 +0,0 @@ -/** - * - */ -package Test; - -import java.util.logging.Logger; - -import net.File.FileMonitor; -import net.File.FilesWatch; -import net.File.SendFiles; - - - -/** - * @author jinyu - * - */ -public class TestSendFile { - private static Logger log=Logger.getLogger(TestSendFile.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //SendFiles send=new SendFiles("192.168.9.152", 5555); - SendFiles send=new SendFiles("127.0.0.1", 5555); - FilesWatch watch=new FilesWatch(); - String dir="F:/monitor"; - watch.setWatch(dir); - watch.start(); - while(true) - { - FileMonitor ff= watch.take(); - log.info(ff.file); - if(ff.file.endsWith(".tmp")) - { - continue; - } - send.sendFile(dir+"/"+ff.file); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b2/d07c71886da800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/b2/d07c71886da800171a8482560d609ceb deleted file mode 100644 index 35194ca..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b2/d07c71886da800171a8482560d609ceb +++ /dev/null @@ -1,42 +0,0 @@ -/** - * - */ -package net.File; - -import java.util.logging.Logger; - -import net.File.FileMonitor; -import net.File.FilesWatch; - - - - -/** - * @author jinyu - * - */ -public class TestSendFiles { - private static Logger log=Logger.getLogger(TestSendFile.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //SendFiles send=new SendFiles("192.168.9.152", 5555); - SendFiles send=new SendFiles("127.0.0.1", 5555); - FilesWatch watch=new FilesWatch(); - String dir="F:/monitor"; - watch.setWatch(dir); - watch.start(); - while(true) - { - FileMonitor ff= watch.take(); - log.info(ff.file); - if(ff.file.endsWith(".tmp")) - { - continue; - } - send.sendFile(dir+"/"+ff.file); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b3/201bd76bb3ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/b3/201bd76bb3ad0017181ed9113883eda9 deleted file mode 100644 index 2d89569..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b3/201bd76bb3ad0017181ed9113883eda9 +++ /dev/null @@ -1,511 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b3/40a5f1e8b8ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/b3/40a5f1e8b8ac001716b9ca6d5abb90bc deleted file mode 100644 index ef04afe..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b3/40a5f1e8b8ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,603 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.ControlPacket; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.packets.Shutdown; -import udt.packets.ControlPacket.ControlPacketType; -import udt.receiver.AckHistoryEntry; -import udt.receiver.AckHistoryWindow; -import udt.receiver.PacketHistoryWindow; -import udt.receiver.PacketPairWindow; -import udt.receiver.ReceiverLossList; -import udt.receiver.ReceiverLossListEntry; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - -/** - * receiver part of a UDT entity - * @see UDTSender - */ -public class UDTReceiver { - - private static final Logger logger=Logger.getLogger(UDTReceiver.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //record seqNo of detected lostdata and latest feedback time - private final ReceiverLossList receiverLossList; - - //record each sent ACK and the sent time - private final AckHistoryWindow ackHistoryWindow; - - //Packet history window that stores the time interval between the current and the last seq. - private final PacketHistoryWindow packetHistoryWindow; - - //for storing the arrival time of the last received data packet - private volatile long lastDataPacketArrivalTime=0; - - //largest received data packet sequence number(LRSN) - private volatile long largestReceivedSeqNumber=0; - - //ACK event related - - //last Ack number - private long lastAckNumber=0; - - //largest Ack number ever acknowledged by ACK2 - private volatile long largestAcknowledgedAckNumber=-1; - - //EXP event related - - //a variable to record number of continuous EXP time-out events - private volatile long expCount=0; - - /*records the time interval between each probing pair - compute the median packet pair interval of the last - 16 packet pair intervals (PI) and the estimate link capacity.(packet/s)*/ - private final PacketPairWindow packetPairWindow; - - //estimated link capacity - long estimateLinkCapacity; - // the packet arrival rate - long packetArrivalSpeed; - - //round trip time, calculated from ACK/ACK2 pairs - long roundTripTime=0; - //round trip time variance - long roundTripTimeVar=roundTripTime/2; - - //to check the ACK, NAK, or EXP timer - private long nextACK; - //microseconds to next ACK event - private long ackTimerInterval=Util.getSYNTime(); - - private long nextNAK; - //microseconds to next NAK event - private long nakTimerInterval=Util.getSYNTime(); - - private long nextEXP; - //microseconds to next EXP event - private long expTimerInterval=100*Util.getSYNTime(); - - //instant when the session was created (for expiry checking) - private final long sessionUpSince; - //milliseconds to timeout a new session that stays idle - private final long IDLE_TIMEOUT = 3*60*1000; - - //buffer size for storing data - private final long bufferSize; - - //stores received packets to be sent - private final BlockingQueuehandoffQueue; - - private Thread receiverThread; - - private volatile boolean stopped=false; - - //(optional) ack interval (see CongestionControl interface) - private volatile long ackInterval=-1; - - /** - * if set to true connections will not expire, but will only be - * closed by a Shutdown message - */ - public static boolean connectionExpiryDisabled=false; - - private final boolean storeStatistics; - - - - /** - * create a receiver with a valid {@link UDTSession} - * @param session - */ - public UDTReceiver(UDTSession session,UDPEndPoint endpoint){ - this.endpoint = endpoint; - this.session=session; - this.sessionUpSince=System.currentTimeMillis(); - this.statistics=session.getStatistics(); - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - ackHistoryWindow = new AckHistoryWindow(16); - packetHistoryWindow = new PacketHistoryWindow(16); - receiverLossList = new ReceiverLossList(); - packetPairWindow = new PacketPairWindow(16); - largestReceivedSeqNumber=session.getInitialSequenceNumber()-1; - bufferSize=session.getReceiveBufferSize(); - handoffQueue=new ArrayBlockingQueue(4*session.getFlowWindowSize()); - storeStatistics=Boolean.getBoolean("udt.receiver.storeStatistics"); - initMetrics(); - start(); - } - - private MeanValue dgReceiveInterval; - private MeanValue dataPacketInterval; - private MeanValue processTime; - private MeanValue dataProcessTime; - private void initMetrics(){ - if(!storeStatistics)return; - dgReceiveInterval=new MeanValue("UDT receive interval"); - statistics.addMetric(dgReceiveInterval); - dataPacketInterval=new MeanValue("Data packet interval"); - statistics.addMetric(dataPacketInterval); - processTime=new MeanValue("UDT packet process time"); - statistics.addMetric(processTime); - dataProcessTime=new MeanValue("Data packet process time"); - statistics.addMetric(dataProcessTime); - } - - - //starts the sender algorithm - private void start(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - nextACK=Util.getCurrentTime()+ackTimerInterval; - nextNAK=(long)(Util.getCurrentTime()+1.5*nakTimerInterval); - nextEXP=Util.getCurrentTime()+2*expTimerInterval; - ackInterval=session.getCongestionControl().getAckInterval(); - while(!stopped){ - receiverAlgorithm(); - } - } - catch(Exception ex){ - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING RECEIVER for "+session); - } - }; - receiverThread=UDTThreadFactory.get().newThread(r); - receiverThread.start(); - } - - /* - * packets are written by the endpoint - */ - protected void receive(UDTPacket p)throws IOException{ - if(storeStatistics)dgReceiveInterval.end(); - handoffQueue.offer(p); - if(storeStatistics)dgReceiveInterval.begin(); - } - - /** - * receiver algorithm - * see specification P11. - */ - public void receiverAlgorithm()throws InterruptedException,IOException{ - //check ACK timer - long currentTime=Util.getCurrentTime(); - if(nextACKseqNumbers=receiverLossList.getFilteredSequenceNumbers(roundTripTime,true); - sendNAK(seqNumbers); - } - - /** - * process EXP event (see spec. p 13) - */ - protected void processEXPEvent()throws IOException{ - if(session.getSocket()==null)return; - UDTSender sender=session.getSocket().getSender(); - //put all the unacknowledged packets in the senders loss list - sender.putUnacknowledgedPacketsIntoLossList(); - if(expCount>16 && System.currentTimeMillis()-sessionUpSince > IDLE_TIMEOUT){ - if(!connectionExpiryDisabled &&!stopped){ - sendShutdown(); - stop(); - logger.info("Session "+session+" expired."); - return; - } - } - if(!sender.haveLostPackets()){ - sendKeepAlive(); - } - expCount++; - } - - protected void processUDTPacket(UDTPacket p)throws IOException{ - //(3).Check the packet type and process it according to this. - - if(!p.isControlPacket()){ - DataPacket dp=(DataPacket)p; - if(storeStatistics){ - dataPacketInterval.end(); - dataProcessTime.begin(); - } - onDataPacketReceived(dp); - if(storeStatistics){ - dataProcessTime.end(); - dataPacketInterval.begin(); - } - logger.info("DataPacket udt:"+p.getPacketSequenceNumber()); - } - - else if (p.getControlPacketType()==ControlPacketType.ACK2.ordinal()){ - Acknowledgment2 ack2=(Acknowledgment2)p; - onAck2PacketReceived(ack2); - } - - else if (p instanceof Shutdown){ - onShutdown(); - } - - } - - //every nth packet will be discarded... for testing only of course - public static int dropRate=0; - - //number of received data packets - private int n=0; - - protected void onDataPacketReceived(DataPacket dp)throws IOException{ - long currentSequenceNumber = dp.getPacketSequenceNumber(); - - //for TESTING : check whether to drop this packet -// n++; -// //if(dropRate>0 && n % dropRate == 0){ -// if(n % 1111 == 0){ -// logger.info("**** TESTING:::: DROPPING PACKET "+currentSequenceNumber+" FOR TESTING"); -// return; -// } -// //} - boolean OK=session.getSocket().getInputStream().haveNewData(currentSequenceNumber,dp.getData()); - if(!OK){ - //need to drop packet... - return; - } - - long currentDataPacketArrivalTime = Util.getCurrentTime(); - - /*(4).if the seqNo of the current data packet is 16n+1,record the - time interval between this packet and the last data packet - in the packet pair window*/ - if((currentSequenceNumber%16)==1 && lastDataPacketArrivalTime>0){ - long interval=currentDataPacketArrivalTime -lastDataPacketArrivalTime; - packetPairWindow.add(interval); - } - - //(5).record the packet arrival time in the PKT History Window. - packetHistoryWindow.add(currentDataPacketArrivalTime); - - - //store current time - lastDataPacketArrivalTime=currentDataPacketArrivalTime; - - - //(6).number of detected lossed packet - /*(6.a).if the number of the current data packet is greater than LSRN+1, - put all the sequence numbers between (but excluding) these two values - into the receiver's loss list and send them to the sender in an NAK packet*/ - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber+1)>0){ - sendNAK(currentSequenceNumber); - logger.info("sendNAK:"+currentSequenceNumber); - } - else if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)<0){ - /*(6.b).if the sequence number is less than LRSN,remove it from - * the receiver's loss list - */ - receiverLossList.remove(currentSequenceNumber); - logger.info("receiverLossList remove:"+currentSequenceNumber); - } - - statistics.incNumberOfReceivedDataPackets(); - - //(7).Update the LRSN - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)>0){ - largestReceivedSeqNumber=currentSequenceNumber; - } - - //(8) need to send an ACK? Some cc algorithms use this - if(ackInterval>0){ - if(n % ackInterval == 0)processACKEvent(false); - } - } - - /** - * write a NAK triggered by a received sequence number that is larger than - * the largestReceivedSeqNumber + 1 - * @param currentSequenceNumber - the currently received sequence number - * @throws IOException - */ - protected void sendNAK(long currentSequenceNumber)throws IOException{ - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(largestReceivedSeqNumber+1, currentSequenceNumber); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - //put all the sequence numbers between (but excluding) these two values into the - //receiver loss list - for(long i=largestReceivedSeqNumber+1;isequenceNumbers)throws IOException{ - if(sequenceNumbers.size()==0)return; - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(sequenceNumbers); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(nAckPacket); - statistics.incNumberOfNAKSent(); - } - - protected long sendLightAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt=buildLightAcknowledgement(ackNumber); - endpoint.doSend(acknowledgmentPkt); - statistics.incNumberOfACKSent(); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - protected long sendAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); - //set the estimate link capacity - estimateLinkCapacity=packetPairWindow.getEstimatedLinkCapacity(); - acknowledgmentPkt.setEstimatedLinkCapacity(estimateLinkCapacity); - //set the packet arrival rate - packetArrivalSpeed=packetHistoryWindow.getPacketArrivalSpeed(); - acknowledgmentPkt.setPacketReceiveRate(packetArrivalSpeed); - - endpoint.doSend(acknowledgmentPkt); - - statistics.incNumberOfACKSent(); - statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - //builds a "light" Acknowledgement - private Acknowledgement buildLightAcknowledgement(long ackNumber){ - Acknowledgement acknowledgmentPkt = new Acknowledgement(); - //the packet sequence number to which all the packets have been received - acknowledgmentPkt.setAckNumber(ackNumber); - //assign this ack a unique increasing ACK sequence number - acknowledgmentPkt.setAckSequenceNumber(++ackSequenceNumber); - acknowledgmentPkt.setRoundTripTime(roundTripTime); - acknowledgmentPkt.setRoundTripTimeVar(roundTripTimeVar); - //set the buffer size - acknowledgmentPkt.setBufferSize(bufferSize); - - acknowledgmentPkt.setDestinationID(session.getDestination().getSocketID()); - acknowledgmentPkt.setSession(session); - - return acknowledgmentPkt; - } - - /** - * spec p. 13:
- 1) Locate the related ACK in the ACK History Window according to the - ACK sequence number in this ACK2.
- 2) Update the largest ACK number ever been acknowledged.
- 3) Calculate new rtt according to the ACK2 arrival time and the ACK - departure time, and update the RTT value as: RTT = (RTT * 7 + - rtt) / 8.
- 4) Update RTTVar by: RTTVar = (RTTVar * 3 + abs(RTT - rtt)) / 4.
- 5) Update both ACK and NAK period to 4 * RTT + RTTVar + SYN.
- */ - protected void onAck2PacketReceived(Acknowledgment2 ack2){ - AckHistoryEntry entry=ackHistoryWindow.getEntry(ack2.getAckSequenceNumber()); - if(entry!=null){ - long ackNumber=entry.getAckNumber(); - largestAcknowledgedAckNumber=Math.max(ackNumber, largestAcknowledgedAckNumber); - - long rtt=entry.getAge(); - if(roundTripTime>0)roundTripTime = (roundTripTime*7 + rtt)/8; - else roundTripTime = rtt; - roundTripTimeVar = (roundTripTimeVar* 3 + Math.abs(roundTripTimeVar- rtt)) / 4; - ackTimerInterval=4*roundTripTime+roundTripTimeVar+Util.getSYNTime(); - nakTimerInterval=ackTimerInterval; - statistics.setRTT(roundTripTime, roundTripTimeVar); - } - } - - protected void sendKeepAlive()throws IOException{ - KeepAlive ka=new KeepAlive(); - ka.setDestinationID(session.getDestination().getSocketID()); - ka.setSession(session); - endpoint.doSend(ka); - } - - protected void sendShutdown()throws IOException{ - Shutdown s=new Shutdown(); - s.setDestinationID(session.getDestination().getSocketID()); - s.setSession(session); - endpoint.doSend(s); - } - - private volatile long ackSequenceNumber=0; - - protected void resetEXPTimer(){ - nextEXP=Util.getCurrentTime()+expTimerInterval; - expCount=0; - } - - protected void resetEXPCount(){ - expCount=0; - } - - public void setAckInterval(long ackInterval){ - this.ackInterval=ackInterval; - } - - protected void onShutdown()throws IOException{ - stop(); - } - - public void stop()throws IOException{ - stopped=true; - session.getSocket().close(); - //stop our sender as well - session.getSocket().getSender().stop(); - } - - @Override - public String toString(){ - StringBuilder sb=new StringBuilder(); - sb.append("UDTReceiver ").append(session).append("\n"); - sb.append("LossList: "+receiverLossList); - return sb.toString(); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b3/80ea2f8de7ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/b3/80ea2f8de7ac001716b9ca6d5abb90bc deleted file mode 100644 index 5fa122b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b3/80ea2f8de7ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.IOException; -import java.util.logging.Logger; - - - - -/** - * @author jinyu - * - */ -public class TestRecFiles { - private static Logger log=Logger.getLogger(TestRecFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //192.168.30.128 - RecviceFiles rec=new RecviceFiles(); - String dir="F://dbfile"; - rec.setDir(dir); - rec.start("127.0.0.1", 5555); - log.info("ļ"); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b3/90c2fce664a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/b3/90c2fce664a800171a8482560d609ceb deleted file mode 100644 index 93da029..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b3/90c2fce664a800171a8482560d609ceb +++ /dev/null @@ -1,50 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - - -} - -public static synchronized SocketControls getInstance() { - - if (instance == null) { - - instance = new SocketControls(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b4/30eed20e64a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/b4/30eed20e64a800171a8482560d609ceb deleted file mode 100644 index f43cc67..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b4/30eed20e64a800171a8482560d609ceb +++ /dev/null @@ -1,27 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; -import java.util.concurrent.ConcurrentHashMap; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private ConcurrentHashMap hash=new ConcurrentHashMap(); -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b4/d047883de1ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/b4/d047883de1ac001716b9ca6d5abb90bc deleted file mode 100644 index 570f876..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b4/d047883de1ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,188 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - long speed=0; - try - { - speed=sumBytes/((System.currentTimeMillis()-lastTime)/1000); - } - catch(Exception ex) - { - - } - lastTime=System.currentTimeMillis(); - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b4/e0ac193f65a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/b4/e0ac193f65a800171a8482560d609ceb deleted file mode 100644 index 347b1f5..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b4/e0ac193f65a800171a8482560d609ceb +++ /dev/null @@ -1,64 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - - for(Map entryr:hash.keySet()) - { - - } - } - - }); - processSocket.setDaemon(true); - processSocket.setName("processSocket"); - processSocket.start(); - -} - -public static synchronized SocketControls getInstance() { - - if (instance == null) { - - instance = new SocketControls(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b5/40399e4003ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/b5/40399e4003ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 40f1f58..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b5/40399e4003ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,21 +0,0 @@ -/** - * - */ -package judp; - - -import java.lang.ref.WeakReference; - -/** - * @author jinyu - * @param - * - */ -public class SocketReference extends WeakReference { - - public SocketReference(T referent) { - super(referent); - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b5/90f32a02b3ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/b5/90f32a02b3ad0017181ed9113883eda9 deleted file mode 100644 index 71c0dcf..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b5/90f32a02b3ad0017181ed9113883eda9 +++ /dev/null @@ -1,502 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b5/c0de2650ccac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/b5/c0de2650ccac001716b9ca6d5abb90bc deleted file mode 100644 index 14a4e85..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b5/c0de2650ccac001716b9ca6d5abb90bc +++ /dev/null @@ -1,199 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isReadMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - buffer[insert]=data; - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else return null; - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - public void resetBufMaster(boolean isRead) - { - this.isReadMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b6/80a6bd9bb6ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/b6/80a6bd9bb6ad0017181ed9113883eda9 deleted file mode 100644 index 430de6b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b6/80a6bd9bb6ad0017181ed9113883eda9 +++ /dev/null @@ -1,524 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;s0) - { - - if(lastAckSequenceNumber/10000!=ackNumber/10000) - { - client.connectNum--; - // - //ackNumber رȫɾرСһɾ - if(lastAckSequenceNumberthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - // - } - } - } - } - - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b6/c08c15e6cbac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/b6/c08c15e6cbac001716b9ca6d5abb90bc deleted file mode 100644 index 5874ac9..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b6/c08c15e6cbac001716b9ca6d5abb90bc +++ /dev/null @@ -1,193 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - buffer[insert]=data; - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else return null; - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - /** - * ظ - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b7/30d491dd37ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/b7/30d491dd37ac001710ff8a7c6bda0fb8 deleted file mode 100644 index ea5c983..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b7/30d491dd37ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,100 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=20; - - /** - * ָ - * @param data - * @return - */ - public static byte[][] splitData(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize>0?1:0; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i0?1:0); - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(len); - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - //client.decreNum(); - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - //ByteBuffer buffer=ByteBuffer.wrap(buf); - - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - } - - } - client.close(); - dis.close(); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b7/8099f407b8ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/b7/8099f407b8ac001716b9ca6d5abb90bc deleted file mode 100644 index 5c588a6..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b7/8099f407b8ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,600 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.ControlPacket; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.packets.Shutdown; -import udt.packets.ControlPacket.ControlPacketType; -import udt.receiver.AckHistoryEntry; -import udt.receiver.AckHistoryWindow; -import udt.receiver.PacketHistoryWindow; -import udt.receiver.PacketPairWindow; -import udt.receiver.ReceiverLossList; -import udt.receiver.ReceiverLossListEntry; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - -/** - * receiver part of a UDT entity - * @see UDTSender - */ -public class UDTReceiver { - - private static final Logger logger=Logger.getLogger(UDTReceiver.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //record seqNo of detected lostdata and latest feedback time - private final ReceiverLossList receiverLossList; - - //record each sent ACK and the sent time - private final AckHistoryWindow ackHistoryWindow; - - //Packet history window that stores the time interval between the current and the last seq. - private final PacketHistoryWindow packetHistoryWindow; - - //for storing the arrival time of the last received data packet - private volatile long lastDataPacketArrivalTime=0; - - //largest received data packet sequence number(LRSN) - private volatile long largestReceivedSeqNumber=0; - - //ACK event related - - //last Ack number - private long lastAckNumber=0; - - //largest Ack number ever acknowledged by ACK2 - private volatile long largestAcknowledgedAckNumber=-1; - - //EXP event related - - //a variable to record number of continuous EXP time-out events - private volatile long expCount=0; - - /*records the time interval between each probing pair - compute the median packet pair interval of the last - 16 packet pair intervals (PI) and the estimate link capacity.(packet/s)*/ - private final PacketPairWindow packetPairWindow; - - //estimated link capacity - long estimateLinkCapacity; - // the packet arrival rate - long packetArrivalSpeed; - - //round trip time, calculated from ACK/ACK2 pairs - long roundTripTime=0; - //round trip time variance - long roundTripTimeVar=roundTripTime/2; - - //to check the ACK, NAK, or EXP timer - private long nextACK; - //microseconds to next ACK event - private long ackTimerInterval=Util.getSYNTime(); - - private long nextNAK; - //microseconds to next NAK event - private long nakTimerInterval=Util.getSYNTime(); - - private long nextEXP; - //microseconds to next EXP event - private long expTimerInterval=100*Util.getSYNTime(); - - //instant when the session was created (for expiry checking) - private final long sessionUpSince; - //milliseconds to timeout a new session that stays idle - private final long IDLE_TIMEOUT = 3*60*1000; - - //buffer size for storing data - private final long bufferSize; - - //stores received packets to be sent - private final BlockingQueuehandoffQueue; - - private Thread receiverThread; - - private volatile boolean stopped=false; - - //(optional) ack interval (see CongestionControl interface) - private volatile long ackInterval=-1; - - /** - * if set to true connections will not expire, but will only be - * closed by a Shutdown message - */ - public static boolean connectionExpiryDisabled=false; - - private final boolean storeStatistics; - - - - /** - * create a receiver with a valid {@link UDTSession} - * @param session - */ - public UDTReceiver(UDTSession session,UDPEndPoint endpoint){ - this.endpoint = endpoint; - this.session=session; - this.sessionUpSince=System.currentTimeMillis(); - this.statistics=session.getStatistics(); - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - ackHistoryWindow = new AckHistoryWindow(16); - packetHistoryWindow = new PacketHistoryWindow(16); - receiverLossList = new ReceiverLossList(); - packetPairWindow = new PacketPairWindow(16); - largestReceivedSeqNumber=session.getInitialSequenceNumber()-1; - bufferSize=session.getReceiveBufferSize(); - handoffQueue=new ArrayBlockingQueue(4*session.getFlowWindowSize()); - storeStatistics=Boolean.getBoolean("udt.receiver.storeStatistics"); - initMetrics(); - start(); - } - - private MeanValue dgReceiveInterval; - private MeanValue dataPacketInterval; - private MeanValue processTime; - private MeanValue dataProcessTime; - private void initMetrics(){ - if(!storeStatistics)return; - dgReceiveInterval=new MeanValue("UDT receive interval"); - statistics.addMetric(dgReceiveInterval); - dataPacketInterval=new MeanValue("Data packet interval"); - statistics.addMetric(dataPacketInterval); - processTime=new MeanValue("UDT packet process time"); - statistics.addMetric(processTime); - dataProcessTime=new MeanValue("Data packet process time"); - statistics.addMetric(dataProcessTime); - } - - - //starts the sender algorithm - private void start(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - nextACK=Util.getCurrentTime()+ackTimerInterval; - nextNAK=(long)(Util.getCurrentTime()+1.5*nakTimerInterval); - nextEXP=Util.getCurrentTime()+2*expTimerInterval; - ackInterval=session.getCongestionControl().getAckInterval(); - while(!stopped){ - receiverAlgorithm(); - } - } - catch(Exception ex){ - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING RECEIVER for "+session); - } - }; - receiverThread=UDTThreadFactory.get().newThread(r); - receiverThread.start(); - } - - /* - * packets are written by the endpoint - */ - protected void receive(UDTPacket p)throws IOException{ - if(storeStatistics)dgReceiveInterval.end(); - handoffQueue.offer(p); - if(storeStatistics)dgReceiveInterval.begin(); - } - - /** - * receiver algorithm - * see specification P11. - */ - public void receiverAlgorithm()throws InterruptedException,IOException{ - //check ACK timer - long currentTime=Util.getCurrentTime(); - if(nextACKseqNumbers=receiverLossList.getFilteredSequenceNumbers(roundTripTime,true); - sendNAK(seqNumbers); - } - - /** - * process EXP event (see spec. p 13) - */ - protected void processEXPEvent()throws IOException{ - if(session.getSocket()==null)return; - UDTSender sender=session.getSocket().getSender(); - //put all the unacknowledged packets in the senders loss list - sender.putUnacknowledgedPacketsIntoLossList(); - if(expCount>16 && System.currentTimeMillis()-sessionUpSince > IDLE_TIMEOUT){ - if(!connectionExpiryDisabled &&!stopped){ - sendShutdown(); - stop(); - logger.info("Session "+session+" expired."); - return; - } - } - if(!sender.haveLostPackets()){ - sendKeepAlive(); - } - expCount++; - } - - protected void processUDTPacket(UDTPacket p)throws IOException{ - //(3).Check the packet type and process it according to this. - - if(!p.isControlPacket()){ - DataPacket dp=(DataPacket)p; - if(storeStatistics){ - dataPacketInterval.end(); - dataProcessTime.begin(); - } - onDataPacketReceived(dp); - if(storeStatistics){ - dataProcessTime.end(); - dataPacketInterval.begin(); - } - logger.info("DataPacket:"+p.getPacketSequenceNumber()); - } - - else if (p.getControlPacketType()==ControlPacketType.ACK2.ordinal()){ - Acknowledgment2 ack2=(Acknowledgment2)p; - onAck2PacketReceived(ack2); - } - - else if (p instanceof Shutdown){ - onShutdown(); - } - - } - - //every nth packet will be discarded... for testing only of course - public static int dropRate=0; - - //number of received data packets - private int n=0; - - protected void onDataPacketReceived(DataPacket dp)throws IOException{ - long currentSequenceNumber = dp.getPacketSequenceNumber(); - - //for TESTING : check whether to drop this packet -// n++; -// //if(dropRate>0 && n % dropRate == 0){ -// if(n % 1111 == 0){ -// logger.info("**** TESTING:::: DROPPING PACKET "+currentSequenceNumber+" FOR TESTING"); -// return; -// } -// //} - boolean OK=session.getSocket().getInputStream().haveNewData(currentSequenceNumber,dp.getData()); - if(!OK){ - //need to drop packet... - return; - } - - long currentDataPacketArrivalTime = Util.getCurrentTime(); - - /*(4).if the seqNo of the current data packet is 16n+1,record the - time interval between this packet and the last data packet - in the packet pair window*/ - if((currentSequenceNumber%16)==1 && lastDataPacketArrivalTime>0){ - long interval=currentDataPacketArrivalTime -lastDataPacketArrivalTime; - packetPairWindow.add(interval); - } - - //(5).record the packet arrival time in the PKT History Window. - packetHistoryWindow.add(currentDataPacketArrivalTime); - - - //store current time - lastDataPacketArrivalTime=currentDataPacketArrivalTime; - - - //(6).number of detected lossed packet - /*(6.a).if the number of the current data packet is greater than LSRN+1, - put all the sequence numbers between (but excluding) these two values - into the receiver's loss list and send them to the sender in an NAK packet*/ - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber+1)>0){ - sendNAK(currentSequenceNumber); - } - else if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)<0){ - /*(6.b).if the sequence number is less than LRSN,remove it from - * the receiver's loss list - */ - receiverLossList.remove(currentSequenceNumber); - } - - statistics.incNumberOfReceivedDataPackets(); - - //(7).Update the LRSN - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)>0){ - largestReceivedSeqNumber=currentSequenceNumber; - } - - //(8) need to send an ACK? Some cc algorithms use this - if(ackInterval>0){ - if(n % ackInterval == 0)processACKEvent(false); - } - } - - /** - * write a NAK triggered by a received sequence number that is larger than - * the largestReceivedSeqNumber + 1 - * @param currentSequenceNumber - the currently received sequence number - * @throws IOException - */ - protected void sendNAK(long currentSequenceNumber)throws IOException{ - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(largestReceivedSeqNumber+1, currentSequenceNumber); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - //put all the sequence numbers between (but excluding) these two values into the - //receiver loss list - for(long i=largestReceivedSeqNumber+1;isequenceNumbers)throws IOException{ - if(sequenceNumbers.size()==0)return; - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(sequenceNumbers); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(nAckPacket); - statistics.incNumberOfNAKSent(); - } - - protected long sendLightAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt=buildLightAcknowledgement(ackNumber); - endpoint.doSend(acknowledgmentPkt); - statistics.incNumberOfACKSent(); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - protected long sendAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); - //set the estimate link capacity - estimateLinkCapacity=packetPairWindow.getEstimatedLinkCapacity(); - acknowledgmentPkt.setEstimatedLinkCapacity(estimateLinkCapacity); - //set the packet arrival rate - packetArrivalSpeed=packetHistoryWindow.getPacketArrivalSpeed(); - acknowledgmentPkt.setPacketReceiveRate(packetArrivalSpeed); - - endpoint.doSend(acknowledgmentPkt); - - statistics.incNumberOfACKSent(); - statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - //builds a "light" Acknowledgement - private Acknowledgement buildLightAcknowledgement(long ackNumber){ - Acknowledgement acknowledgmentPkt = new Acknowledgement(); - //the packet sequence number to which all the packets have been received - acknowledgmentPkt.setAckNumber(ackNumber); - //assign this ack a unique increasing ACK sequence number - acknowledgmentPkt.setAckSequenceNumber(++ackSequenceNumber); - acknowledgmentPkt.setRoundTripTime(roundTripTime); - acknowledgmentPkt.setRoundTripTimeVar(roundTripTimeVar); - //set the buffer size - acknowledgmentPkt.setBufferSize(bufferSize); - - acknowledgmentPkt.setDestinationID(session.getDestination().getSocketID()); - acknowledgmentPkt.setSession(session); - - return acknowledgmentPkt; - } - - /** - * spec p. 13:
- 1) Locate the related ACK in the ACK History Window according to the - ACK sequence number in this ACK2.
- 2) Update the largest ACK number ever been acknowledged.
- 3) Calculate new rtt according to the ACK2 arrival time and the ACK - departure time, and update the RTT value as: RTT = (RTT * 7 + - rtt) / 8.
- 4) Update RTTVar by: RTTVar = (RTTVar * 3 + abs(RTT - rtt)) / 4.
- 5) Update both ACK and NAK period to 4 * RTT + RTTVar + SYN.
- */ - protected void onAck2PacketReceived(Acknowledgment2 ack2){ - AckHistoryEntry entry=ackHistoryWindow.getEntry(ack2.getAckSequenceNumber()); - if(entry!=null){ - long ackNumber=entry.getAckNumber(); - largestAcknowledgedAckNumber=Math.max(ackNumber, largestAcknowledgedAckNumber); - - long rtt=entry.getAge(); - if(roundTripTime>0)roundTripTime = (roundTripTime*7 + rtt)/8; - else roundTripTime = rtt; - roundTripTimeVar = (roundTripTimeVar* 3 + Math.abs(roundTripTimeVar- rtt)) / 4; - ackTimerInterval=4*roundTripTime+roundTripTimeVar+Util.getSYNTime(); - nakTimerInterval=ackTimerInterval; - statistics.setRTT(roundTripTime, roundTripTimeVar); - } - } - - protected void sendKeepAlive()throws IOException{ - KeepAlive ka=new KeepAlive(); - ka.setDestinationID(session.getDestination().getSocketID()); - ka.setSession(session); - endpoint.doSend(ka); - } - - protected void sendShutdown()throws IOException{ - Shutdown s=new Shutdown(); - s.setDestinationID(session.getDestination().getSocketID()); - s.setSession(session); - endpoint.doSend(s); - } - - private volatile long ackSequenceNumber=0; - - protected void resetEXPTimer(){ - nextEXP=Util.getCurrentTime()+expTimerInterval; - expCount=0; - } - - protected void resetEXPCount(){ - expCount=0; - } - - public void setAckInterval(long ackInterval){ - this.ackInterval=ackInterval; - } - - protected void onShutdown()throws IOException{ - stop(); - } - - public void stop()throws IOException{ - stopped=true; - session.getSocket().close(); - //stop our sender as well - session.getSocket().getSender().stop(); - } - - @Override - public String toString(){ - StringBuilder sb=new StringBuilder(); - sb.append("UDTReceiver ").append(session).append("\n"); - sb.append("LossList: "+receiverLossList); - return sb.toString(); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b7/902ed8cecbad00171b48cedc605eece5 b/.metadata/.plugins/org.eclipse.core.resources/.history/b7/902ed8cecbad00171b48cedc605eece5 deleted file mode 100644 index 2f8c41a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b7/902ed8cecbad00171b48cedc605eece5 +++ /dev/null @@ -1,52 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.File; -import java.util.logging.Logger; - -import net.File.FileMonitor; -import net.File.FilesWatch; - - - - -/** - * @author jinyu - * - */ -public class TestSendFiles { - private static Logger log=Logger.getLogger(TestSendFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //SendFiles send=new SendFiles("192.168.9.152", 5555); - //192.168.30.128 - - ReadXml rd=new ReadXml(); - String xml= rd.readXml(ReadXml.getPath()+"/Config.xml"); - String[] config=null; - if(xml!=null) - { - config=xml.split(","); - } - SendFiles send=new SendFiles(config[0], Integer.valueOf(config[1])); - FilesWatch watch=new FilesWatch(); - String dir=config[2]; - watch.setWatch(dir); - watch.start(); - while(true) - { - FileMonitor ff= watch.take(); - log.info(ff.file); - if(ff.file.endsWith(".tmp")) - { - continue; - } - send.sendFile(dir+"/"+ff.file); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b7/c0821a2b23ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/b7/c0821a2b23ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 2888d26..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b7/c0821a2b23ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,234 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - - byte[][]sendData= PackagetSub.split(data); - try { - for(int i=0;isendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - // cd - private volatile int bufferNum=0; - private volatile boolean isModify=true; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - // - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b8/504716dd52ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/b8/504716dd52ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 99e19ad..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b8/504716dd52ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,150 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.UnsupportedEncodingException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=20*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i20) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,infobytes.length,PackagetCharSet.CharSet); - if(!serverinfp.equals("initServer:"+f.getName())) - { - client.close(); - return; - } - //client.decreNum(); - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - //ByteBuffer buffer=ByteBuffer.wrap(buf); - - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count+name.length+4]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - } - - } - client.close(); - dis.close(); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b8/601c95a8d7ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/b8/601c95a8d7ac001716b9ca6d5abb90bc deleted file mode 100644 index e30080a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b8/601c95a8d7ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,142 +0,0 @@ -/** - * - */ -package judp; - -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -//private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} - -/** - * - * @param port ˿ - */ -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - * @param localIP IP - * @param port ˿ - */ -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} -/** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * islagerRead=true - * @param isRead - */ -public void resetBufMaster(boolean isRead) -{ - receiveBuffer.resetBufMaster(isRead); - -} - -/** - * ôݶȡ - * Ĭ false - * @param islarge - */ -public void setLargeRead(boolean islarge) -{ - receiveBuffer.setLargeRead(islarge); -} -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=SocketControls.getInstance().getSocket(); - } - judpSocket jsocket=new judpSocket(socket); - judpSocketManager.getInstance(socket.getEndpoint()).addSocket(jsocket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b8/f048c24722ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/b8/f048c24722ac001710ff8a7c6bda0fb8 deleted file mode 100644 index eb162f9..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b8/f048c24722ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,208 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public void pauseOutput() - { - try { - client.getOutputStream().pauseOutput(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - public byte[] read() - { - byte[] result=null; - if(client!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; - } - public int read(byte[]data) - { - try { - return client.read(data); - } catch (IOException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - return -1; - } - public void close() - { - if(client!=null) - { - if(sumLen==0) - { - //ûз - //ر - try { - if(!client.isClose()) - client.shutdown(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - else - { - //ʼ - //SocketManager.getInstance().add(client); - if(!client.isClose()) - client.close(); - } - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b9/10c10c5969a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/b9/10c10c5969a800171a8482560d609ceb deleted file mode 100644 index 38a5570..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b9/10c10c5969a800171a8482560d609ceb +++ /dev/null @@ -1,112 +0,0 @@ -/** - * - */ -package judp; - -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.SynchronousQueue; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean Start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - //judpSocket jsocket=new judpSocket(csocket); - sessionHandoff.put(jsocket); - SocketManager.getInstance().addGC(jsocket,csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ -try { - judpSocket jsocket= sessionHandoff.take(); - return jsocket; -} catch (InterruptedException e) { - logger.info("judpSocketжϣ"+e.getMessage()); - e.printStackTrace(); -} -return null; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b9/50671825d4ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/b9/50671825d4ac001716b9ca6d5abb90bc deleted file mode 100644 index 6a39656..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b9/50671825d4ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,246 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ cd - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b9/60d8a6a904ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/b9/60d8a6a904ac001710ff8a7c6bda0fb8 deleted file mode 100644 index ac22c2c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b9/60d8a6a904ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,91 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private LinkedBlockingQueue> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - private void startThread() { - - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b9/705e0ff7e4ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/b9/705e0ff7e4ac001716b9ca6d5abb90bc deleted file mode 100644 index 56c1ad0..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b9/705e0ff7e4ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,234 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData(byte[] data) - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - byte[]tmp=recQueue.poll(); - if(tmp==null) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - continue; - } - if(writeFile(tmp)) - { - isStop=true; - break; - } - } - - } - - }); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b9/70ab9f9451ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/b9/70ab9f9451ac001710ff8a7c6bda0fb8 deleted file mode 100644 index dd870d7..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b9/70ab9f9451ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,150 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.UnsupportedEncodingException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=20*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i20) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else - { - break; - } - } - String serverinfp=new String(infobytes,0,infobytes.length,PackagetCharSet.CharSet); - if(!serverinfp.equals("initServer:"+f.getName())) - { - client.close(); - return; - } - //client.decreNum(); - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - //ByteBuffer buffer=ByteBuffer.wrap(buf); - - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count+name.length+4]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - } - - } - client.close(); - dis.close(); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b9/80aea1e1e4ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/b9/80aea1e1e4ac001716b9ca6d5abb90bc deleted file mode 100644 index 7ba4b79..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b9/80aea1e1e4ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,236 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData(byte[] data) - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - byte[]tmp=recQueue.poll(); - if(tmp==null) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - continue; - } - if(writeFile(tmp)) - { - isStop=true; - ss.close(); - break; - } - } - - } - - }); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b9/90260fc76da800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/b9/90260fc76da800171a8482560d609ceb deleted file mode 100644 index 41b9514..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b9/90260fc76da800171a8482560d609ceb +++ /dev/null @@ -1,42 +0,0 @@ -/** - * ļTestRecFile.java - * - * 汾Ϣ - * ڣ2017827 - * Copyright Corporation 2017 - * Ȩ - * - */ -package Test; - -import java.io.IOException; - -import judp.judpRecviceFile; - -/** - * - * Ŀƣjudp - * ƣTestRecFile - * - * ˣjinyu - * ʱ䣺2017827 6:32:42 - * ޸ˣjinyu - * ޸ʱ䣺2017827 6:32:42 - * ޸ıע - * @version - * - */ -public class TestRecFile { - - public static void main(String[] args) { - judpRecviceFile rec=new judpRecviceFile("127.0.0.1", 5555, "E:\\Study\\java\\filesudt\\send\\12.rmvb", "E:\\Study\\java\\filesudt\\rec\\1.rmvb"); - rec.start(); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ba/509862f704ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/ba/509862f704ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 785f0a1..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ba/509862f704ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,33 +0,0 @@ -/** - * - */ -package judp; - - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; - -/** - * @author jinyu - * @param - * - */ -public class SocketReference extends WeakReference { - private long socketid=-1; - public SocketReference(T referent) { - super(referent); - - } - public SocketReference(T referent,long id) { - super(referent); - this.socketid=id; - } - public SocketReference(T referent, long socketID2, ReferenceQueue q) { - super(referent,q); - this.socketid=id; - } - public long getid() - { - return socketid; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ba/607e6669b5ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/ba/607e6669b5ad0017181ed9113883eda9 deleted file mode 100644 index be94d73..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ba/607e6669b5ad0017181ed9113883eda9 +++ /dev/null @@ -1,523 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;s0) - { - client.connectNum--; - if(lastAckSequenceNumber/10000!=ackNumber/10000) - { - // - //ackNumber رȫɾرСһɾ - if(lastAckSequenceNumberthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - // - } - } - } - } - - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ba/60fa14012cac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/ba/60fa14012cac001710ff8a7c6bda0fb8 deleted file mode 100644 index 6275295..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ba/60fa14012cac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,88 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] buffer=null; -public long id; -private volatile int sumNum=0; -private volatile int sumLen=0; -private byte[] result=null; -public DataStruct(int num) -{ - buffer=new byte[num][]; -} - -/** - * - * @return - */ -private boolean check() -{ - if(sumNum>=buffer.length) - { - //ɹ - if(sumLen==dataLen) - { - //ʼ - result=new byte[dataLen]; - ByteBuffer cur=ByteBuffer.wrap(result); - for(int i=0;i sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean Start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - //judpSocket jsocket=new judpSocket(csocket); - - //SocketManager.getInstance().addGC(jsocket,csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ -try { - UDTSocket socket=SocketControls.getInstance().getSocket(); - judpSocket jsocket=new judpSocket(socket); - //judpSocket jsocket= sessionHandoff.take(); - return jsocket; -} catch (InterruptedException e) { - logger.info("judpSocketжϣ"+e.getMessage()); - e.printStackTrace(); -} -return null; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ba/d0d925c01bac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/ba/d0d925c01bac001710ff8a7c6bda0fb8 deleted file mode 100644 index d1a03ce..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ba/d0d925c01bac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,27 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -/** - * @author jinyu - * - */ -public class PackagetCombin { - private static ConcurrentHashMap hash=new ConcurrentHashMap(); -public static void addData(byte[] data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int index=buf.getInt(); - int dataLen=buf.getInt(); - DataStruct struct=hash.get(id); - if(struct==null) - { - struct=new DataStruct(); - hash.put(id, struct); - } -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/bb/20b3f7a44fac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/bb/20b3f7a44fac001710ff8a7c6bda0fb8 deleted file mode 100644 index 8087586..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/bb/20b3f7a44fac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,243 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public int dataLen=0; - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData=null; - if(dataLen==0) - { - sendData=PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - sendData=sub.split(data, dataLen); - } - for(int i=0;isendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - // cd - private volatile int bufferNum=0; - private volatile boolean isModify=true; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - //cd - long ackNumber=acknowledgement.getAckNumber(); - // cd - if(this.session instanceof ClientSession) - { - //cd - if(this.isModify) - { - //Ѿ͹10000ΪշѾر - if(bufferNum<10000) - { - if(ackNumber/10000!=this.session.getInitialSequenceNumber()/10000) - { - //ΪͬεseqNo,ͨŵĽշsession - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - return; - } - } - else - { - this.isModify=false;// - } - } - } - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - - cc.onACK(ackNumber); - - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/bb/d05f6666dbac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/bb/d05f6666dbac001716b9ca6d5abb90bc deleted file mode 100644 index 1b5f8c8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/bb/d05f6666dbac001716b9ca6d5abb90bc +++ /dev/null @@ -1,368 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -//private int readLen=0; -public int dataLen=0; -public void setRecBufferSize(int size) -{ - bufSize=size; -} -public boolean getCloseState() -{ - //ײѾر - return isClose|socket.isClose(); -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(getCloseState()) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - while(true) - { - if(getCloseState()) - { - return null; - } - r=readData(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - // readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } - - return result; -} - - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(getCloseState()) - { - return false; - } - try { - - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(getCloseState()) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;i - * - */ -public class SocketReference extends WeakReference { - private long socketid=-1; - public SocketReference(T referent) { - super(referent); - - } - public SocketReference(T referent,long id) { - super(referent); - this.socketid=id; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/bd/0092f91127ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/bd/0092f91127ac001710ff8a7c6bda0fb8 deleted file mode 100644 index fd870c1..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/bd/0092f91127ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,327 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public boolean getCloseState() -{ - return isClose; -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(isClose) - { - return false; - } - byte[][]result=PackagetSub.split(data); - for(int i=0;i - * - */ -public class SocketReference extends WeakReference { - private long socketid=-1; - public SocketReference(T referent) { - super(referent); - - } - public SocketReference(T referent,long id) { - super(referent); - this.socketid=id; - } - public SocketReference(T referent, long socketID2, ReferenceQueue q) { - super(referent); - } - public long getid() - { - return socketid; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/bd/606102f529ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/bd/606102f529ac001710ff8a7c6bda0fb8 deleted file mode 100644 index c44e916..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/bd/606102f529ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,100 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=20; - - /** - * ָ - * @param data - * @return - */ - public static byte[][] splitData(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize>0?1:0; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i0){ - return single[0]; - } - else { - return b; - } - } - - private AppData currentChunk=null; - //offset into currentChunk - int offset=0; - long id=-1; - @Override - public int read(byte[]target)throws IOException{ - try{ - int read=0; - updateCurrentChunk(false); - while(currentChunk!=null){ - byte[]data=currentChunk.data; - int length=Math.min(target.length-read,data.length-offset); - System.arraycopy(data, offset, target, read, length); - read+=length; - offset+=length; - //check if chunk has been fully read - if(offset>=data.length){ - currentChunk=null; - offset=0; - } - - //if no more space left in target, exit now - if(read==target.length){ - return read; - } - - updateCurrentChunk(blocking && read==0); - } - - if(read>0)return read; - if(closed)return -1; - if(expectMoreData.get() || !receiveBuffer.isEmpty())return 0; - //no more data - return -1; - - }catch(Exception ex){ - IOException e= new IOException(); - e.initCause(ex); - throw e; - } - } - - /** - * Reads the next valid chunk of application data from the queue
- * - * In blocking mode,this method will block until data is available or the socket is closed, - * otherwise it will wait for at most 10 milliseconds. - * - * @throws InterruptedException - */ - private void updateCurrentChunk(boolean block)throws IOException{ - if(currentChunk!=null)return; - - while(true){ - try{ - if(block){ - currentChunk=receiveBuffer.poll(1, TimeUnit.MILLISECONDS); - while (!closed && currentChunk==null){ - currentChunk=receiveBuffer.poll(1000, TimeUnit.MILLISECONDS); - } - } - else currentChunk=receiveBuffer.poll(10, TimeUnit.MILLISECONDS); - - }catch(InterruptedException ie){ - IOException ex=new IOException(); - ex.initCause(ie); - throw ex; - } - return; - } - } - - /** - * new application data - * @param data - * - */ - protected boolean haveNewData(long sequenceNumber,byte[]data)throws IOException{ - hasData=true; - return receiveBuffer.offer(new AppData(sequenceNumber,data)); - } - - @Override - public void close()throws IOException{ - if(closed)return; - closed=true; - noMoreData(); - } - - public UDTSocket getSocket(){ - return socket; - } - - /** - * sets the blocking mode - * @param block - */ - public void setBlocking(boolean block){ - this.blocking=block; - } - - public int getReceiveBufferSize(){ - return receiveBuffer.getSize(); - } - - /** - * notify the input stream that there is no more data - * @throws IOException - */ - protected void noMoreData()throws IOException{ - expectMoreData.set(false); - } - - /** - * жûݽ - * cd - * @return - */ - public boolean isHasData() - { - return hasData; - } - - /** - * used for storing application data and the associated - * sequence number in the queue in ascending order - */ - public static class AppData implements Comparable{ - final long sequenceNumber; - final byte[] data; - public AppData(long sequenceNumber, byte[]data){ - this.sequenceNumber=sequenceNumber; - this.data=data; - } - - @Override - public int compareTo(AppData o) { - return (int)(sequenceNumber-o.sequenceNumber); - } - - @Override - public String toString(){ - return sequenceNumber+"["+data.length+"]"; - } - - public long getSequenceNumber(){ - return sequenceNumber; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result - + (int) (sequenceNumber ^ (sequenceNumber >>> 32)); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - AppData other = (AppData) obj; - if (sequenceNumber != other.sequenceNumber) - return false; - return true; - } - - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/bd/d0a4982c03ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/bd/d0a4982c03ac001710ff8a7c6bda0fb8 deleted file mode 100644 index f2b2a40..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/bd/d0a4982c03ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,21 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; - -/** - * @author jinyu - * @param - * - */ -public class SocketReference extends WeakReference { - - public SocketReference(T referent) { - super(referent); - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/be/809095536aa800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/be/809095536aa800171a8482560d609ceb deleted file mode 100644 index c577d9f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/be/809095536aa800171a8482560d609ceb +++ /dev/null @@ -1,16 +0,0 @@ -/** - * - */ -package net.File; - - -import java.nio.file.WatchEvent.Kind; - -/** - * @author jinyu - * - */ -public class FileMonitor { -public String file; -public Kind kind; -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/be/f0170dbcb5ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/be/f0170dbcb5ad0017181ed9113883eda9 deleted file mode 100644 index be94d73..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/be/f0170dbcb5ad0017181ed9113883eda9 +++ /dev/null @@ -1,523 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;s0) - { - client.connectNum--; - if(lastAckSequenceNumber/10000!=ackNumber/10000) - { - // - //ackNumber رȫɾرСһɾ - if(lastAckSequenceNumberthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - // - } - } - } - } - - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/bf/707a9cdbc4ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/bf/707a9cdbc4ad0017181ed9113883eda9 deleted file mode 100644 index 27fb903..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/bf/707a9cdbc4ad0017181ed9113883eda9 +++ /dev/null @@ -1,509 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - // cd - private volatile int bufferNum=0; - private volatile boolean isModify=true; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - // - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - if(this.isModify) - { - if(bufferNum<10000) - { - if(ackNumber/10000!=this.session.getInitialSequenceNumber()/10000) - { - return; - } - } - } - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/bf/80cced3d64a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/bf/80cced3d64a800171a8482560d609ceb deleted file mode 100644 index 471417f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/bf/80cced3d64a800171a8482560d609ceb +++ /dev/null @@ -1,27 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; -import java.util.concurrent.ConcurrentHashMap; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private ConcurrentHashMap hash=new ConcurrentHashMap(); -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/bf/90cc8e0637ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/bf/90cc8e0637ac001710ff8a7c6bda0fb8 deleted file mode 100644 index c0df784..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/bf/90cc8e0637ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,100 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=20; - - /** - * ָ - * @param data - * @return - */ - public static byte[][] splitData(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize>0?1:0; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - while((count=dis.read(buf,0, bufSize))!=-1) - { - log.info("1:"); - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - log.info(":"+sum); - - } - client.close(); - dis.close(); - log.info("ɣ"+f.getName()); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c0/100a598904ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/c0/100a598904ac001710ff8a7c6bda0fb8 deleted file mode 100644 index a6db6e8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c0/100a598904ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,86 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private LinkedBlockingQueue> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - - } - } - catch(Exception ex) - { - logger.info("session"+ex.getMessage()); - } - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - private void startThread() { - - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c0/4069778be0ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/c0/4069778be0ac001716b9ca6d5abb90bc deleted file mode 100644 index 6b8fb1d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c0/4069778be0ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,149 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=10*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - long startTime=System.currentTimeMillis(); - while((count=dis.read(buf,0, bufSize))!=-1) - { - - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - - } - long end=System.currentTimeMillis(); - client.close(); - dis.close(); - log.info("ɣ"+f.getName()+",ƽٶȣ"+); - - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c0/90fe4f592dac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/c0/90fe4f592dac001710ff8a7c6bda0fb8 deleted file mode 100644 index 1fa20a8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c0/90fe4f592dac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,100 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=20; - - /** - * ָ - * @param data - * @return - */ - public static byte[][] splitData(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize>0?1:0; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i hashMap=new WeakHashMap (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("socket"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - if(num%200==0) - { - System.gc(); - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c0/f05994565ca800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/c0/f05994565ca800171a8482560d609ceb deleted file mode 100644 index 4100ef8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c0/f05994565ca800171a8482560d609ceb +++ /dev/null @@ -1,223 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.UDTStatistics; - -public class UDTClient { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - private final UDPEndPoint clientEndpoint; - private ClientSession clientSession; - private boolean close=false; - private Thread closeThread=null;//cd - public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address,localport); - logger.info("Created client endpoint on port "+localport); - } - - public UDTClient(InetAddress address)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address); - logger.info("Created client endpoint on port "+clientEndpoint.getLocalPort()); - } - - public UDTClient(UDPEndPoint endpoint)throws SocketException, UnknownHostException{ - clientEndpoint=endpoint; - } - - /** - * establishes a connection to the given server. - * Starts the sender thread. - * @param host - * @param port - * @throws UnknownHostException - */ - public void connect(String host, int port)throws InterruptedException, UnknownHostException, IOException{ - InetAddress address=InetAddress.getByName(host); - Destination destination=new Destination(address,port); - //create client session... - clientSession=new ClientSession(clientEndpoint,destination); - clientEndpoint.addSession(clientSession.getSocketID(), clientSession); - - clientEndpoint.start(); - clientSession.connect(); - //wait for handshake - while(!clientSession.isReady()){ - Thread.sleep(500); - } - logger.info("The UDTClient is connected"); - Thread.sleep(500); - } - - /** - * sends the given data asynchronously - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - public void send(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWrite(data); - } - - public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWriteBlocking(data); - } - - public int read(byte[]data)throws IOException, InterruptedException{ - return clientSession.getSocket().getInputStream().read(data); - } - - /** - * flush outstanding data (and make sure it is acknowledged) - * @throws IOException - * @throws InterruptedException - */ - public void flush()throws IOException, InterruptedException{ - clientSession.getSocket().flush(); - } - - - public void shutdown()throws IOException{ - - if (clientSession.isReady()&& clientSession.active==true) - { - Shutdown shutdown = new Shutdown(); - shutdown.setDestinationID(clientSession.getDestination().getSocketID()); - shutdown.setSession(clientSession); - try{ - clientEndpoint.doSend(shutdown); - TimeUnit.MILLISECONDS.sleep(100); - } - catch(Exception e) - { - logger.log(Level.SEVERE,"ERROR: Connection could not be stopped!",e); - } - clientSession.getSocket().getReceiver().stop(); - clientEndpoint.stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - close=true; - } - } - - public UDTInputStream getInputStream()throws IOException{ - return clientSession.getSocket().getInputStream(); - } - - public UDTOutputStream getOutputStream()throws IOException{ - return clientSession.getSocket().getOutputStream(); - } - - public UDPEndPoint getEndpoint()throws IOException{ - return clientEndpoint; - } - - public UDTStatistics getStatistics(){ - return clientSession.getStatistics(); - } - - public long getSocketID() - { - //cd - return clientSession.getSocketID(); - } - - /** - * ͬر - * ȴݷɺٹر - * ֻȴ10ss - */ - public synchronized void close() - { - close=true; - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - if(clientSession.getSocket().getSender().isSenderEmpty()) - { - try { - shutdown(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - } - if(closeThread.isAlive()) - { - return; - } - esle - { - closeThread.start(); - } - } - - public boolean isClose() - { - return close; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c1/1026fc199fad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/c1/1026fc199fad0017181ed9113883eda9 deleted file mode 100644 index e69de29..0000000 diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c1/409b84a8cfac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/c1/409b84a8cfac001716b9ca6d5abb90bc deleted file mode 100644 index 02b4380..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c1/409b84a8cfac001716b9ca6d5abb90bc +++ /dev/null @@ -1,232 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ - if(highestReadSequenceNumber+1100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - long startTime=System.currentTimeMillis(); - while((count=dis.read(buf,0, bufSize))!=-1) - { - - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - } - - } - long endTime=System.currentTimeMillis(); - client.close(); - dis.close(); - long speed=fLen/((endTime-startTime)/1000); - log.info("ɣ"+f.getName()+",ƽٶ(M/S)"+speed/1024/1024); - - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c1/b02fa6c104ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/c1/b02fa6c104ac001710ff8a7c6bda0fb8 deleted file mode 100644 index e46e9eb..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c1/b02fa6c104ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,87 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private LinkedBlockingQueue> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c1/e00d35ec5fac00171ca19969f19d2325 b/.metadata/.plugins/org.eclipse.core.resources/.history/c1/e00d35ec5fac00171ca19969f19d2325 deleted file mode 100644 index 07c9a04..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c1/e00d35ec5fac00171ca19969f19d2325 +++ /dev/null @@ -1,237 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; -import java.io.IOException; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.nio.ByteBuffer; -import java.util.concurrent.TimeUnit; - -import udt.packets.DataPacket; - -/** - * UDTSocket is analogous to a normal java.net.Socket, it provides input and - * output streams for the application - * - * TODO is it possible to actually extend java.net.Socket ? - * - * - */ -public class UDTSocket { - //һsessionӦһudtsocket - //endpoint - private final UDPEndPoint endpoint; - - private volatile boolean active; - - private volatile boolean close=false;//رձʶcd - - //processing received data - private UDTReceiver receiver; - private UDTSender sender; - - private final UDTSession session; - - private UDTInputStream inputStream; - private UDTOutputStream outputStream; - - /** - * @param host - * @param port - * @param endpoint - * @throws SocketException,UnknownHostException - */ - public UDTSocket(UDPEndPoint endpoint, UDTSession session)throws SocketException,UnknownHostException{ - this.endpoint=endpoint; - this.session=session; - this.receiver=new UDTReceiver(session,endpoint); - this.sender=new UDTSender(session,endpoint); - } - - public UDTReceiver getReceiver() { - return receiver; - } - - public void setReceiver(UDTReceiver receiver) { - this.receiver = receiver; - } - - public UDTSender getSender() { - return sender; - } - - public void setSender(UDTSender sender) { - this.sender = sender; - } - - public void setActive(boolean active) { - this.active = active; - } - - public boolean isActive() { - return active; - } - - public UDPEndPoint getEndpoint() { - return endpoint; - } - - public boolean isClose() - { - return close; - } - /** - * get the input stream for reading from this socket - * @return - */ - public synchronized UDTInputStream getInputStream()throws IOException{ - if(inputStream==null){ - inputStream=new UDTInputStream(this); - } - return inputStream; - } - - /** - * get the output stream for writing to this socket - * @return - */ - public synchronized UDTOutputStream getOutputStream(){ - if(outputStream==null){ - outputStream=new UDTOutputStream(this); - } - return outputStream; - } - - public final UDTSession getSession(){ - return session; - } - - /** - * write single block of data without waiting for any acknowledgement - * @param data - */ - protected void doWrite(byte[]data)throws IOException{ - doWrite(data, 0, data.length); - - } - - /** - * write the given data - * @param data - the data array - * @param offset - the offset into the array - * @param length - the number of bytes to write - * @throws IOException - */ - protected void doWrite(byte[]data, int offset, int length)throws IOException{ - try{ - doWrite(data, offset, length, Integer.MAX_VALUE, TimeUnit.MILLISECONDS); - }catch(InterruptedException ie){ - IOException io=new IOException(); - io.initCause(ie); - throw io; - } - } - - /** - * write the given data, waiting at most for the specified time if the queue is full - * @param data - * @param offset - * @param length - * @param timeout - * @param units - * @throws IOException - if data cannot be sent - * @throws InterruptedException - */ - protected void doWrite(byte[]data, int offset, int length, int timeout, TimeUnit units)throws IOException,InterruptedException{ - int chunksize=session.getDatagramSize()-24;//need some bytes for the header - ByteBuffer bb=ByteBuffer.wrap(data,offset,length); - long seqNo=0; - while(bb.remaining()>0){ - int len=Math.min(bb.remaining(),chunksize); - byte[]chunk=new byte[len]; - bb.get(chunk); - DataPacket packet=new DataPacket(); - seqNo=sender.getNextSequenceNumber(); - packet.setPacketSequenceNumber(seqNo); - packet.setSession(session); - packet.setDestinationID(session.getDestination().getSocketID()); - packet.setData(chunk); - System.out.println("sender sendUdtPacket1"); - //put the packet into the send queue - if(!sender.sendUdtPacket(packet, timeout, units)){ - throw new IOException("Queue full"); - } - System.out.println("sender sendUdtPacket2"); - } - if(length>0)active=true; - System.out.println("sender sendUdtPacket out"); - } - /** - * will block until the outstanding packets have really been sent out - * and acknowledged - */ - protected void flush() throws InterruptedException{ - if(!active)return; - final long seqNo=sender.getCurrentSequenceNumber(); - if(seqNo<0)throw new IllegalStateException(); - while(!sender.isSentOut(seqNo)){ - Thread.sleep(5); - } - if(seqNo>-1){ - //wait until data has been sent out and acknowledged - while(active && !sender.haveAcknowledgementFor(seqNo)){ - sender.waitForAck(seqNo); - } - } - //TODO need to check if we can pause the sender... - //sender.pause(); - } - - //writes and wait for ack - protected void doWriteBlocking(byte[]data)throws IOException, InterruptedException{ - doWrite(data); - flush(); - } - - /** - * close the connection - * @throws IOException - */ - public void close()throws IOException{ - if(inputStream!=null)inputStream.close(); - if(outputStream!=null)outputStream.close(); - active=false; - close=true; - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c2/0011b739e0ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/c2/0011b739e0ac001716b9ca6d5abb90bc deleted file mode 100644 index a9f0b3c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c2/0011b739e0ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,148 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=10*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - while((count=dis.read(buf,0, bufSize))!=-1) - { - log.info("1:"); - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - log.info(":"+sum); - - } - client.close(); - dis.close(); - log.info("ɣ"+f.getName()); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c2/50701c5f06ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/c2/50701c5f06ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 01cf916..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c2/50701c5f06ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,120 +0,0 @@ -/** - * - */ -package judp; - -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -//private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} - -/** - * - * @param port ˿ - */ -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - * @param localIP IP - * @param port ˿ - */ -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=SocketControls.getInstance().getSocket(); - } - judpSocket jsocket=new judpSocket(socket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c2/805d9d5d1eac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/c2/805d9d5d1eac001710ff8a7c6bda0fb8 deleted file mode 100644 index d5ad971..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c2/805d9d5d1eac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,28 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -/** - * @author jinyu - * - */ -public class PackagetCombin { - private static ConcurrentHashMap hash=new ConcurrentHashMap(); -public DataStruct addData(byte[] data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - DataStruct struct=hash.get(id); - if(struct==null) - { - struct=new DataStruct(num); - hash.put(id, struct); - } - struct.addData(data); - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c2/b069017f11ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/c2/b069017f11ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 894b554..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c2/b069017f11ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,27 +0,0 @@ -package Test; - -import java.util.concurrent.TimeUnit; - -import judp.judpClient; - -public class TestClient { - - public static void main(String[] args) { - while(true) - { - judpClient client=new judpClient(); - client.connect("127.0.0.1", 5555); - byte[]data=("hello word "+System.currentTimeMillis()).getBytes(); - client.sendData(data); - client.close(); - try { - System.out.println("ȴ"); - TimeUnit.SECONDS.sleep(5); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c2/e0564af81dac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/c2/e0564af81dac001710ff8a7c6bda0fb8 deleted file mode 100644 index 09b5aa0..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c2/e0564af81dac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,78 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] buffer=null; -public long id; -private volatile int num=0; -private volatile int sum=0; -private byte[] result=null; -public DataStruct(int num) -{ - buffer=new byte[num][]; -} - -/** - * - * @return - */ -private boolean check() -{ - if(num>=buffer.length) - { - //ɹ - if(sum==dataLen) - { - //ʼ - result=new byte[dataLen]; - ByteBuffer cur=ByteBuffer.wrap(result); - for(int i=0;i hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ cd - if(highestReadSequenceNumber+1 fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/timespan/1000; - sumBytes=0; - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - lastTime=System.currentTimeMillis(); - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c3/e05862c8afad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/c3/e05862c8afad0017181ed9113883eda9 deleted file mode 100644 index 71c0dcf..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c3/e05862c8afad0017181ed9113883eda9 +++ /dev/null @@ -1,502 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c4/20419ed021ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/c4/20419ed021ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 44662c2..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c4/20419ed021ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,50 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -/** - * @author jinyu - * - */ -public class PackagetCombin { - private static ConcurrentHashMap hash=new ConcurrentHashMap(); - private ConcurrentLinkedQueue queue=new ConcurrentLinkedQueue(); - - /** - * - * @param data - * @return - */ -public boolean addData(byte[] data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - DataStruct struct=hash.get(id); - if(struct==null) - { - struct=new DataStruct(num); - hash.put(id, struct); - } - boolean r= struct.addData(data); - if(r) - { - byte[]result =struct.getData(); - byte[] tmp=new byte[result.length]; - System.arraycopy(result, 0, tmp, 0, tmp.length); - queue.offer(tmp); - struct.clear(); - hash.remove(id); - } - return r; - -} -public byte[] getData() -{ - return queue.poll(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c4/70c215f856ac00171c63d91e40f02a62 b/.metadata/.plugins/org.eclipse.core.resources/.history/c4/70c215f856ac00171c63d91e40f02a62 deleted file mode 100644 index aa49956..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c4/70c215f856ac00171c63d91e40f02a62 +++ /dev/null @@ -1,152 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.UnsupportedEncodingException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=20*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,infobytes.length,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals("initServer:"+f.getName())) - { - client.close(); - return; - } - //client.decreNum(); - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - //ByteBuffer buffer=ByteBuffer.wrap(buf); - - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count+name.length+4]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - } - - } - client.close(); - dis.close(); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c4/c01a91c731ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/c4/c01a91c731ac001710ff8a7c6bda0fb8 deleted file mode 100644 index d269039..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c4/c01a91c731ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,338 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public boolean getCloseState() -{ - //ײѾر - return isClose|socket.isClose(); -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(getCloseState()) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(getCloseState()) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(getCloseState()) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;i queue=new LinkedBlockingQueue(); - private boolean isStop=false; - public FilesWatch() - { - try { - watcher = FileSystems.getDefault().newWatchService(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - public void setWatch(String dir) - { - this.dir=dir; - } - public void stop() - { - isStop=true; - } - public FileMonitor take() - { - try { - return queue.take(); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - return null; - } - public void start() - { - checkThread =new Thread(new Runnable() { - - @Override - public void run() { - try - { - Paths.get(dir).register(watcher, - StandardWatchEventKinds.ENTRY_CREATE, - StandardWatchEventKinds.ENTRY_DELETE, - StandardWatchEventKinds.ENTRY_MODIFY); - } - catch(Exception ex) - { - - } - while (!isStop) { - WatchKey key; - try { - key = watcher.take(); - for (WatchEvent event: key.pollEvents()) { - FileMonitor e=new FileMonitor(); - e.file=event.context().toString(); - e.kind=event.kind(); - queue.put(e); - } - - boolean valid = key.reset(); - if (!valid) { - break; - } - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - - - }); - checkThread.setDaemon(true); - checkThread.setName("monitor"); - checkThread.start(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c6/000d73ae31ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/c6/000d73ae31ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 22dde28..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c6/000d73ae31ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,338 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public boolean getCloseState() -{ - //ײѾر - return isClose|socket.isClose(); -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(isClose) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;i hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(!this.isRWMaster) - { - //дΪʱݾֱӸ - buffer[readPosition]=null;// - } - - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c6/30d1f210f7ab001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/c6/30d1f210f7ab001710ff8a7c6bda0fb8 deleted file mode 100644 index f0b7103..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c6/30d1f210f7ab001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,120 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); -private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - // - if(!list.isEmpty()) - { - for(int i=0;ihandoffQueue; - - private Thread receiverThread; - - private volatile boolean stopped=false; - - //(optional) ack interval (see CongestionControl interface) - private volatile long ackInterval=-1; - - /** - * if set to true connections will not expire, but will only be - * closed by a Shutdown message - */ - public static boolean connectionExpiryDisabled=false; - - private final boolean storeStatistics; - - - - /** - * create a receiver with a valid {@link UDTSession} - * @param session - */ - public UDTReceiver(UDTSession session,UDPEndPoint endpoint){ - this.endpoint = endpoint; - this.session=session; - this.sessionUpSince=System.currentTimeMillis(); - this.statistics=session.getStatistics(); - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - ackHistoryWindow = new AckHistoryWindow(16); - packetHistoryWindow = new PacketHistoryWindow(16); - receiverLossList = new ReceiverLossList(); - packetPairWindow = new PacketPairWindow(16); - largestReceivedSeqNumber=session.getInitialSequenceNumber()-1; - bufferSize=session.getReceiveBufferSize(); - handoffQueue=new ArrayBlockingQueue(4*session.getFlowWindowSize()); - storeStatistics=Boolean.getBoolean("udt.receiver.storeStatistics"); - initMetrics(); - start(); - } - - private MeanValue dgReceiveInterval; - private MeanValue dataPacketInterval; - private MeanValue processTime; - private MeanValue dataProcessTime; - private void initMetrics(){ - if(!storeStatistics)return; - dgReceiveInterval=new MeanValue("UDT receive interval"); - statistics.addMetric(dgReceiveInterval); - dataPacketInterval=new MeanValue("Data packet interval"); - statistics.addMetric(dataPacketInterval); - processTime=new MeanValue("UDT packet process time"); - statistics.addMetric(processTime); - dataProcessTime=new MeanValue("Data packet process time"); - statistics.addMetric(dataProcessTime); - } - - - //starts the sender algorithm - private void start(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - nextACK=Util.getCurrentTime()+ackTimerInterval; - nextNAK=(long)(Util.getCurrentTime()+1.5*nakTimerInterval); - nextEXP=Util.getCurrentTime()+2*expTimerInterval; - ackInterval=session.getCongestionControl().getAckInterval(); - while(!stopped){ - receiverAlgorithm(); - } - } - catch(Exception ex){ - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING RECEIVER for "+session); - } - }; - receiverThread=UDTThreadFactory.get().newThread(r); - receiverThread.start(); - } - - /* - * packets are written by the endpoint - */ - protected void receive(UDTPacket p)throws IOException{ - if(storeStatistics)dgReceiveInterval.end(); - handoffQueue.offer(p); - if(storeStatistics)dgReceiveInterval.begin(); - } - - /** - * receiver algorithm - * see specification P11. - */ - public void receiverAlgorithm()throws InterruptedException,IOException{ - //check ACK timer - long currentTime=Util.getCurrentTime(); - if(nextACKseqNumbers=receiverLossList.getFilteredSequenceNumbers(roundTripTime,true); - sendNAK(seqNumbers); - } - - /** - * process EXP event (see spec. p 13) - */ - protected void processEXPEvent()throws IOException{ - if(session.getSocket()==null)return; - UDTSender sender=session.getSocket().getSender(); - //put all the unacknowledged packets in the senders loss list - sender.putUnacknowledgedPacketsIntoLossList(); - if(expCount>16 && System.currentTimeMillis()-sessionUpSince > IDLE_TIMEOUT){ - if(!connectionExpiryDisabled &&!stopped){ - sendShutdown(); - stop(); - logger.info("Session "+session+" expired."); - return; - } - } - if(!sender.haveLostPackets()){ - sendKeepAlive(); - } - expCount++; - } - - protected void processUDTPacket(UDTPacket p)throws IOException{ - //(3).Check the packet type and process it according to this. - - if(!p.isControlPacket()){ - DataPacket dp=(DataPacket)p; - if(storeStatistics){ - dataPacketInterval.end(); - dataProcessTime.begin(); - } - onDataPacketReceived(dp); - if(storeStatistics){ - dataProcessTime.end(); - dataPacketInterval.begin(); - } - - } - - else if (p.getControlPacketType()==ControlPacketType.ACK2.ordinal()){ - Acknowledgment2 ack2=(Acknowledgment2)p; - onAck2PacketReceived(ack2); - } - - else if (p instanceof Shutdown){ - onShutdown(); - } - - } - - //every nth packet will be discarded... for testing only of course - public static int dropRate=0; - - //number of received data packets - private int n=0; - - protected void onDataPacketReceived(DataPacket dp)throws IOException{ - long currentSequenceNumber = dp.getPacketSequenceNumber(); - - //for TESTING : check whether to drop this packet -// n++; -// //if(dropRate>0 && n % dropRate == 0){ -// if(n % 1111 == 0){ -// logger.info("**** TESTING:::: DROPPING PACKET "+currentSequenceNumber+" FOR TESTING"); -// return; -// } -// //} - boolean OK=session.getSocket().getInputStream().haveNewData(currentSequenceNumber,dp.getData()); - if(!OK){ - - //need to drop packet... - return; - } - - long currentDataPacketArrivalTime = Util.getCurrentTime(); - - /*(4).if the seqNo of the current data packet is 16n+1,record the - time interval between this packet and the last data packet - in the packet pair window*/ - if((currentSequenceNumber%16)==1 && lastDataPacketArrivalTime>0){ - long interval=currentDataPacketArrivalTime -lastDataPacketArrivalTime; - packetPairWindow.add(interval); - } - - //(5).record the packet arrival time in the PKT History Window. - packetHistoryWindow.add(currentDataPacketArrivalTime); - - - //store current time - lastDataPacketArrivalTime=currentDataPacketArrivalTime; - - - //(6).number of detected lossed packet - /*(6.a).if the number of the current data packet is greater than LSRN+1, - put all the sequence numbers between (but excluding) these two values - into the receiver's loss list and send them to the sender in an NAK packet*/ - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber+1)>0){ - sendNAK(currentSequenceNumber); - - } - else if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)<0){ - /*(6.b).if the sequence number is less than LRSN,remove it from - * the receiver's loss list - */ - receiverLossList.remove(currentSequenceNumber); - - } - - statistics.incNumberOfReceivedDataPackets(); - - //(7).Update the LRSN - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)>0){ - largestReceivedSeqNumber=currentSequenceNumber; - } - - //(8) need to send an ACK? Some cc algorithms use this - if(ackInterval>0){ - if(n % ackInterval == 0)processACKEvent(false); - } - } - - /** - * write a NAK triggered by a received sequence number that is larger than - * the largestReceivedSeqNumber + 1 - * @param currentSequenceNumber - the currently received sequence number - * @throws IOException - */ - protected void sendNAK(long currentSequenceNumber)throws IOException{ - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(largestReceivedSeqNumber+1, currentSequenceNumber); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - //put all the sequence numbers between (but excluding) these two values into the - //receiver loss list - for(long i=largestReceivedSeqNumber+1;isequenceNumbers)throws IOException{ - if(sequenceNumbers.size()==0)return; - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(sequenceNumbers); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(nAckPacket); - statistics.incNumberOfNAKSent(); - - } - - protected long sendLightAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt=buildLightAcknowledgement(ackNumber); - endpoint.doSend(acknowledgmentPkt); - statistics.incNumberOfACKSent(); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - protected long sendAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); - //set the estimate link capacity - estimateLinkCapacity=packetPairWindow.getEstimatedLinkCapacity(); - acknowledgmentPkt.setEstimatedLinkCapacity(estimateLinkCapacity); - //set the packet arrival rate - packetArrivalSpeed=packetHistoryWindow.getPacketArrivalSpeed(); - acknowledgmentPkt.setPacketReceiveRate(packetArrivalSpeed); - - endpoint.doSend(acknowledgmentPkt); - - statistics.incNumberOfACKSent(); - statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - //builds a "light" Acknowledgement - private Acknowledgement buildLightAcknowledgement(long ackNumber){ - Acknowledgement acknowledgmentPkt = new Acknowledgement(); - //the packet sequence number to which all the packets have been received - acknowledgmentPkt.setAckNumber(ackNumber); - //assign this ack a unique increasing ACK sequence number - acknowledgmentPkt.setAckSequenceNumber(++ackSequenceNumber); - acknowledgmentPkt.setRoundTripTime(roundTripTime); - acknowledgmentPkt.setRoundTripTimeVar(roundTripTimeVar); - //set the buffer size - acknowledgmentPkt.setBufferSize(bufferSize); - - acknowledgmentPkt.setDestinationID(session.getDestination().getSocketID()); - acknowledgmentPkt.setSession(session); - - return acknowledgmentPkt; - } - - /** - * spec p. 13:
- 1) Locate the related ACK in the ACK History Window according to the - ACK sequence number in this ACK2.
- 2) Update the largest ACK number ever been acknowledged.
- 3) Calculate new rtt according to the ACK2 arrival time and the ACK - departure time, and update the RTT value as: RTT = (RTT * 7 + - rtt) / 8.
- 4) Update RTTVar by: RTTVar = (RTTVar * 3 + abs(RTT - rtt)) / 4.
- 5) Update both ACK and NAK period to 4 * RTT + RTTVar + SYN.
- */ - protected void onAck2PacketReceived(Acknowledgment2 ack2){ - AckHistoryEntry entry=ackHistoryWindow.getEntry(ack2.getAckSequenceNumber()); - if(entry!=null){ - long ackNumber=entry.getAckNumber(); - largestAcknowledgedAckNumber=Math.max(ackNumber, largestAcknowledgedAckNumber); - - long rtt=entry.getAge(); - if(roundTripTime>0)roundTripTime = (roundTripTime*7 + rtt)/8; - else roundTripTime = rtt; - roundTripTimeVar = (roundTripTimeVar* 3 + Math.abs(roundTripTimeVar- rtt)) / 4; - ackTimerInterval=4*roundTripTime+roundTripTimeVar+Util.getSYNTime(); - nakTimerInterval=ackTimerInterval; - statistics.setRTT(roundTripTime, roundTripTimeVar); - } - } - - protected void sendKeepAlive()throws IOException{ - KeepAlive ka=new KeepAlive(); - ka.setDestinationID(session.getDestination().getSocketID()); - ka.setSession(session); - endpoint.doSend(ka); - } - - protected void sendShutdown()throws IOException{ - Shutdown s=new Shutdown(); - s.setDestinationID(session.getDestination().getSocketID()); - s.setSession(session); - endpoint.doSend(s); - } - - private volatile long ackSequenceNumber=0; - - protected void resetEXPTimer(){ - nextEXP=Util.getCurrentTime()+expTimerInterval; - expCount=0; - } - - protected void resetEXPCount(){ - expCount=0; - } - - public void setAckInterval(long ackInterval){ - this.ackInterval=ackInterval; - } - - protected void onShutdown()throws IOException{ - stop(); - } - - public void stop()throws IOException{ - stopped=true; - session.getSocket().close(); - //stop our sender as well - session.getSocket().getSender().stop(); - } - - @Override - public String toString(){ - StringBuilder sb=new StringBuilder(); - sb.append("UDTReceiver ").append(session).append("\n"); - sb.append("LossList: "+receiverLossList); - return sb.toString(); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c7/303bbd9222ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/c7/303bbd9222ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 5411aa9..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c7/303bbd9222ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,208 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public void pauseOutput() - { - try { - client.getOutputStream().pauseOutput(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - public byte[] read() - { - byte[] result=null; - if(client!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(client.isClose()) - { - return null; - } - r=client.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; - } - public int read(byte[]data) - { - try { - return client.read(data); - } catch (IOException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - return -1; - } - public void close() - { - if(client!=null) - { - if(sumLen==0) - { - //ûз - //ر - try { - if(!client.isClose()) - client.shutdown(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - else - { - //ʼ - //SocketManager.getInstance().add(client); - if(!client.isClose()) - client.close(); - } - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c7/306b6cb061ac00171ca19969f19d2325 b/.metadata/.plugins/org.eclipse.core.resources/.history/c7/306b6cb061ac00171ca19969f19d2325 deleted file mode 100644 index f2fe99c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c7/306b6cb061ac00171ca19969f19d2325 +++ /dev/null @@ -1,155 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.UnsupportedEncodingException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=10*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - while((count=dis.read(buf,0, bufSize))!=-1) - { - log.info("1:"); - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - log.info(":"+sum); - TimeUnit.SECONDS.sleep(1); - } - client.close(); - dis.close(); - log.info("ɣ"+f.getName()); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c7/50f07caf6aa800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/c7/50f07caf6aa800171a8482560d609ceb deleted file mode 100644 index cba6941..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c7/50f07caf6aa800171a8482560d609ceb +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - */ -package Test; - -import java.io.IOException; -import java.util.logging.Logger; - -import net.File.RecviceFiles; - - -/** - * @author jinyu - * - */ -public class TestRecFile { - private static Logger log=Logger.getLogger(TestRecFile.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - RecviceFiles rec=new RecviceFiles(); - String dir="F://dbfile"; - rec.setDir(dir); - rec.start("127.0.0.1", 5555); - log.info("ļ"); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c8/30cbde246aa800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/c8/30cbde246aa800171a8482560d609ceb deleted file mode 100644 index 495a637..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c8/30cbde246aa800171a8482560d609ceb +++ /dev/null @@ -1,104 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - // - if(!list.isEmpty()) - { - for(int i=0;i hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡ - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(islagerRead) - { - // cd Ϊݶȡ׼ - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - } - else - { - //ԭ룬Сݽȫ - buffer[insert]=data; - numValidChunks.incrementAndGet(); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - - if(this.islagerRead) - { - //cd - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(this.islagerRead) - { - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - - if(readPosition==size) - {readPosition=0; - if(this.islagerRead) - { - clearDeHash(this.size-leftNum); - } - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ca/f04c3ce267a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/ca/f04c3ce267a800171a8482560d609ceb deleted file mode 100644 index 58a8069..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ca/f04c3ce267a800171a8482560d609ceb +++ /dev/null @@ -1,77 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public UDTSocket getSocket() -{ - - int index=-1; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(index==-1) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳ - i=-1;//± - index=i; - } - } - else - { - // - if(i==index) - { - continue; - } - else - { - list.get(i).close(); - long id=list.get(i).getSession().getSocketID(); - list.get(i).getEndpoint().removeSession(id); - list.get(i).getSession(). - } - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - return null; - -} -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/cb/20fd1e9c05ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/cb/20fd1e9c05ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 791d171..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/cb/20fd1e9c05ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,92 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.WeakHashMap; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private final ReferenceQueue q = new ReferenceQueue(); - - /** - * ʹ - */ - private final WeakHashMap hashMap=new WeakHashMap (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("session"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/cb/500f92514fac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/cb/500f92514fac001710ff8a7c6bda0fb8 deleted file mode 100644 index eaf6ad5..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/cb/500f92514fac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,132 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.UnsupportedEncodingException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=20*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - long startTime=System.currentTimeMillis(); - while((count=dis.read(buf,0, bufSize))!=-1) - { - - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - - } - long endTime=System.currentTimeMillis(); - client.close(); - dis.close(); - long speed=fLen/((endTime-startTime)/1000); - log.info("ɣ"+f.getName()+",ƽٶ(M/S)"+speed/1024/1024); - - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/cb/f0426ab665a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/cb/f0426ab665a800171a8482560d609ceb deleted file mode 100644 index a5081dc..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/cb/f0426ab665a800171a8482560d609ceb +++ /dev/null @@ -1,33 +0,0 @@ -/** - * - */ -package judp; - -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} -public judpGroupSocket getSocket() -{ - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/cc/20526809d6ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/cc/20526809d6ac001716b9ca6d5abb90bc deleted file mode 100644 index df405f4..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/cc/20526809d6ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,274 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡ - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(islagerRead) - { - // cd Ϊݶȡ׼ - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - } - else - { - //ԭ룬Сݽȫ - buffer[insert]=data; - numValidChunks.incrementAndGet(); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - - if(this.islagerRead) - { - //cd - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(this.islagerRead) - { - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/cc/908cb5595ba800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/cc/908cb5595ba800171a8482560d609ceb deleted file mode 100644 index ca547c9..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/cc/908cb5595ba800171a8482560d609ceb +++ /dev/null @@ -1,183 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.UDTStatistics; - -public class UDTClient { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - private final UDPEndPoint clientEndpoint; - private ClientSession clientSession; - private boolean close=false; - private Thread closeThread=null;//cd - public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address,localport); - logger.info("Created client endpoint on port "+localport); - } - - public UDTClient(InetAddress address)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address); - logger.info("Created client endpoint on port "+clientEndpoint.getLocalPort()); - } - - public UDTClient(UDPEndPoint endpoint)throws SocketException, UnknownHostException{ - clientEndpoint=endpoint; - } - - /** - * establishes a connection to the given server. - * Starts the sender thread. - * @param host - * @param port - * @throws UnknownHostException - */ - public void connect(String host, int port)throws InterruptedException, UnknownHostException, IOException{ - InetAddress address=InetAddress.getByName(host); - Destination destination=new Destination(address,port); - //create client session... - clientSession=new ClientSession(clientEndpoint,destination); - clientEndpoint.addSession(clientSession.getSocketID(), clientSession); - - clientEndpoint.start(); - clientSession.connect(); - //wait for handshake - while(!clientSession.isReady()){ - Thread.sleep(500); - } - logger.info("The UDTClient is connected"); - Thread.sleep(500); - } - - /** - * sends the given data asynchronously - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - public void send(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWrite(data); - } - - public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWriteBlocking(data); - } - - public int read(byte[]data)throws IOException, InterruptedException{ - return clientSession.getSocket().getInputStream().read(data); - } - - /** - * flush outstanding data (and make sure it is acknowledged) - * @throws IOException - * @throws InterruptedException - */ - public void flush()throws IOException, InterruptedException{ - clientSession.getSocket().flush(); - } - - - public void shutdown()throws IOException{ - - if (clientSession.isReady()&& clientSession.active==true) - { - Shutdown shutdown = new Shutdown(); - shutdown.setDestinationID(clientSession.getDestination().getSocketID()); - shutdown.setSession(clientSession); - try{ - clientEndpoint.doSend(shutdown); - TimeUnit.MILLISECONDS.sleep(100); - } - catch(Exception e) - { - logger.log(Level.SEVERE,"ERROR: Connection could not be stopped!",e); - } - clientSession.getSocket().getReceiver().stop(); - clientEndpoint.stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - close=true; - } - } - - public UDTInputStream getInputStream()throws IOException{ - return clientSession.getSocket().getInputStream(); - } - - public UDTOutputStream getOutputStream()throws IOException{ - return clientSession.getSocket().getOutputStream(); - } - - public UDPEndPoint getEndpoint()throws IOException{ - return clientEndpoint; - } - - public UDTStatistics getStatistics(){ - return clientSession.getStatistics(); - } - - public long getSocketID() - { - //cd - return clientSession.getSocketID(); - } - - /** - * ͬر - * ȴݷɺٹر - * ֻȴ10s - */ - public synchronized void close() - { - - } - - public boolean isClose() - { - return close; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/cc/b06dd99a19ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/cc/b06dd99a19ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 71ddaef..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/cc/b06dd99a19ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,73 +0,0 @@ -/** - * - */ -package judp; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong subid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - public byte[][] split(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-DataHead.headLen; - } - long session=sessionid.incrementAndGet(); - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - DataHead head=new DataHead(session,data.length,(byte) 0); - - for(int i=0;i=buffer.length) - { - //ɹ - if(sum==dataLen) - { - //ʼ - result=new byte[dataLen]; - ByteBuffer cur=ByteBuffer.wrap(result); - for(int i=0;i fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - long speed=0; - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/timespan/1000; - } - else - { - //1s - } - speed=sumBytes/(()/1000); - } - catch(Exception ex) - { - - } - lastTime=System.currentTimeMillis(); - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ce/10663a33dbac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/ce/10663a33dbac001716b9ca6d5abb90bc deleted file mode 100644 index 9432304..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ce/10663a33dbac001716b9ca6d5abb90bc +++ /dev/null @@ -1,605 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.ControlPacket; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.packets.Shutdown; -import udt.packets.ControlPacket.ControlPacketType; -import udt.receiver.AckHistoryEntry; -import udt.receiver.AckHistoryWindow; -import udt.receiver.PacketHistoryWindow; -import udt.receiver.PacketPairWindow; -import udt.receiver.ReceiverLossList; -import udt.receiver.ReceiverLossListEntry; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - -/** - * receiver part of a UDT entity - * @see UDTSender - */ -public class UDTReceiver { - - private static final Logger logger=Logger.getLogger(UDTReceiver.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //record seqNo of detected lostdata and latest feedback time - private final ReceiverLossList receiverLossList; - - //record each sent ACK and the sent time - private final AckHistoryWindow ackHistoryWindow; - - //Packet history window that stores the time interval between the current and the last seq. - private final PacketHistoryWindow packetHistoryWindow; - - //for storing the arrival time of the last received data packet - private volatile long lastDataPacketArrivalTime=0; - - //largest received data packet sequence number(LRSN) - private volatile long largestReceivedSeqNumber=0; - - //ACK event related - - //last Ack number - private long lastAckNumber=0; - - //largest Ack number ever acknowledged by ACK2 - private volatile long largestAcknowledgedAckNumber=-1; - - //EXP event related - - //a variable to record number of continuous EXP time-out events - private volatile long expCount=0; - - /*records the time interval between each probing pair - compute the median packet pair interval of the last - 16 packet pair intervals (PI) and the estimate link capacity.(packet/s)*/ - private final PacketPairWindow packetPairWindow; - - //estimated link capacity - long estimateLinkCapacity; - // the packet arrival rate - long packetArrivalSpeed; - - //round trip time, calculated from ACK/ACK2 pairs - long roundTripTime=0; - //round trip time variance - long roundTripTimeVar=roundTripTime/2; - - //to check the ACK, NAK, or EXP timer - private long nextACK; - //microseconds to next ACK event - private long ackTimerInterval=Util.getSYNTime(); - - private long nextNAK; - //microseconds to next NAK event - private long nakTimerInterval=Util.getSYNTime(); - - private long nextEXP; - //microseconds to next EXP event - private long expTimerInterval=100*Util.getSYNTime(); - - //instant when the session was created (for expiry checking) - private final long sessionUpSince; - //milliseconds to timeout a new session that stays idle - private final long IDLE_TIMEOUT = 3*60*1000; - - //buffer size for storing data - private final long bufferSize; - - //stores received packets to be sent - private final BlockingQueuehandoffQueue; - - private Thread receiverThread; - - private volatile boolean stopped=false; - - //(optional) ack interval (see CongestionControl interface) - private volatile long ackInterval=-1; - - /** - * if set to true connections will not expire, but will only be - * closed by a Shutdown message - */ - public static boolean connectionExpiryDisabled=false; - - private final boolean storeStatistics; - - - - /** - * create a receiver with a valid {@link UDTSession} - * @param session - */ - public UDTReceiver(UDTSession session,UDPEndPoint endpoint){ - this.endpoint = endpoint; - this.session=session; - this.sessionUpSince=System.currentTimeMillis(); - this.statistics=session.getStatistics(); - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - ackHistoryWindow = new AckHistoryWindow(16); - packetHistoryWindow = new PacketHistoryWindow(16); - receiverLossList = new ReceiverLossList(); - packetPairWindow = new PacketPairWindow(16); - largestReceivedSeqNumber=session.getInitialSequenceNumber()-1; - bufferSize=session.getReceiveBufferSize(); - handoffQueue=new ArrayBlockingQueue(4*session.getFlowWindowSize()); - storeStatistics=Boolean.getBoolean("udt.receiver.storeStatistics"); - initMetrics(); - start(); - } - - private MeanValue dgReceiveInterval; - private MeanValue dataPacketInterval; - private MeanValue processTime; - private MeanValue dataProcessTime; - private void initMetrics(){ - if(!storeStatistics)return; - dgReceiveInterval=new MeanValue("UDT receive interval"); - statistics.addMetric(dgReceiveInterval); - dataPacketInterval=new MeanValue("Data packet interval"); - statistics.addMetric(dataPacketInterval); - processTime=new MeanValue("UDT packet process time"); - statistics.addMetric(processTime); - dataProcessTime=new MeanValue("Data packet process time"); - statistics.addMetric(dataProcessTime); - } - - - //starts the sender algorithm - private void start(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - nextACK=Util.getCurrentTime()+ackTimerInterval; - nextNAK=(long)(Util.getCurrentTime()+1.5*nakTimerInterval); - nextEXP=Util.getCurrentTime()+2*expTimerInterval; - ackInterval=session.getCongestionControl().getAckInterval(); - while(!stopped){ - receiverAlgorithm(); - } - } - catch(Exception ex){ - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING RECEIVER for "+session); - } - }; - receiverThread=UDTThreadFactory.get().newThread(r); - receiverThread.start(); - } - - /* - * packets are written by the endpoint - */ - protected void receive(UDTPacket p)throws IOException{ - if(storeStatistics)dgReceiveInterval.end(); - handoffQueue.offer(p); - if(storeStatistics)dgReceiveInterval.begin(); - } - - /** - * receiver algorithm - * see specification P11. - */ - public void receiverAlgorithm()throws InterruptedException,IOException{ - //check ACK timer - long currentTime=Util.getCurrentTime(); - if(nextACKseqNumbers=receiverLossList.getFilteredSequenceNumbers(roundTripTime,true); - sendNAK(seqNumbers); - } - - /** - * process EXP event (see spec. p 13) - */ - protected void processEXPEvent()throws IOException{ - if(session.getSocket()==null)return; - UDTSender sender=session.getSocket().getSender(); - //put all the unacknowledged packets in the senders loss list - sender.putUnacknowledgedPacketsIntoLossList(); - if(expCount>16 && System.currentTimeMillis()-sessionUpSince > IDLE_TIMEOUT){ - if(!connectionExpiryDisabled &&!stopped){ - sendShutdown(); - stop(); - logger.info("Session "+session+" expired."); - return; - } - } - if(!sender.haveLostPackets()){ - sendKeepAlive(); - } - expCount++; - } - - protected void processUDTPacket(UDTPacket p)throws IOException{ - //(3).Check the packet type and process it according to this. - - if(!p.isControlPacket()){ - DataPacket dp=(DataPacket)p; - if(storeStatistics){ - dataPacketInterval.end(); - dataProcessTime.begin(); - } - onDataPacketReceived(dp); - if(storeStatistics){ - dataProcessTime.end(); - dataPacketInterval.begin(); - } - - } - - else if (p.getControlPacketType()==ControlPacketType.ACK2.ordinal()){ - Acknowledgment2 ack2=(Acknowledgment2)p; - onAck2PacketReceived(ack2); - } - - else if (p instanceof Shutdown){ - onShutdown(); - } - - } - - //every nth packet will be discarded... for testing only of course - public static int dropRate=0; - - //number of received data packets - private int n=0; - - protected void onDataPacketReceived(DataPacket dp)throws IOException{ - long currentSequenceNumber = dp.getPacketSequenceNumber(); - - //for TESTING : check whether to drop this packet -// n++; -// //if(dropRate>0 && n % dropRate == 0){ -// if(n % 1111 == 0){ -// logger.info("**** TESTING:::: DROPPING PACKET "+currentSequenceNumber+" FOR TESTING"); -// return; -// } -// //} - boolean OK=session.getSocket().getInputStream().haveNewData(currentSequenceNumber,dp.getData()); - if(!OK){ - - //need to drop packet... - return; - } - - long currentDataPacketArrivalTime = Util.getCurrentTime(); - - /*(4).if the seqNo of the current data packet is 16n+1,record the - time interval between this packet and the last data packet - in the packet pair window*/ - if((currentSequenceNumber%16)==1 && lastDataPacketArrivalTime>0){ - long interval=currentDataPacketArrivalTime -lastDataPacketArrivalTime; - packetPairWindow.add(interval); - } - - //(5).record the packet arrival time in the PKT History Window. - packetHistoryWindow.add(currentDataPacketArrivalTime); - - - //store current time - lastDataPacketArrivalTime=currentDataPacketArrivalTime; - logger.info("largestReceivedSeqNumber:"+largestReceivedSeqNumber); - - //(6).number of detected lossed packet - /*(6.a).if the number of the current data packet is greater than LSRN+1, - put all the sequence numbers between (but excluding) these two values - into the receiver's loss list and send them to the sender in an NAK packet*/ - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber+1)>0){ - sendNAK(currentSequenceNumber); - - } - else if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)<0){ - /*(6.b).if the sequence number is less than LRSN,remove it from - * the receiver's loss list - */ - receiverLossList.remove(currentSequenceNumber); - logger.info("receiverLossList remove:"+currentSequenceNumber); - } - - statistics.incNumberOfReceivedDataPackets(); - - //(7).Update the LRSN - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)>0){ - largestReceivedSeqNumber=currentSequenceNumber; - } - - //(8) need to send an ACK? Some cc algorithms use this - if(ackInterval>0){ - if(n % ackInterval == 0)processACKEvent(false); - } - } - - /** - * write a NAK triggered by a received sequence number that is larger than - * the largestReceivedSeqNumber + 1 - * @param currentSequenceNumber - the currently received sequence number - * @throws IOException - */ - protected void sendNAK(long currentSequenceNumber)throws IOException{ - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(largestReceivedSeqNumber+1, currentSequenceNumber); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - //put all the sequence numbers between (but excluding) these two values into the - //receiver loss list - for(long i=largestReceivedSeqNumber+1;isequenceNumbers)throws IOException{ - if(sequenceNumbers.size()==0)return; - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(sequenceNumbers); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(nAckPacket); - statistics.incNumberOfNAKSent(); - - } - - protected long sendLightAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt=buildLightAcknowledgement(ackNumber); - endpoint.doSend(acknowledgmentPkt); - statistics.incNumberOfACKSent(); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - protected long sendAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); - //set the estimate link capacity - estimateLinkCapacity=packetPairWindow.getEstimatedLinkCapacity(); - acknowledgmentPkt.setEstimatedLinkCapacity(estimateLinkCapacity); - //set the packet arrival rate - packetArrivalSpeed=packetHistoryWindow.getPacketArrivalSpeed(); - acknowledgmentPkt.setPacketReceiveRate(packetArrivalSpeed); - - endpoint.doSend(acknowledgmentPkt); - - statistics.incNumberOfACKSent(); - statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - //builds a "light" Acknowledgement - private Acknowledgement buildLightAcknowledgement(long ackNumber){ - Acknowledgement acknowledgmentPkt = new Acknowledgement(); - //the packet sequence number to which all the packets have been received - acknowledgmentPkt.setAckNumber(ackNumber); - //assign this ack a unique increasing ACK sequence number - acknowledgmentPkt.setAckSequenceNumber(++ackSequenceNumber); - acknowledgmentPkt.setRoundTripTime(roundTripTime); - acknowledgmentPkt.setRoundTripTimeVar(roundTripTimeVar); - //set the buffer size - acknowledgmentPkt.setBufferSize(bufferSize); - - acknowledgmentPkt.setDestinationID(session.getDestination().getSocketID()); - acknowledgmentPkt.setSession(session); - - return acknowledgmentPkt; - } - - /** - * spec p. 13:
- 1) Locate the related ACK in the ACK History Window according to the - ACK sequence number in this ACK2.
- 2) Update the largest ACK number ever been acknowledged.
- 3) Calculate new rtt according to the ACK2 arrival time and the ACK - departure time, and update the RTT value as: RTT = (RTT * 7 + - rtt) / 8.
- 4) Update RTTVar by: RTTVar = (RTTVar * 3 + abs(RTT - rtt)) / 4.
- 5) Update both ACK and NAK period to 4 * RTT + RTTVar + SYN.
- */ - protected void onAck2PacketReceived(Acknowledgment2 ack2){ - AckHistoryEntry entry=ackHistoryWindow.getEntry(ack2.getAckSequenceNumber()); - if(entry!=null){ - long ackNumber=entry.getAckNumber(); - largestAcknowledgedAckNumber=Math.max(ackNumber, largestAcknowledgedAckNumber); - - long rtt=entry.getAge(); - if(roundTripTime>0)roundTripTime = (roundTripTime*7 + rtt)/8; - else roundTripTime = rtt; - roundTripTimeVar = (roundTripTimeVar* 3 + Math.abs(roundTripTimeVar- rtt)) / 4; - ackTimerInterval=4*roundTripTime+roundTripTimeVar+Util.getSYNTime(); - nakTimerInterval=ackTimerInterval; - statistics.setRTT(roundTripTime, roundTripTimeVar); - } - } - - protected void sendKeepAlive()throws IOException{ - KeepAlive ka=new KeepAlive(); - ka.setDestinationID(session.getDestination().getSocketID()); - ka.setSession(session); - endpoint.doSend(ka); - } - - protected void sendShutdown()throws IOException{ - Shutdown s=new Shutdown(); - s.setDestinationID(session.getDestination().getSocketID()); - s.setSession(session); - endpoint.doSend(s); - } - - private volatile long ackSequenceNumber=0; - - protected void resetEXPTimer(){ - nextEXP=Util.getCurrentTime()+expTimerInterval; - expCount=0; - } - - protected void resetEXPCount(){ - expCount=0; - } - - public void setAckInterval(long ackInterval){ - this.ackInterval=ackInterval; - } - - protected void onShutdown()throws IOException{ - stop(); - } - - public void stop()throws IOException{ - stopped=true; - session.getSocket().close(); - //stop our sender as well - session.getSocket().getSender().stop(); - } - - @Override - public String toString(){ - StringBuilder sb=new StringBuilder(); - sb.append("UDTReceiver ").append(session).append("\n"); - sb.append("LossList: "+receiverLossList); - return sb.toString(); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ce/80357b80dfad00171536fea4e2c2e8be b/.metadata/.plugins/org.eclipse.core.resources/.history/ce/80357b80dfad00171536fea4e2c2e8be deleted file mode 100644 index 1c167f9..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ce/80357b80dfad00171536fea4e2c2e8be +++ /dev/null @@ -1,523 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - // cd - private volatile int bufferNum=0; - private volatile boolean isModify=true; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - // - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/cf/407ed953c3ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/cf/407ed953c3ad0017181ed9113883eda9 deleted file mode 100644 index e98f7bb..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/cf/407ed953c3ad0017181ed9113883eda9 +++ /dev/null @@ -1,493 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d0/4051a3aee0ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/d0/4051a3aee0ac001716b9ca6d5abb90bc deleted file mode 100644 index b1668d4..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d0/4051a3aee0ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,150 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=10*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - long startTime=System.currentTimeMillis(); - while((count=dis.read(buf,0, bufSize))!=-1) - { - - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - - } - long end=System.currentTimeMillis(); - client.close(); - dis.close(); - log.info("ɣ"+f.getName()+",ƽٶȣ"+); - - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d0/605e9939b5ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/d0/605e9939b5ac001716b9ca6d5abb90bc deleted file mode 100644 index 1b170e5..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d0/605e9939b5ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,355 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.DatagramPacket; -import java.net.DatagramSocket; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.SocketTimeoutException; -import java.net.UnknownHostException; -import java.util.Collection; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.SynchronousQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.PacketFactory; -import udt.util.UDTThreadFactory; - -/** - * the UDPEndpoint takes care of sending and receiving UDP network packets, - * dispatching them to the correct {@link UDTSession} - */ -public class UDPEndPoint { - - private static final Logger logger=Logger.getLogger(ClientSession.class.getName()); - - private final int port; - - private final DatagramSocket dgSocket; - - //active sessions keyed by socket ID - private final Mapsessions=new ConcurrentHashMap(); - - //last received packet - private UDTPacket lastPacket; - - //if the endpoint is configured for a server socket, - //this queue is used to handoff new UDTSessions to the application - private final SynchronousQueue sessionHandoff=new SynchronousQueue(); - - private boolean serverSocketMode=false; - - //has the endpoint been stopped? - private volatile boolean stopped=false; - - public static final int DATAGRAM_SIZE=1400; - - private volatile int sessionnum=0;//cd ʱͳ - - /** - * create an endpoint on the given socket - * - * @param socket - a UDP datagram socket - */ - public UDPEndPoint(DatagramSocket socket){ - this.dgSocket=socket; - port=dgSocket.getLocalPort(); - } - - /** - * bind to any local port on the given host address - * @param localAddress - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress)throws SocketException, UnknownHostException{ - this(localAddress,0); - } - - /** - * Bind to the given address and port - * @param localAddress - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress, int localPort)throws SocketException, UnknownHostException{ - if(localAddress==null){ - dgSocket=new DatagramSocket(localPort, localAddress); - }else{ - dgSocket=new DatagramSocket(localPort); - } - if(localPort>0)this.port = localPort; - else port=dgSocket.getLocalPort(); - - //set a time out to avoid blocking in doReceive() - dgSocket.setSoTimeout(100000); - //buffer size - dgSocket.setReceiveBufferSize(128*1024); - } - - /** - * bind to the default network interface on the machine - * - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(int localPort)throws SocketException, UnknownHostException{ - this(null,localPort); - } - - /** - * bind to an ephemeral port on the default network interface on the machine - * - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint()throws SocketException, UnknownHostException{ - this(null,0); - } - - /** - * start the endpoint. If the serverSocketModeEnabled flag is true, - * a new connection can be handed off to an application. The application needs to - * call #accept() to get the socket - * @param serverSocketModeEnabled - */ - public void start(boolean serverSocketModeEnabled){ - serverSocketMode=serverSocketModeEnabled; - //start receive thread - Runnable receive=new Runnable(){ - @Override - public void run(){ - try{ - doReceive(); - }catch(Exception ex){ - logger.log(Level.WARNING,"",ex); - } - } - }; - Thread t=UDTThreadFactory.get().newThread(receive); - t.setDaemon(true); - t.start(); - logger.info("UDTEndpoint started."); - } - - public void start(){ - start(false); - } - - public void stop(){ - stopped=true; - dgSocket.close(); - } - - /** - * @return the port which this client is bound to - */ - public int getLocalPort() { - return this.dgSocket.getLocalPort(); - } - /** - * @return Gets the local address to which the socket is bound - */ - public InetAddress getLocalAddress(){ - return this.dgSocket.getLocalAddress(); - } - - DatagramSocket getSocket(){ - return dgSocket; - } - - UDTPacket getLastPacket(){ - return lastPacket; - } - - public void addSession(Long destinationID,UDTSession session){ - logger.info("Storing session <"+destinationID+">"); - sessionnum++; - sessions.put(destinationID, session); - } - - public UDTSession getSession(Long destinationID){ - return sessions.get(destinationID); - } - - /** - * Ƴsession - * cd - * @param socketid - * @return - */ - public UDTSession removeSession(long socketid) - { - //cd - sessionnum--; - logger.info("Storing Sessionnum:"+sessionnum); - return sessions.remove(socketid); - } - public Collection getSessions(){ - return sessions.values(); - } - - /** - * wait the given time for a new connection - * @param timeout - the time to wait - * @param unit - the {@link TimeUnit} - * @return a new {@link UDTSession} - * @throws InterruptedException - */ - protected UDTSession accept(long timeout, TimeUnit unit)throws InterruptedException{ - return sessionHandoff.poll(timeout, unit); - } - - - final DatagramPacket dp= new DatagramPacket(new byte[DATAGRAM_SIZE],DATAGRAM_SIZE); - - /** - * single receive, run in the receiverThread, see {@link #start()} - *
    - *
  • Receives UDP packets from the network
  • - *
  • Converts them to UDT packets
  • - *
  • dispatches the UDT packets according to their destination ID.
  • - *
- * @throws IOException - */ - private long lastDestID=-1; - private UDTSession lastSession; - - //MeanValue v=new MeanValue("receiver processing ",true, 256); - - private int n=0; - - private final Object lock=new Object(); - - protected void doReceive()throws IOException{ - while(!stopped){ - try{ - try{ - //v.end(); - - //will block until a packet is received or timeout has expired - dgSocket.receive(dp); - - //v.begin(); - - Destination peer=new Destination(dp.getAddress(), dp.getPort()); - int l=dp.getLength(); - UDTPacket packet=PacketFactory.createPacket(dp.getData(),l); - lastPacket=packet; - - //handle connection handshake - if(packet.isConnectionHandshake()){ - synchronized(lock){ - Long id=Long.valueOf(packet.getDestinationID()); - UDTSession session=sessions.get(id); - if(session==null){ - session=new ServerSession(dp,this); - addSession(session.getSocketID(),session); - //TODO need to check peer to avoid duplicate server session - if(serverSocketMode){ - logger.fine("Pooling new request."); - sessionHandoff.put(session); - logger.fine("Request taken for processing."); - } - } - peer.setSocketID(((ConnectionHandshake)packet).getSocketID()); - session.received(packet,peer); - } - } - else{ - //dispatch to existing session - long dest=packet.getDestinationID(); - UDTSession session; - if(dest==lastDestID){ - session=lastSession; - } - else{ - session=sessions.get(dest); - lastSession=session; - lastDestID=dest; - } - if(session==null){ - n++; - if(n%100==1){ - logger.warning("Unknown session <"+dest+"> requested from <"+peer+"> packet type "+packet.getClass().getName()); - } - } - else{ - session.received(packet,peer); - logger.log(Level.INFO, ": "+packet.getPacketSequenceNumber());; - } - } - }catch(SocketException ex){ - if(ex.getMessage().equals("socket closed")&&stopped) - { - //Ѿر - } - else - { - logger.log(Level.INFO, "SocketException: "+ex.getMessage()); - } - }catch(SocketTimeoutException ste){ - //can safely ignore... we will retry until the endpoint is stopped - } - - }catch(Exception ex){ - logger.log(Level.WARNING, "Got: "+ex.getMessage(),ex); - } - } - } - - protected void doSend(UDTPacket packet)throws IOException{ - byte[]data=packet.getEncoded(); - DatagramPacket dgp = packet.getSession().getDatagram(); - dgp.setData(data); - dgSocket.send(dgp); - } - - @Override - public String toString(){ - return "UDPEndpoint port="+port; - } - - public void sendRaw(DatagramPacket p)throws IOException{ - dgSocket.send(p); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d0/80a9ccb923ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/d0/80a9ccb923ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 5917b29..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d0/80a9ccb923ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,320 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public boolean getCloseState() -{ - return isClose; -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readData() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} -/** - * - * ݲܷ - */ -public boolean sendSplitData(byte[]data) { - if(isClose) - { - return false; - } - byte[][]result=PackagetSub.split(data); - for(int i=0;i hash=new ConcurrentHashMap(); -// private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - // - if(!list.isEmpty()) - { - for(int i=0;i hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - // - if(!list.isEmpty()) - { - for(int i=0;isendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) -// { -// //ȵǰͰ cd -// lastAckSequenceNumber=ackNumber; -// } - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d2/40fe2bd9d5ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/d2/40fe2bd9d5ac001716b9ca6d5abb90bc deleted file mode 100644 index 7fe262a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d2/40fe2bd9d5ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,265 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡ - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(islagerRead) - { - // cd Ϊݶȡ׼ - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - } - else - { - //ԭ룬Сݽȫ - buffer[insert]=data; - numValidChunks.incrementAndGet(); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d2/7022b67821ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/d2/7022b67821ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 0e84b09..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d2/7022b67821ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,290 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private long start=System.currentTimeMillis(); -private boolean isClose=false; -private long readLen=0;//ȡ -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private static final Logger logger=Logger.getLogger(judpSocket.class.getName()); -private PackagetCombin pack=new PackagetCombin(); -public boolean getCloseState() -{ - return isClose; -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readData() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - - -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - flushTime=System.currentTimeMillis(); - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} -public String getRemoteHost() { -return socket.getSession().getDestination().getAddress().getHostName(); - -} -public int getRemotePort() { - return socket.getSession().getDestination().getPort(); -} -public long getID() { - - return socketID; -} - - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d2/70c87e2e6aa800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/d2/70c87e2e6aa800171a8482560d609ceb deleted file mode 100644 index 1fbeb78..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d2/70c87e2e6aa800171a8482560d609ceb +++ /dev/null @@ -1,104 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); -// private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - // - if(!list.isEmpty()) - { - for(int i=0;i hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - - - } - - }) - -} - -public static synchronized SocketControls getInstance() { - - if (instance == null) { - - instance = new SocketControls(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d3/302bfa4709ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/d3/302bfa4709ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 5b17470..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d3/302bfa4709ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,100 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.util.HashMap; -import java.util.WeakHashMap; - -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - @SuppressWarnings("rawtypes") - private final ReferenceQueue q = new ReferenceQueue(); - private volatile long num=0; - /** - * ʹ - */ - private final WeakHashMap hashMap=new WeakHashMap (); - private final HashMap,Long> map=new HashMap,Long> (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @SuppressWarnings("unchecked") - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("socket"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - map.put(tmp, socket.getSocketID()); - if(num%200==0) - { - System.gc(); - } - num++; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d3/403ff763c5ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/d3/403ff763c5ad0017181ed9113883eda9 deleted file mode 100644 index 3b2da96..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d3/403ff763c5ad0017181ed9113883eda9 +++ /dev/null @@ -1,522 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - // cd - private volatile int bufferNum=0; - private volatile boolean isModify=true; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - // - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d3/f093a187a2ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/d3/f093a187a2ad0017181ed9113883eda9 deleted file mode 100644 index 0e78749..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d3/f093a187a2ad0017181ed9113883eda9 +++ /dev/null @@ -1,79 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.StringReader; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; -import org.w3c.dom.NodeList; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - -/** - * @author jinyu - * - */ -public class ReadXml { -public String readXml(String file) -{ - File f=new File(file); - if(!f.exists()) - { - return ""; - } - // - String xmlStr= readFile(file); - StringReader sr = new StringReader(xmlStr); - InputSource is = new InputSource(sr); - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - DocumentBuilder builder = null; - try { - builder = factory.newDocumentBuilder(); - } catch (ParserConfigurationException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - Document doc = null; - try { - doc = (Document) builder.parse(is); - } catch (SAXException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - NodeList list=doc.getElementsByTagName("IP"); - String ip= list.item(0).getTextContent(); - list=doc.getElementsByTagName("Port"); - String port=list.item(0).getTextContent(); - list=doc.getElementsByTagName("Dir"); - String dir=list.item(0).getTextContent(); - String strxml=ip+","+port+","+dir; - return strxml; - } -private String readFile(String file) -{ - StringBuilder result = new StringBuilder(); - try{ - BufferedReader br = new BufferedReader(new FileReader(file));//һBufferedReaderȡļ - String s = null; - while((s = br.readLine())!=null){//ʹreadLineһζһ - result.append(System.lineSeparator()+s); - } - br.close(); - }catch(Exception e){ - e.printStackTrace(); - } - return result.toString(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d4/40c49ebde0ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/d4/40c49ebde0ac001716b9ca6d5abb90bc deleted file mode 100644 index 0f2d6d4..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d4/40c49ebde0ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,150 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=10*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - long startTime=System.currentTimeMillis(); - while((count=dis.read(buf,0, bufSize))!=-1) - { - - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - - } - long endTime=System.currentTimeMillis(); - client.close(); - dis.close(); - long speed=fLen/((endTime-startTime)/1000); - log.info("ɣ"+f.getName()+",ƽٶ(M/S)"+speed/1024/1024); - - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d4/d0f62a8bf7ab001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/d4/d0f62a8bf7ab001710ff8a7c6bda0fb8 deleted file mode 100644 index 7ebe20f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d4/d0f62a8bf7ab001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,83 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public UDTSocket getSocket() -{ - - int index=-1; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(index==-1) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳ - index=i; - i=-1;//± - - } - } - else - { - // - if(i==index) - { - continue; - } - else - { - list.get(i).close(); - long id=list.get(i).getSession().getSocketID(); - list.get(i).getEndpoint().removeSession(id); - list.get(i).getReceiver().stop(); - list.get(i).getSender().stop(); - } - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - if(index!=-1) - { - return list.get(index); - } - return null; - -} -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d5/0093b68423ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/d5/0093b68423ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 7a3eb7b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d5/0093b68423ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,322 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public boolean getCloseState() -{ - return isClose; -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readData() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} -/** - * - * ݲܷ - */ -public boolean sendSplitData(byte[]data) { - if(isClose) - { - return false; - } - try { - - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} -/** - * ȡԶhost - * @return - */ -public String getRemoteHost() { -return socket.getSession().getDestination().getAddress().getHostName(); - -} - -/** - * ȡԶ˶˿ - * @return - */ -public int getRemotePort() { - return socket.getSession().getDestination().getPort(); -} - -/** - * socketid - * @return - */ -public long getID() { - - return socketID; -} - - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d5/20908afcb3ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/d5/20908afcb3ad0017181ed9113883eda9 deleted file mode 100644 index e26ca3e..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d5/20908afcb3ad0017181ed9113883eda9 +++ /dev/null @@ -1,515 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - - } - - } - - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d5/30a55330acac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/d5/30a55330acac001716b9ca6d5abb90bc deleted file mode 100644 index b8a71dd..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d5/30a55330acac001716b9ca6d5abb90bc +++ /dev/null @@ -1,155 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.UnsupportedEncodingException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=8*65535; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - while((count=dis.read(buf,0, bufSize))!=-1) - { - log.info("1:"); - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - log.info(":"+sum); - - } - client.close(); - dis.close(); - log.info("ɣ"+f.getName()); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d5/40cbe317ccac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/d5/40cbe317ccac001716b9ca6d5abb90bc deleted file mode 100644 index 915604d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d5/40cbe317ccac001716b9ca6d5abb90bc +++ /dev/null @@ -1,193 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isReadMaster=true; - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - buffer[insert]=data; - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else return null; - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - /** - * ظ - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d5/50968f281cac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/d5/50968f281cac001710ff8a7c6bda0fb8 deleted file mode 100644 index fed315a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d5/50968f281cac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,32 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] data; -public long id; -public DataStruct(int num) -{ - data=new byte[num][]; -} -public void addData(byte[]data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - int index=buf.getInt(); - dataLen=buf.getInt(); - byte[] tmp=new byte[buf.limit()-buf.position()]; - buf.get(tmp); - data[index]=tmp; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d6/b09d47221cac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/d6/b09d47221cac001710ff8a7c6bda0fb8 deleted file mode 100644 index 8b4dab8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d6/b09d47221cac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,28 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] data; -public long id; -public DataStruct(int num) -{ - data=new byte[num][]; -} -public void addData(byte[]data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - int index=buf.getInt(); - dataLen=buf.getInt(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d7/004317ff64a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/d7/004317ff64a800171a8482560d609ceb deleted file mode 100644 index 0f87dc0..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d7/004317ff64a800171a8482560d609ceb +++ /dev/null @@ -1,59 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - - - } - - }); - - -} - -public static synchronized SocketControls getInstance() { - - if (instance == null) { - - instance = new SocketControls(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d7/60d73d281dac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/d7/60d73d281dac001710ff8a7c6bda0fb8 deleted file mode 100644 index d0eeb67..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d7/60d73d281dac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,53 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] buffer=null; -public long id; -private volatile int num=0; -private volatile int sum=0; -private byte[] result=null; -public DataStruct(int num) -{ - buffer=new byte[num][]; -} -private boolean check() -{ - if(num>=buffer.length) - { - //ɹ - if(sum==dataLen) - { - //ʼ - for(int i=0;isessions=new ConcurrentHashMap(); - - //last received packet - private UDTPacket lastPacket; - - //if the endpoint is configured for a server socket, - //this queue is used to handoff new UDTSessions to the application - private final SynchronousQueue sessionHandoff=new SynchronousQueue(); - - private boolean serverSocketMode=false; - - //has the endpoint been stopped? - private volatile boolean stopped=false; - - public static final int DATAGRAM_SIZE=1400; - - private volatile int sessionnum=0;//cd ʱͳ - - /** - * create an endpoint on the given socket - * - * @param socket - a UDP datagram socket - */ - public UDPEndPoint(DatagramSocket socket){ - this.dgSocket=socket; - port=dgSocket.getLocalPort(); - } - - /** - * bind to any local port on the given host address - * @param localAddress - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress)throws SocketException, UnknownHostException{ - this(localAddress,0); - } - - /** - * Bind to the given address and port - * @param localAddress - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(InetAddress localAddress, int localPort)throws SocketException, UnknownHostException{ - if(localAddress==null){ - dgSocket=new DatagramSocket(localPort, localAddress); - }else{ - dgSocket=new DatagramSocket(localPort); - } - if(localPort>0)this.port = localPort; - else port=dgSocket.getLocalPort(); - - //set a time out to avoid blocking in doReceive() - dgSocket.setSoTimeout(100000); - //buffer size - dgSocket.setReceiveBufferSize(128*1024); - } - - /** - * bind to the default network interface on the machine - * - * @param localPort - the port to bind to. If the port is zero, the system will pick an ephemeral port. - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint(int localPort)throws SocketException, UnknownHostException{ - this(null,localPort); - } - - /** - * bind to an ephemeral port on the default network interface on the machine - * - * @throws SocketException - * @throws UnknownHostException - */ - public UDPEndPoint()throws SocketException, UnknownHostException{ - this(null,0); - } - - /** - * start the endpoint. If the serverSocketModeEnabled flag is true, - * a new connection can be handed off to an application. The application needs to - * call #accept() to get the socket - * @param serverSocketModeEnabled - */ - public void start(boolean serverSocketModeEnabled){ - serverSocketMode=serverSocketModeEnabled; - //start receive thread - Runnable receive=new Runnable(){ - @Override - public void run(){ - try{ - doReceive(); - }catch(Exception ex){ - logger.log(Level.WARNING,"",ex); - } - } - }; - Thread t=UDTThreadFactory.get().newThread(receive); - t.setDaemon(true); - t.start(); - logger.info("UDTEndpoint started."); - } - - public void start(){ - start(false); - } - - public void stop(){ - stopped=true; - dgSocket.close(); - } - - /** - * @return the port which this client is bound to - */ - public int getLocalPort() { - return this.dgSocket.getLocalPort(); - } - /** - * @return Gets the local address to which the socket is bound - */ - public InetAddress getLocalAddress(){ - return this.dgSocket.getLocalAddress(); - } - - DatagramSocket getSocket(){ - return dgSocket; - } - - UDTPacket getLastPacket(){ - return lastPacket; - } - - public void addSession(Long destinationID,UDTSession session){ - logger.info("Storing session <"+destinationID+">"); - sessionnum++; - sessions.put(destinationID, session); - } - - public UDTSession getSession(Long destinationID){ - return sessions.get(destinationID); - } - - /** - * Ƴsession - * cd - * @param socketid - * @return - */ - public UDTSession removeSession(long socketid) - { - //cd - sessionnum--; - logger.info("Storing Sessionnum:"+sessionnum); - return sessions.remove(socketid); - } - public Collection getSessions(){ - return sessions.values(); - } - - /** - * wait the given time for a new connection - * @param timeout - the time to wait - * @param unit - the {@link TimeUnit} - * @return a new {@link UDTSession} - * @throws InterruptedException - */ - protected UDTSession accept(long timeout, TimeUnit unit)throws InterruptedException{ - return sessionHandoff.poll(timeout, unit); - } - - - final DatagramPacket dp= new DatagramPacket(new byte[DATAGRAM_SIZE],DATAGRAM_SIZE); - - /** - * single receive, run in the receiverThread, see {@link #start()} - *
    - *
  • Receives UDP packets from the network
  • - *
  • Converts them to UDT packets
  • - *
  • dispatches the UDT packets according to their destination ID.
  • - *
- * @throws IOException - */ - private long lastDestID=-1; - private UDTSession lastSession; - - //MeanValue v=new MeanValue("receiver processing ",true, 256); - - private int n=0; - - private final Object lock=new Object(); - - protected void doReceive()throws IOException{ - while(!stopped){ - try{ - try{ - //v.end(); - - //will block until a packet is received or timeout has expired - dgSocket.receive(dp); - - //v.begin(); - - Destination peer=new Destination(dp.getAddress(), dp.getPort()); - int l=dp.getLength(); - UDTPacket packet=PacketFactory.createPacket(dp.getData(),l); - lastPacket=packet; - - //handle connection handshake - if(packet.isConnectionHandshake()){ - synchronized(lock){ - Long id=Long.valueOf(packet.getDestinationID()); - UDTSession session=sessions.get(id); - if(session==null){ - session=new ServerSession(dp,this); - addSession(session.getSocketID(),session); - //TODO need to check peer to avoid duplicate server session - if(serverSocketMode){ - logger.fine("Pooling new request."); - sessionHandoff.put(session); - logger.fine("Request taken for processing."); - } - } - peer.setSocketID(((ConnectionHandshake)packet).getSocketID()); - session.received(packet,peer); - } - } - else{ - //dispatch to existing session - long dest=packet.getDestinationID(); - UDTSession session; - if(dest==lastDestID){ - session=lastSession; - } - else{ - session=sessions.get(dest); - lastSession=session; - lastDestID=dest; - } - if(session==null){ - n++; - if(n%100==1){ - logger.warning("Unknown session <"+dest+"> requested from <"+peer+"> packet type "+packet.getClass().getName()); - } - } - else{ - session.received(packet,peer); - logger.log(Level.INFO, ": "+packet.getPacketSequenceNumber()); - } - } - }catch(SocketException ex){ - if(ex.getMessage().equals("socket closed")&&stopped) - { - //Ѿر - } - else - { - logger.log(Level.INFO, "SocketException: "+ex.getMessage()); - } - }catch(SocketTimeoutException ste){ - //can safely ignore... we will retry until the endpoint is stopped - } - - }catch(Exception ex){ - logger.log(Level.WARNING, "Got: "+ex.getMessage(),ex); - } - } - } - - protected void doSend(UDTPacket packet)throws IOException{ - byte[]data=packet.getEncoded(); - DatagramPacket dgp = packet.getSession().getDatagram(); - dgp.setData(data); - dgSocket.send(dgp); - } - - @Override - public String toString(){ - return "UDPEndpoint port="+port; - } - - public void sendRaw(DatagramPacket p)throws IOException{ - dgSocket.send(p); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d7/f0ad1fce60ac00171ca19969f19d2325 b/.metadata/.plugins/org.eclipse.core.resources/.history/d7/f0ad1fce60ac00171ca19969f19d2325 deleted file mode 100644 index 4c5925c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d7/f0ad1fce60ac00171ca19969f19d2325 +++ /dev/null @@ -1,248 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public int dataLen=0; - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - System.out.println("sendBlocking start"); - client.sendBlocking(data); - r=data.length; - sumLen+=r; - System.out.println("sendBlocking end"); - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData=null; - if(dataLen==0) - { - sendData=PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - sendData=sub.split(data, dataLen); - } - for(int i=0;i20) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,infobytes.length,PackagetCharSet.CharSet); - if(!serverinfp.equals("initServer:"+f.getName())) - { - client.close(); - return; - } - //client.decreNum(); - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - //ByteBuffer buffer=ByteBuffer.wrap(buf); - - while((count=dis.read(buf,0, bufSize))!=-1) - { - if(count==bufSize) - { - client.sendData(buf); - } - else - { - byte[] tmp=new byte[count+name.length+4]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - } - - } - client.close(); - dis.close(); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d8/f00b8baa06ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/d8/f00b8baa06ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 01bcb6b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d8/f00b8baa06ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,34 +0,0 @@ -/** - * - */ -package judp; - - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; - -/** - * @author jinyu - * @param - * - */ -public class SocketReference extends WeakReference { - private long socketid=-1; - public SocketReference(T referent) { - super(referent); - - } - public SocketReference(T referent,long id) { - super(referent); - this.socketid=id; - } - @SuppressWarnings("rawtypes") - public SocketReference(T referent, long id, ReferenceQueue q) { - super(referent,q); - this.socketid=id; - } - public long getid() - { - return socketid; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d8/f05963bc23ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/d8/f05963bc23ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 7cc0510..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d8/f05963bc23ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,324 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public boolean getCloseState() -{ - return isClose; -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readData() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} -/** - * - * ݲܷ - */ -public boolean sendSplitData(byte[]data) { - if(isClose) - { - return false; - } - byte[][]result=PackagetSub.split(data); - for(int i=0;isendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - // - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d9/b057cfe669a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/d9/b057cfe669a800171a8482560d609ceb deleted file mode 100644 index 873fe61..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d9/b057cfe669a800171a8482560d609ceb +++ /dev/null @@ -1,113 +0,0 @@ -/** - * - */ -package judp; - -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.SynchronousQueue; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean Start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - //judpSocket jsocket=new judpSocket(csocket); - - //SocketManager.getInstance().addGC(jsocket,csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - - } - judpSocket jsocket=new judpSocket(socket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d9/c009708fd7ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/d9/c009708fd7ac001716b9ca6d5abb90bc deleted file mode 100644 index d830bfb..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d9/c009708fd7ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,121 +0,0 @@ -/** - * - */ -package judp; - -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -//private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} - -/** - * - * @param port ˿ - */ -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - * @param localIP IP - * @param port ˿ - */ -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=SocketControls.getInstance().getSocket(); - } - judpSocket jsocket=new judpSocket(socket); - judpSocketManager.getInstance(socket.getEndpoint()).addSocket(jsocket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d9/d0c9f45526ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/d9/d0c9f45526ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 097beec..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d9/d0c9f45526ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,89 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=16; - public static byte[][] splitData(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;ihandoffQueue; - - private Thread receiverThread; - - private volatile boolean stopped=false; - - //(optional) ack interval (see CongestionControl interface) - private volatile long ackInterval=-1; - - /** - * if set to true connections will not expire, but will only be - * closed by a Shutdown message - */ - public static boolean connectionExpiryDisabled=false; - - private final boolean storeStatistics; - - - - /** - * create a receiver with a valid {@link UDTSession} - * @param session - */ - public UDTReceiver(UDTSession session,UDPEndPoint endpoint){ - this.endpoint = endpoint; - this.session=session; - this.sessionUpSince=System.currentTimeMillis(); - this.statistics=session.getStatistics(); - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - ackHistoryWindow = new AckHistoryWindow(16); - packetHistoryWindow = new PacketHistoryWindow(16); - receiverLossList = new ReceiverLossList(); - packetPairWindow = new PacketPairWindow(16); - largestReceivedSeqNumber=session.getInitialSequenceNumber()-1; - bufferSize=session.getReceiveBufferSize(); - handoffQueue=new ArrayBlockingQueue(4*session.getFlowWindowSize()); - storeStatistics=Boolean.getBoolean("udt.receiver.storeStatistics"); - initMetrics(); - start(); - } - - private MeanValue dgReceiveInterval; - private MeanValue dataPacketInterval; - private MeanValue processTime; - private MeanValue dataProcessTime; - private void initMetrics(){ - if(!storeStatistics)return; - dgReceiveInterval=new MeanValue("UDT receive interval"); - statistics.addMetric(dgReceiveInterval); - dataPacketInterval=new MeanValue("Data packet interval"); - statistics.addMetric(dataPacketInterval); - processTime=new MeanValue("UDT packet process time"); - statistics.addMetric(processTime); - dataProcessTime=new MeanValue("Data packet process time"); - statistics.addMetric(dataProcessTime); - } - - - //starts the sender algorithm - private void start(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - nextACK=Util.getCurrentTime()+ackTimerInterval; - nextNAK=(long)(Util.getCurrentTime()+1.5*nakTimerInterval); - nextEXP=Util.getCurrentTime()+2*expTimerInterval; - ackInterval=session.getCongestionControl().getAckInterval(); - while(!stopped){ - receiverAlgorithm(); - } - } - catch(Exception ex){ - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING RECEIVER for "+session); - } - }; - receiverThread=UDTThreadFactory.get().newThread(r); - receiverThread.start(); - } - - /* - * packets are written by the endpoint - */ - protected void receive(UDTPacket p)throws IOException{ - if(storeStatistics)dgReceiveInterval.end(); - handoffQueue.offer(p); - if(storeStatistics)dgReceiveInterval.begin(); - } - - /** - * receiver algorithm - * see specification P11. - */ - public void receiverAlgorithm()throws InterruptedException,IOException{ - //check ACK timer - long currentTime=Util.getCurrentTime(); - if(nextACKseqNumbers=receiverLossList.getFilteredSequenceNumbers(roundTripTime,true); - sendNAK(seqNumbers); - } - - /** - * process EXP event (see spec. p 13) - */ - protected void processEXPEvent()throws IOException{ - if(session.getSocket()==null)return; - UDTSender sender=session.getSocket().getSender(); - //put all the unacknowledged packets in the senders loss list - sender.putUnacknowledgedPacketsIntoLossList(); - if(expCount>16 && System.currentTimeMillis()-sessionUpSince > IDLE_TIMEOUT){ - if(!connectionExpiryDisabled &&!stopped){ - sendShutdown(); - stop(); - logger.info("Session "+session+" expired."); - return; - } - } - if(!sender.haveLostPackets()){ - sendKeepAlive(); - } - expCount++; - } - - protected void processUDTPacket(UDTPacket p)throws IOException{ - //(3).Check the packet type and process it according to this. - - if(!p.isControlPacket()){ - DataPacket dp=(DataPacket)p; - if(storeStatistics){ - dataPacketInterval.end(); - dataProcessTime.begin(); - } - onDataPacketReceived(dp); - if(storeStatistics){ - dataProcessTime.end(); - dataPacketInterval.begin(); - } - logger.info("DataPacket udt:"+p.getPacketSequenceNumber()); - } - - else if (p.getControlPacketType()==ControlPacketType.ACK2.ordinal()){ - Acknowledgment2 ack2=(Acknowledgment2)p; - onAck2PacketReceived(ack2); - } - - else if (p instanceof Shutdown){ - onShutdown(); - } - - } - - //every nth packet will be discarded... for testing only of course - public static int dropRate=0; - - //number of received data packets - private int n=0; - - protected void onDataPacketReceived(DataPacket dp)throws IOException{ - long currentSequenceNumber = dp.getPacketSequenceNumber(); - - //for TESTING : check whether to drop this packet -// n++; -// //if(dropRate>0 && n % dropRate == 0){ -// if(n % 1111 == 0){ -// logger.info("**** TESTING:::: DROPPING PACKET "+currentSequenceNumber+" FOR TESTING"); -// return; -// } -// //} - boolean OK=session.getSocket().getInputStream().haveNewData(currentSequenceNumber,dp.getData()); - if(!OK){ - //need to drop packet... - return; - } - - long currentDataPacketArrivalTime = Util.getCurrentTime(); - - /*(4).if the seqNo of the current data packet is 16n+1,record the - time interval between this packet and the last data packet - in the packet pair window*/ - if((currentSequenceNumber%16)==1 && lastDataPacketArrivalTime>0){ - long interval=currentDataPacketArrivalTime -lastDataPacketArrivalTime; - packetPairWindow.add(interval); - } - - //(5).record the packet arrival time in the PKT History Window. - packetHistoryWindow.add(currentDataPacketArrivalTime); - - - //store current time - lastDataPacketArrivalTime=currentDataPacketArrivalTime; - - - //(6).number of detected lossed packet - /*(6.a).if the number of the current data packet is greater than LSRN+1, - put all the sequence numbers between (but excluding) these two values - into the receiver's loss list and send them to the sender in an NAK packet*/ - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber+1)>0){ - sendNAK(currentSequenceNumber); - logger.info("sendNAK:"+currentSequenceNumber); - } - else if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)<0){ - /*(6.b).if the sequence number is less than LRSN,remove it from - * the receiver's loss list - */ - receiverLossList.remove(currentSequenceNumber); - logger.info("receiverLossList remove:"+currentSequenceNumber); - } - - statistics.incNumberOfReceivedDataPackets(); - - //(7).Update the LRSN - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)>0){ - largestReceivedSeqNumber=currentSequenceNumber; - } - - //(8) need to send an ACK? Some cc algorithms use this - if(ackInterval>0){ - if(n % ackInterval == 0)processACKEvent(false); - } - } - - /** - * write a NAK triggered by a received sequence number that is larger than - * the largestReceivedSeqNumber + 1 - * @param currentSequenceNumber - the currently received sequence number - * @throws IOException - */ - protected void sendNAK(long currentSequenceNumber)throws IOException{ - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(largestReceivedSeqNumber+1, currentSequenceNumber); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - //put all the sequence numbers between (but excluding) these two values into the - //receiver loss list - for(long i=largestReceivedSeqNumber+1;isequenceNumbers)throws IOException{ - if(sequenceNumbers.size()==0)return; - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(sequenceNumbers); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(nAckPacket); - statistics.incNumberOfNAKSent(); - logger.info("sendNAK List:"+sequenceNumbers.size()); - } - - protected long sendLightAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt=buildLightAcknowledgement(ackNumber); - endpoint.doSend(acknowledgmentPkt); - statistics.incNumberOfACKSent(); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - protected long sendAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); - //set the estimate link capacity - estimateLinkCapacity=packetPairWindow.getEstimatedLinkCapacity(); - acknowledgmentPkt.setEstimatedLinkCapacity(estimateLinkCapacity); - //set the packet arrival rate - packetArrivalSpeed=packetHistoryWindow.getPacketArrivalSpeed(); - acknowledgmentPkt.setPacketReceiveRate(packetArrivalSpeed); - - endpoint.doSend(acknowledgmentPkt); - - statistics.incNumberOfACKSent(); - statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - //builds a "light" Acknowledgement - private Acknowledgement buildLightAcknowledgement(long ackNumber){ - Acknowledgement acknowledgmentPkt = new Acknowledgement(); - //the packet sequence number to which all the packets have been received - acknowledgmentPkt.setAckNumber(ackNumber); - //assign this ack a unique increasing ACK sequence number - acknowledgmentPkt.setAckSequenceNumber(++ackSequenceNumber); - acknowledgmentPkt.setRoundTripTime(roundTripTime); - acknowledgmentPkt.setRoundTripTimeVar(roundTripTimeVar); - //set the buffer size - acknowledgmentPkt.setBufferSize(bufferSize); - - acknowledgmentPkt.setDestinationID(session.getDestination().getSocketID()); - acknowledgmentPkt.setSession(session); - - return acknowledgmentPkt; - } - - /** - * spec p. 13:
- 1) Locate the related ACK in the ACK History Window according to the - ACK sequence number in this ACK2.
- 2) Update the largest ACK number ever been acknowledged.
- 3) Calculate new rtt according to the ACK2 arrival time and the ACK - departure time, and update the RTT value as: RTT = (RTT * 7 + - rtt) / 8.
- 4) Update RTTVar by: RTTVar = (RTTVar * 3 + abs(RTT - rtt)) / 4.
- 5) Update both ACK and NAK period to 4 * RTT + RTTVar + SYN.
- */ - protected void onAck2PacketReceived(Acknowledgment2 ack2){ - AckHistoryEntry entry=ackHistoryWindow.getEntry(ack2.getAckSequenceNumber()); - if(entry!=null){ - long ackNumber=entry.getAckNumber(); - largestAcknowledgedAckNumber=Math.max(ackNumber, largestAcknowledgedAckNumber); - - long rtt=entry.getAge(); - if(roundTripTime>0)roundTripTime = (roundTripTime*7 + rtt)/8; - else roundTripTime = rtt; - roundTripTimeVar = (roundTripTimeVar* 3 + Math.abs(roundTripTimeVar- rtt)) / 4; - ackTimerInterval=4*roundTripTime+roundTripTimeVar+Util.getSYNTime(); - nakTimerInterval=ackTimerInterval; - statistics.setRTT(roundTripTime, roundTripTimeVar); - } - } - - protected void sendKeepAlive()throws IOException{ - KeepAlive ka=new KeepAlive(); - ka.setDestinationID(session.getDestination().getSocketID()); - ka.setSession(session); - endpoint.doSend(ka); - } - - protected void sendShutdown()throws IOException{ - Shutdown s=new Shutdown(); - s.setDestinationID(session.getDestination().getSocketID()); - s.setSession(session); - endpoint.doSend(s); - } - - private volatile long ackSequenceNumber=0; - - protected void resetEXPTimer(){ - nextEXP=Util.getCurrentTime()+expTimerInterval; - expCount=0; - } - - protected void resetEXPCount(){ - expCount=0; - } - - public void setAckInterval(long ackInterval){ - this.ackInterval=ackInterval; - } - - protected void onShutdown()throws IOException{ - stop(); - } - - public void stop()throws IOException{ - stopped=true; - session.getSocket().close(); - //stop our sender as well - session.getSocket().getSender().stop(); - } - - @Override - public String toString(){ - StringBuilder sb=new StringBuilder(); - sb.append("UDTReceiver ").append(session).append("\n"); - sb.append("LossList: "+receiverLossList); - return sb.toString(); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/da/6081ae6d5ca800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/da/6081ae6d5ca800171a8482560d609ceb deleted file mode 100644 index b5ce008..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/da/6081ae6d5ca800171a8482560d609ceb +++ /dev/null @@ -1,225 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.UDTStatistics; - -public class UDTClient { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - private final UDPEndPoint clientEndpoint; - private ClientSession clientSession; - private boolean close=false; - private Thread closeThread=null;//cd - public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address,localport); - logger.info("Created client endpoint on port "+localport); - } - - public UDTClient(InetAddress address)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address); - logger.info("Created client endpoint on port "+clientEndpoint.getLocalPort()); - } - - public UDTClient(UDPEndPoint endpoint)throws SocketException, UnknownHostException{ - clientEndpoint=endpoint; - } - - /** - * establishes a connection to the given server. - * Starts the sender thread. - * @param host - * @param port - * @throws UnknownHostException - */ - public void connect(String host, int port)throws InterruptedException, UnknownHostException, IOException{ - InetAddress address=InetAddress.getByName(host); - Destination destination=new Destination(address,port); - //create client session... - clientSession=new ClientSession(clientEndpoint,destination); - clientEndpoint.addSession(clientSession.getSocketID(), clientSession); - - clientEndpoint.start(); - clientSession.connect(); - //wait for handshake - while(!clientSession.isReady()){ - Thread.sleep(500); - } - logger.info("The UDTClient is connected"); - Thread.sleep(500); - } - - /** - * sends the given data asynchronously - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - public void send(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWrite(data); - } - - public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWriteBlocking(data); - } - - public int read(byte[]data)throws IOException, InterruptedException{ - return clientSession.getSocket().getInputStream().read(data); - } - - /** - * flush outstanding data (and make sure it is acknowledged) - * @throws IOException - * @throws InterruptedException - */ - public void flush()throws IOException, InterruptedException{ - clientSession.getSocket().flush(); - } - - - public void shutdown()throws IOException{ - - if (clientSession.isReady()&& clientSession.active==true) - { - Shutdown shutdown = new Shutdown(); - shutdown.setDestinationID(clientSession.getDestination().getSocketID()); - shutdown.setSession(clientSession); - try{ - clientEndpoint.doSend(shutdown); - TimeUnit.MILLISECONDS.sleep(100); - } - catch(Exception e) - { - logger.log(Level.SEVERE,"ERROR: Connection could not be stopped!",e); - } - clientSession.getSocket().getReceiver().stop(); - clientEndpoint.stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - close=true; - } - } - - public UDTInputStream getInputStream()throws IOException{ - return clientSession.getSocket().getInputStream(); - } - - public UDTOutputStream getOutputStream()throws IOException{ - return clientSession.getSocket().getOutputStream(); - } - - public UDPEndPoint getEndpoint()throws IOException{ - return clientEndpoint; - } - - public UDTStatistics getStatistics(){ - return clientSession.getStatistics(); - } - - public long getSocketID() - { - //cd - return clientSession.getSocketID(); - } - - /** - * ͬر - * ȴݷɺٹر - * ֻȴ10ss - */ - public synchronized void close() - { - close=true; - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - if(clientSession.getSocket().getSender().isSenderEmpty()) - { - try { - shutdown(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } - - public boolean isClose() - { - return close; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/da/c0eefdc32aad001713e0de43c08806fd b/.metadata/.plugins/org.eclipse.core.resources/.history/da/c0eefdc32aad001713e0de43c08806fd deleted file mode 100644 index 1756b26..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/da/c0eefdc32aad001713e0de43c08806fd +++ /dev/null @@ -1,189 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.SocketException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.SequenceNumber; - -/** - * Client side of a client-server UDT connection. - * Once established, the session provides a valid {@link UDTSocket}. - */ -public class ClientSession extends UDTSession { - - private static final Logger logger=Logger.getLogger(ClientSession.class.getName()); - - private UDPEndPoint endPoint; - - public ClientSession(UDPEndPoint endPoint, Destination dest)throws SocketException{ - super("ClientSession localPort="+endPoint.getLocalPort(),dest); - this.endPoint=endPoint; - logger.info("Created "+toString()); - } - - /** - * send connection handshake until a reply from server is received - * TODO check for timeout - * @throws InterruptedException - * @throws IOException - */ - - public void connect() throws InterruptedException,IOException{ - int n=0; - - while(getState()!=ready){ - - sendHandShake(); - if(getState()==invalid)throw new IOException("Can't connect!"); - n++; - if(getState()!=ready)Thread.sleep(500); - } - - cc.init(); - logger.info("Connected, "+n+" handshake packets sent"); - } - - @Override - public void received(UDTPacket packet, Destination peer) { - - lastPacket=packet; - - if (packet instanceof ConnectionHandshake) { - ConnectionHandshake hs=(ConnectionHandshake)packet; - - logger.info("Received connection handshake from "+peer+"\n"+hs); - - if (getState()!=ready) { - if(hs.getConnectionType()==1){ - try{ - //TODO validate parameters sent by peer - long peerSocketID=hs.getSocketID(); - destination.setSocketID(peerSocketID); - sendConfirmation(hs); - }catch(Exception ex){ - logger.log(Level.WARNING,"Error creating socket",ex); - setState(invalid); - } - return; - } - else{ - try{ - //TODO validate parameters sent by peer - long peerSocketID=hs.getSocketID(); - destination.setSocketID(peerSocketID); - setState(ready); - Thread.sleep(50); - logger.info("ʼû:"+hs.getInitialSeqNo()); - this.setInitialSequenceNumber(hs.getInitialSeqNo());//cd - socket=new UDTSocket(endPoint,this); - - - }catch(Exception ex){ - logger.log(Level.WARNING,"Error creating socket",ex); - setState(invalid); - } - return; - } - } - } - - if(getState() == ready) { - - if(packet instanceof Shutdown){ - setState(shutdown); - active=false; - logger.info("Connection shutdown initiated by the other side."); - return; - } - active = true; - try{ - if(packet.forSender()){ - socket.getSender().receive(lastPacket); - }else{ - socket.getReceiver().receive(lastPacket); - } - }catch(Exception ex){ - //session is invalid - logger.log(Level.SEVERE,"Error in "+toString(),ex); - setState(invalid); - } - return; - } - } - - - //handshake for connect - protected void sendHandShake()throws IOException{ - ConnectionHandshake handshake = new ConnectionHandshake(); - handshake.setConnectionType(ConnectionHandshake.CONNECTION_TYPE_REGULAR); - handshake.setSocketType(ConnectionHandshake.SOCKET_TYPE_DGRAM); - long initialSequenceNo=SequenceNumber.random(); - setInitialSequenceNumber(initialSequenceNo); - handshake.setInitialSeqNo(initialSequenceNo); - handshake.setPacketSize(getDatagramSize()); - handshake.setSocketID(mySocketID); - handshake.setMaxFlowWndSize(flowWindowSize); - handshake.setSession(this); - logger.info("Sending "+handshake); - endPoint.doSend(handshake); - } - - //2nd handshake for connect - protected void sendConfirmation(ConnectionHandshake hs)throws IOException{ - ConnectionHandshake handshake = new ConnectionHandshake(); - handshake.setConnectionType(-1); - handshake.setSocketType(ConnectionHandshake.SOCKET_TYPE_DGRAM); - handshake.setInitialSeqNo(hs.getInitialSeqNo()); - handshake.setPacketSize(hs.getPacketSize()); - handshake.setSocketID(mySocketID); - handshake.setMaxFlowWndSize(flowWindowSize); - handshake.setSession(this); - logger.info("Sending confirmation "+handshake); - endPoint.doSend(handshake); - } - - - public UDTPacket getLastPkt(){ - return lastPacket; - } - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/db/d05d7acd7fad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/db/d05d7acd7fad0017181ed9113883eda9 deleted file mode 100644 index 289fd07..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/db/d05d7acd7fad0017181ed9113883eda9 +++ /dev/null @@ -1,191 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.DatagramPacket; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.KeepAlive; -import udt.packets.Shutdown; - -/** - * server side session in client-server mode - */ -public class ServerSession extends UDTSession { - - private static final Logger logger=Logger.getLogger(ServerSession.class.getName()); - - private final UDPEndPoint endPoint; - - //last received packet (for testing purposes) - private UDTPacket lastPacket; - - - public ServerSession(DatagramPacket dp, UDPEndPoint endPoint)throws SocketException,UnknownHostException{ - super("ServerSession localPort="+endPoint.getLocalPort()+" peer="+dp.getAddress()+":"+dp.getPort(),new Destination(dp.getAddress(),dp.getPort())); - this.endPoint=endPoint; - logger.info("Created "+toString()+" talking to "+dp.getAddress()+":"+dp.getPort()); - } - - int n_handshake=0; - - @Override - public void received(UDTPacket packet, Destination peer){ - lastPacket=packet; - - if(packet instanceof ConnectionHandshake) { - ConnectionHandshake connectionHandshake=(ConnectionHandshake)packet; - logger.info("Received "+connectionHandshake); - - if (getState()<=ready){ - destination.setSocketID(connectionHandshake.getSocketID()); - this.endPoint.addSession(destination.getSocketID(), this.mySocketID); - if(getState()<=handshaking){ - setState(handshaking); - } - try{ - handleHandShake(connectionHandshake); - n_handshake++; - try{ - setState(ready); - socket=new UDTSocket(endPoint, this); - cc.init(); - }catch(Exception uhe){ - //session is invalid - logger.log(Level.SEVERE,"",uhe); - setState(invalid); - } - }catch(IOException ex){ - //session invalid - logger.log(Level.WARNING,"Error processing ConnectionHandshake",ex); - setState(invalid); - } - return; - } - - }else if(packet instanceof KeepAlive) { - socket.getReceiver().resetEXPTimer(); - active = true; - return; - } - - if(getState()== ready) { - active = true; - - if (packet instanceof KeepAlive) { - //nothing to do here - return; - }else if (packet instanceof Shutdown) { - try{ - socket.getReceiver().stop(); - }catch(IOException ex){ - logger.log(Level.WARNING,"",ex); - } - setState(shutdown); - System.out.println("SHUTDOWN ***"); - active = false; - logger.info("Connection shutdown initiated by the other side."); - return; - } - - else{ - try{ - - if(packet.forSender()){ - socket.getSender().receive(packet); - }else{ - socket.getReceiver().receive(packet); - } - }catch(Exception ex){ - //session invalid - logger.log(Level.SEVERE,"",ex); - setState(invalid); - } - } - return; - - } - - - } - - /** - * for testing use only - */ - UDTPacket getLastPacket(){ - return lastPacket; - } - - /** - * handle the connection handshake:
- *
    - *
  • set initial sequence number
  • - *
  • send response handshake
  • - *
- * @param handshake - * @param peer - * @throws IOException - */ - protected void handleHandShake(ConnectionHandshake handshake)throws IOException{ - ConnectionHandshake responseHandshake = new ConnectionHandshake(); - //compare the packet size and choose minimun - long clientBufferSize=handshake.getPacketSize(); - long myBufferSize=getDatagramSize(); - long bufferSize=Math.min(clientBufferSize, myBufferSize); - long initialSequenceNumber=handshake.getInitialSeqNo(); - setInitialSequenceNumber(initialSequenceNumber); - setDatagramSize((int)bufferSize); - responseHandshake.setPacketSize(bufferSize); - responseHandshake.setUdtVersion(4); - responseHandshake.setInitialSeqNo(initialSequenceNumber); - responseHandshake.setConnectionType(-1); - responseHandshake.setMaxFlowWndSize(handshake.getMaxFlowWndSize()); - //tell peer what the socket ID on this side is - responseHandshake.setSocketID(mySocketID); - responseHandshake.setDestinationID(this.getDestination().getSocketID()); - responseHandshake.setSession(this); - logger.info("Sending reply "+responseHandshake); - endPoint.doSend(responseHandshake); - } - - - - -} - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/dc/904dedc619ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/dc/904dedc619ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 762beb5..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/dc/904dedc619ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,74 +0,0 @@ -/** - * - */ -package judp; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=20; - public static byte[][] split(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - DataHead head=new DataHead(session,data.length,(byte) 0); - - for(int i=0;i queue=new LinkedBlockingQueue(); - private boolean isStop=false; - public FilesWatch() - { - try { - watcher = FileSystems.getDefault().newWatchService(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - public void setWatch(String dir) - { - this.dir=dir; - } - public void stop() - { - isStop=true; - } - public FileMonitor take() - { - try { - return queue.take(); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - return null; - } - public void start() - { - checkThread =new Thread(new Runnable() { - - @Override - public void run() { - try - { - Paths.get(dir).register(watcher, - StandardWatchEventKinds.ENTRY_CREATE, - StandardWatchEventKinds.ENTRY_DELETE, - StandardWatchEventKinds.ENTRY_MODIFY); - } - catch(Exception ex) - { - - } - while (!isStop) { - WatchKey key; - try { - key = watcher.take(); - for (WatchEvent event: key.pollEvents()) { - FileMonitor e=new FileMonitor(); - e.file=event.context().toString(); - e.kind=event.kind(); - queue.put(e); - } - - boolean valid = key.reset(); - if (!valid) { - break; - } - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - - - }); - checkThread.setDaemon(true); - checkThread.setName("monitor"); - checkThread.start(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/dd/206f8ef4c4ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/dd/206f8ef4c4ad0017181ed9113883eda9 deleted file mode 100644 index 5f6c02e..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/dd/206f8ef4c4ad0017181ed9113883eda9 +++ /dev/null @@ -1,516 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - // cd - private volatile int bufferNum=0; - private volatile boolean isModify=true; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - // - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/dd/d0aca700e0ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/dd/d0aca700e0ac001716b9ca6d5abb90bc deleted file mode 100644 index b310f92..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/dd/d0aca700e0ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,188 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long startTime=System.currentTimeMillis(); - long lastTime=System.currentTimeMillis(); - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - long speed=0; - try - { - speed=sumBytes/((System.currentTimeMillis()-startTime)/1000); - } - catch(Exception ex) - { - - } - log.info("ļٶȣ"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/de/305d803423ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/de/305d803423ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 6e64d40..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/de/305d803423ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,233 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - - byte[][]sendData= PackagetSub.split(data); - for(int i=0;i - *
    - *
  • set initial sequence number
  • - *
  • send response handshake
  • - *
- * @param handshake - * @param peer - * @throws IOException - */ - protected void handleHandShake(ConnectionHandshake handshake)throws IOException{ - ConnectionHandshake responseHandshake = new ConnectionHandshake(); - //compare the packet size and choose minimun - long clientBufferSize=handshake.getPacketSize(); - long myBufferSize=getDatagramSize(); - long bufferSize=Math.min(clientBufferSize, myBufferSize); - long initialSequenceNumber=handshake.getInitialSeqNo(); - setInitialSequenceNumber(initialSequenceNumber); - setDatagramSize((int)bufferSize); - responseHandshake.setPacketSize(bufferSize); - responseHandshake.setUdtVersion(4); - responseHandshake.setInitialSeqNo(initialSequenceNumber); - responseHandshake.setConnectionType(-1); - responseHandshake.setMaxFlowWndSize(handshake.getMaxFlowWndSize()); - //tell peer what the socket ID on this side is - responseHandshake.setSocketID(mySocketID); - responseHandshake.setDestinationID(this.getDestination().getSocketID()); - responseHandshake.setSession(this); - logger.info("Sending reply "+responseHandshake); - endPoint.doSend(responseHandshake); - } - - - - -} - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/df/20d826b6d5ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/df/20d826b6d5ac001716b9ca6d5abb90bc deleted file mode 100644 index 65f9567..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/df/20d826b6d5ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,265 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡ - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(islagerRead) - { - // cd Ϊݶȡ׼ - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - } - else - { - //ԭ - buffer[insert]=data; - numValidChunks.incrementAndGet(); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/df/90ce9028bbac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/df/90ce9028bbac001716b9ca6d5abb90bc deleted file mode 100644 index 34a9e41..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/df/90ce9028bbac001716b9ca6d5abb90bc +++ /dev/null @@ -1,604 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.ControlPacket; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.packets.Shutdown; -import udt.packets.ControlPacket.ControlPacketType; -import udt.receiver.AckHistoryEntry; -import udt.receiver.AckHistoryWindow; -import udt.receiver.PacketHistoryWindow; -import udt.receiver.PacketPairWindow; -import udt.receiver.ReceiverLossList; -import udt.receiver.ReceiverLossListEntry; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - -/** - * receiver part of a UDT entity - * @see UDTSender - */ -public class UDTReceiver { - - private static final Logger logger=Logger.getLogger(UDTReceiver.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //record seqNo of detected lostdata and latest feedback time - private final ReceiverLossList receiverLossList; - - //record each sent ACK and the sent time - private final AckHistoryWindow ackHistoryWindow; - - //Packet history window that stores the time interval between the current and the last seq. - private final PacketHistoryWindow packetHistoryWindow; - - //for storing the arrival time of the last received data packet - private volatile long lastDataPacketArrivalTime=0; - - //largest received data packet sequence number(LRSN) - private volatile long largestReceivedSeqNumber=0; - - //ACK event related - - //last Ack number - private long lastAckNumber=0; - - //largest Ack number ever acknowledged by ACK2 - private volatile long largestAcknowledgedAckNumber=-1; - - //EXP event related - - //a variable to record number of continuous EXP time-out events - private volatile long expCount=0; - - /*records the time interval between each probing pair - compute the median packet pair interval of the last - 16 packet pair intervals (PI) and the estimate link capacity.(packet/s)*/ - private final PacketPairWindow packetPairWindow; - - //estimated link capacity - long estimateLinkCapacity; - // the packet arrival rate - long packetArrivalSpeed; - - //round trip time, calculated from ACK/ACK2 pairs - long roundTripTime=0; - //round trip time variance - long roundTripTimeVar=roundTripTime/2; - - //to check the ACK, NAK, or EXP timer - private long nextACK; - //microseconds to next ACK event - private long ackTimerInterval=Util.getSYNTime(); - - private long nextNAK; - //microseconds to next NAK event - private long nakTimerInterval=Util.getSYNTime(); - - private long nextEXP; - //microseconds to next EXP event - private long expTimerInterval=100*Util.getSYNTime(); - - //instant when the session was created (for expiry checking) - private final long sessionUpSince; - //milliseconds to timeout a new session that stays idle - private final long IDLE_TIMEOUT = 3*60*1000; - - //buffer size for storing data - private final long bufferSize; - - //stores received packets to be sent - private final BlockingQueuehandoffQueue; - - private Thread receiverThread; - - private volatile boolean stopped=false; - - //(optional) ack interval (see CongestionControl interface) - private volatile long ackInterval=-1; - - /** - * if set to true connections will not expire, but will only be - * closed by a Shutdown message - */ - public static boolean connectionExpiryDisabled=false; - - private final boolean storeStatistics; - - - - /** - * create a receiver with a valid {@link UDTSession} - * @param session - */ - public UDTReceiver(UDTSession session,UDPEndPoint endpoint){ - this.endpoint = endpoint; - this.session=session; - this.sessionUpSince=System.currentTimeMillis(); - this.statistics=session.getStatistics(); - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - ackHistoryWindow = new AckHistoryWindow(16); - packetHistoryWindow = new PacketHistoryWindow(16); - receiverLossList = new ReceiverLossList(); - packetPairWindow = new PacketPairWindow(16); - largestReceivedSeqNumber=session.getInitialSequenceNumber()-1; - bufferSize=session.getReceiveBufferSize(); - handoffQueue=new ArrayBlockingQueue(4*session.getFlowWindowSize()); - storeStatistics=Boolean.getBoolean("udt.receiver.storeStatistics"); - initMetrics(); - start(); - } - - private MeanValue dgReceiveInterval; - private MeanValue dataPacketInterval; - private MeanValue processTime; - private MeanValue dataProcessTime; - private void initMetrics(){ - if(!storeStatistics)return; - dgReceiveInterval=new MeanValue("UDT receive interval"); - statistics.addMetric(dgReceiveInterval); - dataPacketInterval=new MeanValue("Data packet interval"); - statistics.addMetric(dataPacketInterval); - processTime=new MeanValue("UDT packet process time"); - statistics.addMetric(processTime); - dataProcessTime=new MeanValue("Data packet process time"); - statistics.addMetric(dataProcessTime); - } - - - //starts the sender algorithm - private void start(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - nextACK=Util.getCurrentTime()+ackTimerInterval; - nextNAK=(long)(Util.getCurrentTime()+1.5*nakTimerInterval); - nextEXP=Util.getCurrentTime()+2*expTimerInterval; - ackInterval=session.getCongestionControl().getAckInterval(); - while(!stopped){ - receiverAlgorithm(); - } - } - catch(Exception ex){ - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING RECEIVER for "+session); - } - }; - receiverThread=UDTThreadFactory.get().newThread(r); - receiverThread.start(); - } - - /* - * packets are written by the endpoint - */ - protected void receive(UDTPacket p)throws IOException{ - if(storeStatistics)dgReceiveInterval.end(); - handoffQueue.offer(p); - if(storeStatistics)dgReceiveInterval.begin(); - } - - /** - * receiver algorithm - * see specification P11. - */ - public void receiverAlgorithm()throws InterruptedException,IOException{ - //check ACK timer - long currentTime=Util.getCurrentTime(); - if(nextACKseqNumbers=receiverLossList.getFilteredSequenceNumbers(roundTripTime,true); - sendNAK(seqNumbers); - } - - /** - * process EXP event (see spec. p 13) - */ - protected void processEXPEvent()throws IOException{ - if(session.getSocket()==null)return; - UDTSender sender=session.getSocket().getSender(); - //put all the unacknowledged packets in the senders loss list - sender.putUnacknowledgedPacketsIntoLossList(); - if(expCount>16 && System.currentTimeMillis()-sessionUpSince > IDLE_TIMEOUT){ - if(!connectionExpiryDisabled &&!stopped){ - sendShutdown(); - stop(); - logger.info("Session "+session+" expired."); - return; - } - } - if(!sender.haveLostPackets()){ - sendKeepAlive(); - } - expCount++; - } - - protected void processUDTPacket(UDTPacket p)throws IOException{ - //(3).Check the packet type and process it according to this. - - if(!p.isControlPacket()){ - DataPacket dp=(DataPacket)p; - if(storeStatistics){ - dataPacketInterval.end(); - dataProcessTime.begin(); - } - onDataPacketReceived(dp); - if(storeStatistics){ - dataProcessTime.end(); - dataPacketInterval.begin(); - } - logger.info("DataPacket udt:"+p.getPacketSequenceNumber()); - } - - else if (p.getControlPacketType()==ControlPacketType.ACK2.ordinal()){ - Acknowledgment2 ack2=(Acknowledgment2)p; - onAck2PacketReceived(ack2); - } - - else if (p instanceof Shutdown){ - onShutdown(); - } - - } - - //every nth packet will be discarded... for testing only of course - public static int dropRate=0; - - //number of received data packets - private int n=0; - - protected void onDataPacketReceived(DataPacket dp)throws IOException{ - long currentSequenceNumber = dp.getPacketSequenceNumber(); - - //for TESTING : check whether to drop this packet -// n++; -// //if(dropRate>0 && n % dropRate == 0){ -// if(n % 1111 == 0){ -// logger.info("**** TESTING:::: DROPPING PACKET "+currentSequenceNumber+" FOR TESTING"); -// return; -// } -// //} - boolean OK=session.getSocket().getInputStream().haveNewData(currentSequenceNumber,dp.getData()); - if(!OK){ - //need to drop packet... - return; - } - - long currentDataPacketArrivalTime = Util.getCurrentTime(); - - /*(4).if the seqNo of the current data packet is 16n+1,record the - time interval between this packet and the last data packet - in the packet pair window*/ - if((currentSequenceNumber%16)==1 && lastDataPacketArrivalTime>0){ - long interval=currentDataPacketArrivalTime -lastDataPacketArrivalTime; - packetPairWindow.add(interval); - } - - //(5).record the packet arrival time in the PKT History Window. - packetHistoryWindow.add(currentDataPacketArrivalTime); - - - //store current time - lastDataPacketArrivalTime=currentDataPacketArrivalTime; - - - //(6).number of detected lossed packet - /*(6.a).if the number of the current data packet is greater than LSRN+1, - put all the sequence numbers between (but excluding) these two values - into the receiver's loss list and send them to the sender in an NAK packet*/ - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber+1)>0){ - sendNAK(currentSequenceNumber); - logger.info("sendNAK:"+currentSequenceNumber); - } - else if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)<0){ - /*(6.b).if the sequence number is less than LRSN,remove it from - * the receiver's loss list - */ - receiverLossList.remove(currentSequenceNumber); - logger.info("receiverLossList remove:"+currentSequenceNumber); - } - - statistics.incNumberOfReceivedDataPackets(); - - //(7).Update the LRSN - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)>0){ - largestReceivedSeqNumber=currentSequenceNumber; - } - - //(8) need to send an ACK? Some cc algorithms use this - if(ackInterval>0){ - if(n % ackInterval == 0)processACKEvent(false); - } - } - - /** - * write a NAK triggered by a received sequence number that is larger than - * the largestReceivedSeqNumber + 1 - * @param currentSequenceNumber - the currently received sequence number - * @throws IOException - */ - protected void sendNAK(long currentSequenceNumber)throws IOException{ - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(largestReceivedSeqNumber+1, currentSequenceNumber); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - //put all the sequence numbers between (but excluding) these two values into the - //receiver loss list - for(long i=largestReceivedSeqNumber+1;isequenceNumbers)throws IOException{ - if(sequenceNumbers.size()==0)return; - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(sequenceNumbers); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(nAckPacket); - statistics.incNumberOfNAKSent(); - logger.info("sendNAK List:"+sequenceNumbers.size()); - } - - protected long sendLightAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt=buildLightAcknowledgement(ackNumber); - endpoint.doSend(acknowledgmentPkt); - statistics.incNumberOfACKSent(); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - protected long sendAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); - //set the estimate link capacity - estimateLinkCapacity=packetPairWindow.getEstimatedLinkCapacity(); - acknowledgmentPkt.setEstimatedLinkCapacity(estimateLinkCapacity); - //set the packet arrival rate - packetArrivalSpeed=packetHistoryWindow.getPacketArrivalSpeed(); - acknowledgmentPkt.setPacketReceiveRate(packetArrivalSpeed); - - endpoint.doSend(acknowledgmentPkt); - - statistics.incNumberOfACKSent(); - statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - //builds a "light" Acknowledgement - private Acknowledgement buildLightAcknowledgement(long ackNumber){ - Acknowledgement acknowledgmentPkt = new Acknowledgement(); - //the packet sequence number to which all the packets have been received - acknowledgmentPkt.setAckNumber(ackNumber); - //assign this ack a unique increasing ACK sequence number - acknowledgmentPkt.setAckSequenceNumber(++ackSequenceNumber); - acknowledgmentPkt.setRoundTripTime(roundTripTime); - acknowledgmentPkt.setRoundTripTimeVar(roundTripTimeVar); - //set the buffer size - acknowledgmentPkt.setBufferSize(bufferSize); - - acknowledgmentPkt.setDestinationID(session.getDestination().getSocketID()); - acknowledgmentPkt.setSession(session); - - return acknowledgmentPkt; - } - - /** - * spec p. 13:
- 1) Locate the related ACK in the ACK History Window according to the - ACK sequence number in this ACK2.
- 2) Update the largest ACK number ever been acknowledged.
- 3) Calculate new rtt according to the ACK2 arrival time and the ACK - departure time, and update the RTT value as: RTT = (RTT * 7 + - rtt) / 8.
- 4) Update RTTVar by: RTTVar = (RTTVar * 3 + abs(RTT - rtt)) / 4.
- 5) Update both ACK and NAK period to 4 * RTT + RTTVar + SYN.
- */ - protected void onAck2PacketReceived(Acknowledgment2 ack2){ - AckHistoryEntry entry=ackHistoryWindow.getEntry(ack2.getAckSequenceNumber()); - if(entry!=null){ - long ackNumber=entry.getAckNumber(); - largestAcknowledgedAckNumber=Math.max(ackNumber, largestAcknowledgedAckNumber); - - long rtt=entry.getAge(); - if(roundTripTime>0)roundTripTime = (roundTripTime*7 + rtt)/8; - else roundTripTime = rtt; - roundTripTimeVar = (roundTripTimeVar* 3 + Math.abs(roundTripTimeVar- rtt)) / 4; - ackTimerInterval=4*roundTripTime+roundTripTimeVar+Util.getSYNTime(); - nakTimerInterval=ackTimerInterval; - statistics.setRTT(roundTripTime, roundTripTimeVar); - } - } - - protected void sendKeepAlive()throws IOException{ - KeepAlive ka=new KeepAlive(); - ka.setDestinationID(session.getDestination().getSocketID()); - ka.setSession(session); - endpoint.doSend(ka); - } - - protected void sendShutdown()throws IOException{ - Shutdown s=new Shutdown(); - s.setDestinationID(session.getDestination().getSocketID()); - s.setSession(session); - endpoint.doSend(s); - } - - private volatile long ackSequenceNumber=0; - - protected void resetEXPTimer(){ - nextEXP=Util.getCurrentTime()+expTimerInterval; - expCount=0; - } - - protected void resetEXPCount(){ - expCount=0; - } - - public void setAckInterval(long ackInterval){ - this.ackInterval=ackInterval; - } - - protected void onShutdown()throws IOException{ - stop(); - } - - public void stop()throws IOException{ - stopped=true; - session.getSocket().close(); - //stop our sender as well - session.getSocket().getSender().stop(); - } - - @Override - public String toString(){ - StringBuilder sb=new StringBuilder(); - sb.append("UDTReceiver ").append(session).append("\n"); - sb.append("LossList: "+receiverLossList); - return sb.toString(); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/df/e05aea31e5ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/df/e05aea31e5ac001716b9ca6d5abb90bc deleted file mode 100644 index f9a67c0..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/df/e05aea31e5ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,239 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData() - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - byte[]tmp=recQueue.poll(); - if(tmp==null) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - continue; - } - if(writeFile(tmp)) - { - isStop=true; - break; - } - } - - } - - }); - fileW.setDaemon(true); - fileW.setName(fileName+"_Thread"); - fileW.start(); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - // - ss.close(); - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/df/f0a11525b5ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/df/f0a11525b5ad0017181ed9113883eda9 deleted file mode 100644 index defd91b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/df/f0a11525b5ad0017181ed9113883eda9 +++ /dev/null @@ -1,518 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - // - } - } - - } - - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e/609b46bf31ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/e/609b46bf31ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 03180e1..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e/609b46bf31ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,338 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public boolean getCloseState() -{ - //ײѾر - return isClose|socket.isClose(); -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(getCloseState()) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(getCloseState()) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(isClose) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;i sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean Start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - //judpSocket jsocket=new judpSocket(csocket); - - //SocketManager.getInstance().addGC(jsocket,csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ -try { - UDTSocket socket=SocketControls.getInstance().getSocket(); - //judpSocket jsocket=new judpSocket(csocket); - //judpSocket jsocket= sessionHandoff.take(); - return jsocket; -} catch (InterruptedException e) { - logger.info("judpSocketжϣ"+e.getMessage()); - e.printStackTrace(); -} -return null; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e1/80a8e68d04ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/e1/80a8e68d04ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 3acb753..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e1/80a8e68d04ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,86 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private LinkedBlockingQueue> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - private void startThread() { - - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e2/20032dc67fad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/e2/20032dc67fad0017181ed9113883eda9 deleted file mode 100644 index 6e4a9a6..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e2/20032dc67fad0017181ed9113883eda9 +++ /dev/null @@ -1,191 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.DatagramPacket; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.ConnectionHandshake; -import udt.packets.Destination; -import udt.packets.KeepAlive; -import udt.packets.Shutdown; - -/** - * server side session in client-server mode - */ -public class ServerSession extends UDTSession { - - private static final Logger logger=Logger.getLogger(ServerSession.class.getName()); - - private final UDPEndPoint endPoint; - - //last received packet (for testing purposes) - private UDTPacket lastPacket; - - - public ServerSession(DatagramPacket dp, UDPEndPoint endPoint)throws SocketException,UnknownHostException{ - super("ServerSession localPort="+endPoint.getLocalPort()+" peer="+dp.getAddress()+":"+dp.getPort(),new Destination(dp.getAddress(),dp.getPort())); - this.endPoint=endPoint; - logger.info("Created "+toString()+" talking to "+dp.getAddress()+":"+dp.getPort()); - } - - int n_handshake=0; - - @Override - public void received(UDTPacket packet, Destination peer){ - lastPacket=packet; - - if(packet instanceof ConnectionHandshake) { - ConnectionHandshake connectionHandshake=(ConnectionHandshake)packet; - logger.info("Received "+connectionHandshake); - - if (getState()<=ready){ - destination.setSocketID(connectionHandshake.getSocketID()); - - if(getState()<=handshaking){ - setState(handshaking); - } - try{ - handleHandShake(connectionHandshake); - n_handshake++; - try{ - setState(ready); - socket=new UDTSocket(endPoint, this); - cc.init(); - }catch(Exception uhe){ - //session is invalid - logger.log(Level.SEVERE,"",uhe); - setState(invalid); - } - }catch(IOException ex){ - //session invalid - logger.log(Level.WARNING,"Error processing ConnectionHandshake",ex); - setState(invalid); - } - return; - } - - }else if(packet instanceof KeepAlive) { - socket.getReceiver().resetEXPTimer(); - active = true; - return; - } - - if(getState()== ready) { - active = true; - - if (packet instanceof KeepAlive) { - //nothing to do here - return; - }else if (packet instanceof Shutdown) { - try{ - socket.getReceiver().stop(); - }catch(IOException ex){ - logger.log(Level.WARNING,"",ex); - } - setState(shutdown); - System.out.println("SHUTDOWN ***"); - active = false; - logger.info("Connection shutdown initiated by the other side."); - return; - } - - else{ - try{ - - if(packet.forSender()){ - socket.getSender().receive(packet); - }else{ - socket.getReceiver().receive(packet); - } - }catch(Exception ex){ - //session invalid - logger.log(Level.SEVERE,"",ex); - setState(invalid); - } - } - return; - - } - - - } - - /** - * for testing use only - */ - UDTPacket getLastPacket(){ - return lastPacket; - } - - /** - * handle the connection handshake:
- *
    - *
  • set initial sequence number
  • - *
  • send response handshake
  • - *
- * @param handshake - * @param peer - * @throws IOException - */ - protected void handleHandShake(ConnectionHandshake handshake)throws IOException{ - ConnectionHandshake responseHandshake = new ConnectionHandshake(); - //compare the packet size and choose minimun - long clientBufferSize=handshake.getPacketSize(); - long myBufferSize=getDatagramSize(); - long bufferSize=Math.min(clientBufferSize, myBufferSize); - long initialSequenceNumber=handshake.getInitialSeqNo(); - setInitialSequenceNumber(initialSequenceNumber); - setDatagramSize((int)bufferSize); - responseHandshake.setPacketSize(bufferSize); - responseHandshake.setUdtVersion(4); - responseHandshake.setInitialSeqNo(initialSequenceNumber); - responseHandshake.setConnectionType(-1); - responseHandshake.setMaxFlowWndSize(handshake.getMaxFlowWndSize()); - //tell peer what the socket ID on this side is - responseHandshake.setSocketID(mySocketID); - responseHandshake.setDestinationID(this.getDestination().getSocketID()); - responseHandshake.setSession(this); - logger.info("Sending reply "+responseHandshake); - endPoint.doSend(responseHandshake); - } - - - - -} - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e2/5020156065a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/e2/5020156065a800171a8482560d609ceb deleted file mode 100644 index 2d4993d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e2/5020156065a800171a8482560d609ceb +++ /dev/null @@ -1,67 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - - -import java.util.Map.Entry; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - - for(Entry entry:hash.entrySet()) - { - - } - } - - }); - processSocket.setDaemon(true); - processSocket.setName("processSocket"); - processSocket.start(); - -} - -public static synchronized SocketControls getInstance() { - - if (instance == null) { - - instance = new SocketControls(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e2/70b70a8cc3ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/e2/70b70a8cc3ad0017181ed9113883eda9 deleted file mode 100644 index bab37e1..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e2/70b70a8cc3ad0017181ed9113883eda9 +++ /dev/null @@ -1,493 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e2/f0425b8821ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/e2/f0425b8821ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 1f64add..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e2/f0425b8821ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,287 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -public boolean getCloseState() -{ - return isClose; -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readData() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - - -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - flushTime=System.currentTimeMillis(); - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} -public String getRemoteHost() { -return socket.getSession().getDestination().getAddress().getHostName(); - -} -public int getRemotePort() { - return socket.getSession().getDestination().getPort(); -} -public long getID() { - - return socketID; -} - - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e4/4059f899d9ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/e4/4059f899d9ac001716b9ca6d5abb90bc deleted file mode 100644 index dff1e79..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e4/4059f899d9ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,155 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.UnsupportedEncodingException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=10*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - while((count=dis.read(buf,0, bufSize))!=-1) - { - log.info("1:"); - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - log.info(":"+sum); - - } - client.close(); - dis.close(); - log.info("ɣ"+f.getName()); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e5/203d7a7234ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/e5/203d7a7234ac001710ff8a7c6bda0fb8 deleted file mode 100644 index a92c305..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e5/203d7a7234ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,338 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public int dataLen=0; -public boolean getCloseState() -{ - //ײѾر - return isClose|socket.isClose(); -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(getCloseState()) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readALL() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(getCloseState()) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(getCloseState()) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ְ - * ٴηָݣͬʱͷ - * ӦҪreadALL - * @param data - * @return - */ -public boolean sendSplitData(byte[]data) { - if(getCloseState()) - { - return false; - } - byte[][]result=null; - if(dataLen==0) - { - result= PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - result=sub.split(data, dataLen); - } - for(int i=0;i hash=new ConcurrentHashMap(); -public static void addData(byte[] data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - DataStruct struct=hash.get(id); - if(struct==null) - { - struct=new DataStruct(num); - hash.put(id, struct); - } - struct.addData(data); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e5/f0935d6167a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/e5/f0935d6167a800171a8482560d609ceb deleted file mode 100644 index 9d527a9..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e5/f0935d6167a800171a8482560d609ceb +++ /dev/null @@ -1,66 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public UDTSocket getSocket() -{ - UDTSocket find=null; - int index=-1; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(find==null) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳر - find=list.get(i); - i=-1;//± - } - } - else - { - // - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - return null; - -} -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e6/207e4997a3ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/e6/207e4997a3ad0017181ed9113883eda9 deleted file mode 100644 index efd7ce7..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e6/207e4997a3ad0017181ed9113883eda9 +++ /dev/null @@ -1,218 +0,0 @@ -/** - * ļjudpSendFile.java - * - * 汾Ϣ - * ڣ2017827 - * Copyright Corporation 2017 - * Ȩ - * - */ -package judp; - - -import java.io.File; -import java.io.FileInputStream; -import java.io.RandomAccessFile; -import java.nio.ByteBuffer; -import java.nio.MappedByteBuffer; -import java.nio.channels.FileChannel; -import java.nio.channels.FileChannel.MapMode; -import java.text.NumberFormat; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import udt.UDTReceiver; - - -/** - * - * Ŀƣjudp - * ƣjudpSendFile - * ļ - * ˣjinyu - * ʱ䣺2017827 4:30:42 - * ޸ˣjinyu - * ޸ʱ䣺2017827 4:30:42 - * ޸ıע - * @version - * - */ -public class judpSendFile { - private final int serverPort; - private final String host; - //TODO configure pool size - // private final ExecutorService threadPool=Executors.newFixedThreadPool(3); - private final ExecutorService threadPool=Executors.newCachedThreadPool(); - public judpSendFile(int serverPort){ - this.serverPort=serverPort; - this.host=null; - - } - public judpSendFile(String localIP,int serverPort){ - this.serverPort=serverPort; - this.host=localIP; - - } - - - public void startSend() - { - threadPool.execute(new Runnable() { - @Override - public void run(){ - try{ - UDTReceiver.connectionExpiryDisabled=true; - judpServer server=null; - if(host==null) - { - server=new judpServer(serverPort); - } - else - { - server=new judpServer(host,serverPort); - } - server.start(); - while(true){ - judpSocket socket=server.accept(); - Thread.sleep(1000); - threadPool.execute(new RequestRunner(socket)); - } - }catch(Exception ex){ - throw new RuntimeException(ex); - } - }} - ); - } - - - public static void usage(){ - System.out.println("Usage: java -cp ... udt.util.SendFile " + - "[--verbose] [--localPort=] [--localIP=]"); - } - - public static class RequestRunner implements Runnable{ - - private final static Logger logger=Logger.getLogger(RequestRunner.class.getName()); - - private final judpSocket socket; - - private final NumberFormat format=NumberFormat.getNumberInstance(); - - private final boolean memMapped; - - private boolean verbose; - public RequestRunner(judpSocket socket){ - this.socket=socket; - format.setMaximumFractionDigits(3); - memMapped=false;//true; - } - - @Override - public void run(){ - try{ - logger.info("Handling request from "+socket.getDestination()); - - // UDTInputStream in=socket.getInputStream(); - // UDTOutputStream out=socket.getOutputStream(); - byte[]readBuf=new byte[32768]; - ByteBuffer bb=ByteBuffer.wrap(readBuf); - - //read file name info - int r=0; - while(true) - { - r=socket.readData(readBuf); - if(r==0) - Thread.sleep(100); - else - { - break; - } - } - if(r==-1) - { - socket.close(); - return; - } - //how many bytes to read for the file name - byte[]len=new byte[4]; - bb.get(len); - if(verbose){ - StringBuilder sb=new StringBuilder(); - for(int i=0;i=buffer.length) - { - //ɹ - if(sum==dataLen) - { - //ʼ - for(int i=0;i hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡ - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(islagerRead) - { - // cd Ϊݶȡ׼ - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - } - else - { - //ԭ룬Сݽȫ - buffer[insert]=data; - numValidChunks.incrementAndGet(); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - - if(this.islagerRead) - { - //cd - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - if(readPosition==size) - {readPosition=0; - clearDeHash(this.size-leftNum); - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e8/20b1cad36ca800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/e8/20b1cad36ca800171a8482560d609ceb deleted file mode 100644 index e78d13a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e8/20b1cad36ca800171a8482560d609ceb +++ /dev/null @@ -1,42 +0,0 @@ -/** - * ļTestRecFile.java - * - * 汾Ϣ - * ڣ2017827 - * Copyright Corporation 2017 - * Ȩ - * - */ -package Test; - -import java.io.IOException; - -import judp.judpRecviceFile; - -/** - * - * Ŀƣjudp - * ƣTestRecFile - * - * ˣjinyu - * ʱ䣺2017827 6:32:42 - * ޸ˣjinyu - * ޸ʱ䣺2017827 6:32:42 - * ޸ıע - * @version - * - */ -public class TestRecFile { - - public static void main(String[] args) { - judpRecviceFile rec=new judpRecviceFile("192.168.10.86", 5555, "E:\\Study\\java\\filesudt\\send\\12.rmvb", "E:\\Study\\java\\filesudt\\rec\\1.rmvb"); - rec.start(); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e8/70971d3ce5ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/e8/70971d3ce5ac001716b9ca6d5abb90bc deleted file mode 100644 index bac3d45..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e8/70971d3ce5ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,243 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData() - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - byte[]tmp=recQueue.poll(); - if(tmp==null) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - continue; - } - if(writeFile(tmp)) - { - isStop=true; - break; - } - } - - } - - }); - fileW.setDaemon(true); - fileW.setName(fileName+"_Thread"); - fileW.start(); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - else - { - recData(); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - // - ss.close(); - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e8/b0ddd35cf7ab001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/e8/b0ddd35cf7ab001710ff8a7c6bda0fb8 deleted file mode 100644 index c003c4c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e8/b0ddd35cf7ab001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,129 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); -private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - // - if(!list.isEmpty()) - { - for(int i=0;i list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public UDTSocket getSocket() -{ - - int index=-1; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(index==-1) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳ - index=i; - i=-1;//± - - } - } - else - { - // - if(i==index) - { - continue; - } - else - { - list.get(i).close(); - long id=list.get(i).getSession().getSocketID(); - list.get(i).getEndpoint().removeSession(id); - list.get(i).getReceiver().stop(); - list.get(i).getSender().stop(); - } - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - if(index!=-1) - { - return list.get(index); - } - return null; - -} -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e9/4013f50ee5ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/e9/4013f50ee5ac001716b9ca6d5abb90bc deleted file mode 100644 index 9308681..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e9/4013f50ee5ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,236 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData(byte[] data) - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - byte[]tmp=recQueue.poll(); - if(tmp==null) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - continue; - } - if(writeFile(tmp)) - { - isStop=true; - break; - } - } - - } - - }); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - // - ss.close(); - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e9/90cd219a05ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/e9/90cd219a05ac001710ff8a7c6bda0fb8 deleted file mode 100644 index f1ea5ca..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e9/90cd219a05ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,92 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.WeakHashMap; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private final ReferenceQueue q = new ReferenceQueue(); - - /** - * ʹ - */ - private final WeakHashMap hashMap=new WeakHashMap (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("session"+); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e9/a022a50403ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/e9/a022a50403ac001710ff8a7c6bda0fb8 deleted file mode 100644 index f8b7f84..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e9/a022a50403ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,15 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; - -/** - * @author jinyu - * @param - * - */ -public class SocketQueue extends ReferenceQueue { - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e9/d006eeec21ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/e9/d006eeec21ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 582501f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e9/d006eeec21ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,211 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=1500; - private long sumLen=0; - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public void pauseOutput() - { - try { - client.getOutputStream().pauseOutput(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - public byte[] read() - { - byte[] result=null; - if(client!=null) - { - byte[] readBytes=new byte[bufSize];// - byte[] buf=new byte[bufSize];// - int index=0; - int r=0; - try { - while(true) - { - r=client.read(readBytes); - if(r==-1) - { - break; - } - else - { - if(r<=bufSize) - { - //result=new byte[r]; - //System.arraycopy(readBytes, 0, result, 0, r); - if(index+r hash=new ConcurrentHashMap(); -// private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - // - if(!list.isEmpty()) - { - for(int i=0;ihandoffQueue; - - private Thread receiverThread; - - private volatile boolean stopped=false; - - //(optional) ack interval (see CongestionControl interface) - private volatile long ackInterval=-1; - - /** - * if set to true connections will not expire, but will only be - * closed by a Shutdown message - */ - public static boolean connectionExpiryDisabled=false; - - private final boolean storeStatistics; - - - - /** - * create a receiver with a valid {@link UDTSession} - * @param session - */ - public UDTReceiver(UDTSession session,UDPEndPoint endpoint){ - this.endpoint = endpoint; - this.session=session; - this.sessionUpSince=System.currentTimeMillis(); - this.statistics=session.getStatistics(); - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - ackHistoryWindow = new AckHistoryWindow(16); - packetHistoryWindow = new PacketHistoryWindow(16); - receiverLossList = new ReceiverLossList(); - packetPairWindow = new PacketPairWindow(16); - largestReceivedSeqNumber=session.getInitialSequenceNumber()-1; - bufferSize=session.getReceiveBufferSize(); - handoffQueue=new ArrayBlockingQueue(4*session.getFlowWindowSize()); - storeStatistics=Boolean.getBoolean("udt.receiver.storeStatistics"); - initMetrics(); - start(); - } - - private MeanValue dgReceiveInterval; - private MeanValue dataPacketInterval; - private MeanValue processTime; - private MeanValue dataProcessTime; - private void initMetrics(){ - if(!storeStatistics)return; - dgReceiveInterval=new MeanValue("UDT receive interval"); - statistics.addMetric(dgReceiveInterval); - dataPacketInterval=new MeanValue("Data packet interval"); - statistics.addMetric(dataPacketInterval); - processTime=new MeanValue("UDT packet process time"); - statistics.addMetric(processTime); - dataProcessTime=new MeanValue("Data packet process time"); - statistics.addMetric(dataProcessTime); - } - - - //starts the sender algorithm - private void start(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - nextACK=Util.getCurrentTime()+ackTimerInterval; - nextNAK=(long)(Util.getCurrentTime()+1.5*nakTimerInterval); - nextEXP=Util.getCurrentTime()+2*expTimerInterval; - ackInterval=session.getCongestionControl().getAckInterval(); - while(!stopped){ - receiverAlgorithm(); - } - } - catch(Exception ex){ - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING RECEIVER for "+session); - } - }; - receiverThread=UDTThreadFactory.get().newThread(r); - receiverThread.start(); - } - - /* - * packets are written by the endpoint - */ - protected void receive(UDTPacket p)throws IOException{ - if(storeStatistics)dgReceiveInterval.end(); - handoffQueue.offer(p); - if(storeStatistics)dgReceiveInterval.begin(); - } - - /** - * receiver algorithm - * see specification P11. - */ - public void receiverAlgorithm()throws InterruptedException,IOException{ - //check ACK timer - long currentTime=Util.getCurrentTime(); - if(nextACKseqNumbers=receiverLossList.getFilteredSequenceNumbers(roundTripTime,true); - sendNAK(seqNumbers); - } - - /** - * process EXP event (see spec. p 13) - */ - protected void processEXPEvent()throws IOException{ - if(session.getSocket()==null)return; - UDTSender sender=session.getSocket().getSender(); - //put all the unacknowledged packets in the senders loss list - sender.putUnacknowledgedPacketsIntoLossList(); - if(expCount>16 && System.currentTimeMillis()-sessionUpSince > IDLE_TIMEOUT){ - if(!connectionExpiryDisabled &&!stopped){ - sendShutdown(); - stop(); - logger.info("Session "+session+" expired."); - return; - } - } - if(!sender.haveLostPackets()){ - sendKeepAlive(); - } - expCount++; - } - - protected void processUDTPacket(UDTPacket p)throws IOException{ - //(3).Check the packet type and process it according to this. - - if(!p.isControlPacket()){ - DataPacket dp=(DataPacket)p; - if(storeStatistics){ - dataPacketInterval.end(); - dataProcessTime.begin(); - } - onDataPacketReceived(dp); - if(storeStatistics){ - dataProcessTime.end(); - dataPacketInterval.begin(); - } - logger.info("DataPacket udt:"+p.getPacketSequenceNumber()); - } - - else if (p.getControlPacketType()==ControlPacketType.ACK2.ordinal()){ - Acknowledgment2 ack2=(Acknowledgment2)p; - onAck2PacketReceived(ack2); - } - - else if (p instanceof Shutdown){ - onShutdown(); - } - - } - - //every nth packet will be discarded... for testing only of course - public static int dropRate=0; - - //number of received data packets - private int n=0; - - protected void onDataPacketReceived(DataPacket dp)throws IOException{ - long currentSequenceNumber = dp.getPacketSequenceNumber(); - - //for TESTING : check whether to drop this packet -// n++; -// //if(dropRate>0 && n % dropRate == 0){ -// if(n % 1111 == 0){ -// logger.info("**** TESTING:::: DROPPING PACKET "+currentSequenceNumber+" FOR TESTING"); -// return; -// } -// //} - boolean OK=session.getSocket().getInputStream().haveNewData(currentSequenceNumber,dp.getData()); - if(!OK){ - //need to drop packet... - return; - } - - long currentDataPacketArrivalTime = Util.getCurrentTime(); - - /*(4).if the seqNo of the current data packet is 16n+1,record the - time interval between this packet and the last data packet - in the packet pair window*/ - if((currentSequenceNumber%16)==1 && lastDataPacketArrivalTime>0){ - long interval=currentDataPacketArrivalTime -lastDataPacketArrivalTime; - packetPairWindow.add(interval); - } - - //(5).record the packet arrival time in the PKT History Window. - packetHistoryWindow.add(currentDataPacketArrivalTime); - - - //store current time - lastDataPacketArrivalTime=currentDataPacketArrivalTime; - logger.info("largestReceivedSeqNumber:"+largestReceivedSeqNumber); - - //(6).number of detected lossed packet - /*(6.a).if the number of the current data packet is greater than LSRN+1, - put all the sequence numbers between (but excluding) these two values - into the receiver's loss list and send them to the sender in an NAK packet*/ - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber+1)>0){ - sendNAK(currentSequenceNumber); - logger.info("sendNAK:"+currentSequenceNumber); - } - else if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)<0){ - /*(6.b).if the sequence number is less than LRSN,remove it from - * the receiver's loss list - */ - receiverLossList.remove(currentSequenceNumber); - logger.info("receiverLossList remove:"+currentSequenceNumber); - } - - statistics.incNumberOfReceivedDataPackets(); - - //(7).Update the LRSN - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)>0){ - largestReceivedSeqNumber=currentSequenceNumber; - } - - //(8) need to send an ACK? Some cc algorithms use this - if(ackInterval>0){ - if(n % ackInterval == 0)processACKEvent(false); - } - } - - /** - * write a NAK triggered by a received sequence number that is larger than - * the largestReceivedSeqNumber + 1 - * @param currentSequenceNumber - the currently received sequence number - * @throws IOException - */ - protected void sendNAK(long currentSequenceNumber)throws IOException{ - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(largestReceivedSeqNumber+1, currentSequenceNumber); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - //put all the sequence numbers between (but excluding) these two values into the - //receiver loss list - for(long i=largestReceivedSeqNumber+1;isequenceNumbers)throws IOException{ - if(sequenceNumbers.size()==0)return; - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(sequenceNumbers); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(nAckPacket); - statistics.incNumberOfNAKSent(); - logger.info("sendNAK List:"+sequenceNumbers.size()); - } - - protected long sendLightAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt=buildLightAcknowledgement(ackNumber); - endpoint.doSend(acknowledgmentPkt); - statistics.incNumberOfACKSent(); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - protected long sendAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); - //set the estimate link capacity - estimateLinkCapacity=packetPairWindow.getEstimatedLinkCapacity(); - acknowledgmentPkt.setEstimatedLinkCapacity(estimateLinkCapacity); - //set the packet arrival rate - packetArrivalSpeed=packetHistoryWindow.getPacketArrivalSpeed(); - acknowledgmentPkt.setPacketReceiveRate(packetArrivalSpeed); - - endpoint.doSend(acknowledgmentPkt); - - statistics.incNumberOfACKSent(); - statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - //builds a "light" Acknowledgement - private Acknowledgement buildLightAcknowledgement(long ackNumber){ - Acknowledgement acknowledgmentPkt = new Acknowledgement(); - //the packet sequence number to which all the packets have been received - acknowledgmentPkt.setAckNumber(ackNumber); - //assign this ack a unique increasing ACK sequence number - acknowledgmentPkt.setAckSequenceNumber(++ackSequenceNumber); - acknowledgmentPkt.setRoundTripTime(roundTripTime); - acknowledgmentPkt.setRoundTripTimeVar(roundTripTimeVar); - //set the buffer size - acknowledgmentPkt.setBufferSize(bufferSize); - - acknowledgmentPkt.setDestinationID(session.getDestination().getSocketID()); - acknowledgmentPkt.setSession(session); - - return acknowledgmentPkt; - } - - /** - * spec p. 13:
- 1) Locate the related ACK in the ACK History Window according to the - ACK sequence number in this ACK2.
- 2) Update the largest ACK number ever been acknowledged.
- 3) Calculate new rtt according to the ACK2 arrival time and the ACK - departure time, and update the RTT value as: RTT = (RTT * 7 + - rtt) / 8.
- 4) Update RTTVar by: RTTVar = (RTTVar * 3 + abs(RTT - rtt)) / 4.
- 5) Update both ACK and NAK period to 4 * RTT + RTTVar + SYN.
- */ - protected void onAck2PacketReceived(Acknowledgment2 ack2){ - AckHistoryEntry entry=ackHistoryWindow.getEntry(ack2.getAckSequenceNumber()); - if(entry!=null){ - long ackNumber=entry.getAckNumber(); - largestAcknowledgedAckNumber=Math.max(ackNumber, largestAcknowledgedAckNumber); - - long rtt=entry.getAge(); - if(roundTripTime>0)roundTripTime = (roundTripTime*7 + rtt)/8; - else roundTripTime = rtt; - roundTripTimeVar = (roundTripTimeVar* 3 + Math.abs(roundTripTimeVar- rtt)) / 4; - ackTimerInterval=4*roundTripTime+roundTripTimeVar+Util.getSYNTime(); - nakTimerInterval=ackTimerInterval; - statistics.setRTT(roundTripTime, roundTripTimeVar); - } - } - - protected void sendKeepAlive()throws IOException{ - KeepAlive ka=new KeepAlive(); - ka.setDestinationID(session.getDestination().getSocketID()); - ka.setSession(session); - endpoint.doSend(ka); - } - - protected void sendShutdown()throws IOException{ - Shutdown s=new Shutdown(); - s.setDestinationID(session.getDestination().getSocketID()); - s.setSession(session); - endpoint.doSend(s); - } - - private volatile long ackSequenceNumber=0; - - protected void resetEXPTimer(){ - nextEXP=Util.getCurrentTime()+expTimerInterval; - expCount=0; - } - - protected void resetEXPCount(){ - expCount=0; - } - - public void setAckInterval(long ackInterval){ - this.ackInterval=ackInterval; - } - - protected void onShutdown()throws IOException{ - stop(); - } - - public void stop()throws IOException{ - stopped=true; - session.getSocket().close(); - //stop our sender as well - session.getSocket().getSender().stop(); - } - - @Override - public String toString(){ - StringBuilder sb=new StringBuilder(); - sb.append("UDTReceiver ").append(session).append("\n"); - sb.append("LossList: "+receiverLossList); - return sb.toString(); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/eb/2021a16626ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/eb/2021a16626ac001710ff8a7c6bda0fb8 deleted file mode 100644 index b981a90..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/eb/2021a16626ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,87 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=16; - public static byte[][] splitData(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference objsocket=(SocketReference) q.poll(); - if(objsocket.get()!=null) - { - judpSocket socket=objsocket.get(); - if(socket.getCloseState()) - { - - socket.close(); - } - } - - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - private void startThread() { - - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/eb/b0e8f93623ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/eb/b0e8f93623ac001710ff8a7c6bda0fb8 deleted file mode 100644 index ae150bf..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/eb/b0e8f93623ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,232 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData= PackagetSub.split(data); - for(int i=0;i - *
    - *
  • set initial sequence number
  • - *
  • send response handshake
  • - *
- * @param handshake - * @param peer - * @throws IOException - */ - protected void handleHandShake(ConnectionHandshake handshake)throws IOException{ - ConnectionHandshake responseHandshake = new ConnectionHandshake(); - //compare the packet size and choose minimun - long clientBufferSize=handshake.getPacketSize(); - long myBufferSize=getDatagramSize(); - long bufferSize=Math.min(clientBufferSize, myBufferSize); - long initialSequenceNumber=handshake.getInitialSeqNo(); - setInitialSequenceNumber(initialSequenceNumber); - setDatagramSize((int)bufferSize); - responseHandshake.setPacketSize(bufferSize); - responseHandshake.setUdtVersion(4); - responseHandshake.setInitialSeqNo(initialSequenceNumber); - responseHandshake.setConnectionType(-1); - responseHandshake.setMaxFlowWndSize(handshake.getMaxFlowWndSize()); - //tell peer what the socket ID on this side is - responseHandshake.setSocketID(mySocketID); - responseHandshake.setDestinationID(this.getDestination().getSocketID()); - responseHandshake.setSession(this); - logger.info("Sending reply "+responseHandshake); - endPoint.doSend(responseHandshake); - } - - - - -} - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ec/00a2d3dd6fa800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/ec/00a2d3dd6fa800171a8482560d609ceb deleted file mode 100644 index cbbf754..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ec/00a2d3dd6fa800171a8482560d609ceb +++ /dev/null @@ -1,82 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public UDTSocket getSocket() -{ - - int index=-1; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(index==-1) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳ - i=-1;//± - index=i; - } - } - else - { - // - if(i==index) - { - continue; - } - else - { - list.get(i).close(); - long id=list.get(i).getSession().getSocketID(); - list.get(i).getEndpoint().removeSession(id); - list.get(i).getReceiver().stop(); - list.get(i).getSender().stop(); - } - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - if(index!=-1) - { - return list.get(index); - } - return null; - -} -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ec/803ad67e6da800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/ec/803ad67e6da800171a8482560d609ceb deleted file mode 100644 index e15d011..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ec/803ad67e6da800171a8482560d609ceb +++ /dev/null @@ -1,42 +0,0 @@ -/** - * - */ -package net.File; - -import java.util.logging.Logger; - -import net.File.FileMonitor; -import net.File.FilesWatch; - - - - -/** - * @author jinyu - * - */ -public class TestSendFile { - private static Logger log=Logger.getLogger(TestSendFile.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //SendFiles send=new SendFiles("192.168.9.152", 5555); - SendFiles send=new SendFiles("127.0.0.1", 5555); - FilesWatch watch=new FilesWatch(); - String dir="F:/monitor"; - watch.setWatch(dir); - watch.start(); - while(true) - { - FileMonitor ff= watch.take(); - log.info(ff.file); - if(ff.file.endsWith(".tmp")) - { - continue; - } - send.sendFile(dir+"/"+ff.file); - } - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ec/80b1fc5504ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/ec/80b1fc5504ac001710ff8a7c6bda0fb8 deleted file mode 100644 index ba0d566..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ec/80b1fc5504ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,79 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private LinkedBlockingQueue> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - while((k = (SocketReference) q.remove()) != null) { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - private void startThread() { - - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ec/b0b90ce869a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/ec/b0b90ce869a800171a8482560d609ceb deleted file mode 100644 index 46c353d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ec/b0b90ce869a800171a8482560d609ceb +++ /dev/null @@ -1,113 +0,0 @@ -/** - * - */ -package judp; - -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.SynchronousQueue; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.UDTServerSocket; -import udt.UDTSocket; - -/** - * @author jinyu - * ˽շװ - * - */ -public class judpServer { -private UDTServerSocket server=null; -private final SynchronousQueue sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean Start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - //judpSocket jsocket=new judpSocket(csocket); - - //SocketManager.getInstance().addGC(jsocket,csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=accept() - } - judpSocket jsocket=new judpSocket(socket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ed/d0307bf0c4ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/ed/d0307bf0c4ad0017181ed9113883eda9 deleted file mode 100644 index 9c938ec..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ed/d0307bf0c4ad0017181ed9113883eda9 +++ /dev/null @@ -1,516 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - // cd - private volatile int bufferNum=0; - private volatile boolean isModify=true; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - // - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ed/e076043e66a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/ed/e076043e66a800171a8482560d609ceb deleted file mode 100644 index 51216ee..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ed/e076043e66a800171a8482560d609ceb +++ /dev/null @@ -1,50 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public UDTSocket getSocket() -{ - for( int i = 0 ; i < list.size() ; i++) { - try { - if(list.get(i).getInputStream().isHasData()) - { - return list.get(i); - } - } catch (IOException e) { - e.printStackTrace(); - } - } - return null; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ee/2060f2c92dac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/ee/2060f2c92dac001710ff8a7c6bda0fb8 deleted file mode 100644 index 1fa20a8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ee/2060f2c92dac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,100 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=20; - - /** - * ָ - * @param data - * @return - */ - public static byte[][] splitData(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize>0?1:0; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/timespan/1000; - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ee/e063a0e405ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/ee/e063a0e405ac001710ff8a7c6bda0fb8 deleted file mode 100644 index c2ec32b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ee/e063a0e405ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,96 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.WeakHashMap; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private final ReferenceQueue q = new ReferenceQueue(); - private long num=0; - /** - * ʹ - */ - private final WeakHashMap hashMap=new WeakHashMap (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("socket"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - if(num%200==0) - { - - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f/007161e403ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/f/007161e403ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 1e5437c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f/007161e403ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,70 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private LinkedBlockingQueue> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - WeakReference k; - while((k = (WeakReference) q.remove()) != null) { - System.out.println((cnt++) + ":" + k); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - private void startThread() { - - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f/80cfa981e4ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/f/80cfa981e4ac001716b9ca6d5abb90bc deleted file mode 100644 index 222dbd1..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f/80cfa981e4ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,220 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData(byte[] data) - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - - - } - - }); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f0/b00e1d621dac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/f0/b00e1d621dac001710ff8a7c6bda0fb8 deleted file mode 100644 index 41c29ef..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f0/b00e1d621dac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,62 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] buffer=null; -public long id; -private volatile int num=0; -private volatile int sum=0; -private byte[] result=null; -public DataStruct(int num) -{ - buffer=new byte[num][]; -} -private boolean check() -{ - if(num>=buffer.length) - { - //ɹ - if(sum==dataLen) - { - //ʼ - result=new byte[dataLen]; - int index=0; - for(int i=0;i100) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - int sum=0; - long startTime=System.currentTimeMillis(); - while((count=dis.read(buf,0, bufSize))!=-1) - { - - if(count==bufSize) - { - client.sendData(buf); - sum+=bufSize; - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - sum+=count; - } - - } - client.close(); - dis.close(); - log.info("ɣ"+f.getName()); - } - catch(Exception ex) - { - - } - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f1/4058227a03ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/f1/4058227a03ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 7db9771..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f1/4058227a03ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,76 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private LinkedBlockingQueue> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - startThread(); - startGC(); - this.endPoint=point; - - } - private void startGC() { - - - } - private void startThread() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - WeakReference objsocket=queue.take(); - if(objsocket.get()!=null) - { - judpSocket socket=objsocket.get(); - if(socket.getCloseState()) - { - socket.close(); - } - } - - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f1/a0ccf39ca2ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/f1/a0ccf39ca2ad0017181ed9113883eda9 deleted file mode 100644 index 4ba8bae..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f1/a0ccf39ca2ad0017181ed9113883eda9 +++ /dev/null @@ -1,102 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.StringReader; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; -import org.w3c.dom.NodeList; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - -/** - * @author jinyu - * - */ -public class ReadXml { - public static String getPath() { - URL url = ReadXml.class.getProtectionDomain().getCodeSource().getLocation(); - String filePath = null; - try { - filePath = URLDecoder.decode(url.getPath(), "utf-8");// תΪutf-8 - } catch (Exception e) { - e.printStackTrace(); - } - if (filePath.endsWith(".jar")) {// ִjarеĽ".jar" - // ȡ·еjar - filePath = filePath.substring(0, filePath.lastIndexOf("/") + 1); - } - - File file = new File(filePath); - - // /If this abstract pathname is already absolute, then the pathname - // string is simply returned as if by the getPath method. If this - // abstract pathname is the empty abstract pathname then the pathname - // string of the current user directory, which is named by the system - // property user.dir, is returned. - filePath = file.getAbsolutePath();//õwindowsµȷ· - return filePath; - } -public String readXml(String file) -{ - File f=new File(file); - if(!f.exists()) - { - return ""; - } - // - String xmlStr= readFile(file); - StringReader sr = new StringReader(xmlStr); - InputSource is = new InputSource(sr); - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - DocumentBuilder builder = null; - try { - builder = factory.newDocumentBuilder(); - } catch (ParserConfigurationException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - Document doc = null; - try { - doc = (Document) builder.parse(is); - } catch (SAXException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - NodeList list=doc.getElementsByTagName("IP"); - String ip= list.item(0).getTextContent(); - list=doc.getElementsByTagName("Port"); - String port=list.item(0).getTextContent(); - list=doc.getElementsByTagName("Dir"); - String dir=list.item(0).getTextContent(); - String strxml=ip+","+port+","+dir; - return strxml; - } -private String readFile(String file) -{ - StringBuilder result = new StringBuilder(); - try{ - BufferedReader br = new BufferedReader(new FileReader(file));//һBufferedReaderȡļ - String s = null; - while((s = br.readLine())!=null){//ʹreadLineһζһ - result.append(System.lineSeparator()+s); - } - br.close(); - }catch(Exception e){ - e.printStackTrace(); - } - return result.toString(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f1/f0b1078018ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/f1/f0b1078018ac001710ff8a7c6bda0fb8 deleted file mode 100644 index e69de29..0000000 diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f2/00fb9210c5ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/f2/00fb9210c5ad0017181ed9113883eda9 deleted file mode 100644 index 60d3290..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f2/00fb9210c5ad0017181ed9113883eda9 +++ /dev/null @@ -1,516 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - // cd - private volatile int bufferNum=0; - private volatile boolean isModify=true; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - // - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - for(long s=lastAckSequenceNumber;s move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f2/205b62d228ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/f2/205b62d228ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 1f34d9c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f2/205b62d228ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,99 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=16; - - /** - * ָ - * @param data - * @return - */ - public static byte[][] splitData(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i> queue=new LinkedBlockingQueue>(); - private final ReferenceQueue q = new ReferenceQueue(); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - private void startThread() { - - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - queue.add(socket); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f2/7032eb2669a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/f2/7032eb2669a800171a8482560d609ceb deleted file mode 100644 index d0ed24b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f2/7032eb2669a800171a8482560d609ceb +++ /dev/null @@ -1,83 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - } - } - - }); - processSocket.setDaemon(true); - processSocket.setName("processSocket"); - processSocket.start(); - -} - -public static synchronized SocketControls getInstance() { - - if (instance == null) { - - instance = new SocketControls(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f2/70e487be1fac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/f2/70e487be1fac001710ff8a7c6bda0fb8 deleted file mode 100644 index 44126c5..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f2/70e487be1fac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,39 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -/** - * @author jinyu - * - */ -public class PackagetCombin { - private static ConcurrentHashMap hash=new ConcurrentHashMap(); - private ConcurrentLinkedQueue queue=new ConcurrentLinkedQueue(); -public boolean addData(byte[] data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - DataStruct struct=hash.get(id); - if(struct==null) - { - struct=new DataStruct(num); - hash.put(id, struct); - } - boolean r= struct.addData(data); - if(r) - { - byte[]result =struct.getData(); - byte[] tmp=new byte[result.length]; - System.arraycopy(result, 0, tmp, 0, tmp.length); - queue.offer(tmp); - struct.clear(); - } - return r; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f3/f0a22d5cb5ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/f3/f0a22d5cb5ad0017181ed9113883eda9 deleted file mode 100644 index 3a6989e..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f3/f0a22d5cb5ad0017181ed9113883eda9 +++ /dev/null @@ -1,522 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;s0) - { - if(lastAckSequenceNumber/10000!=ackNumber/10000) - { - // - //ackNumber رȫɾرСһɾ - if(lastAckSequenceNumberthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - // - } - } - } - } - - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f4/601a0f24e4ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/f4/601a0f24e4ac001716b9ca6d5abb90bc deleted file mode 100644 index 81438ce..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f4/601a0f24e4ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,210 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - ConcurrentLinkedQueue recData=new ConcurrentLinkedQueue(); - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - private void recData(byte[] data) - { - - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(true) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - if(writeFile(tmp)) - { - ss.close(); - break; - } - // - - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f4/f0223ffad6ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/f4/f0223ffad6ac001716b9ca6d5abb90bc deleted file mode 100644 index 0075291..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f4/f0223ffad6ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,274 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public int dataLen=0; - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - System.out.println("sendBlocking start"); - client.sendBlocking(data); - r=data.length; - sumLen+=r; - System.out.println("sendBlocking end"); - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData=null; - if(dataLen==0) - { - sendData=PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - sendData=sub.split(data, dataLen); - } - for(int i=0;i sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean Start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - //judpSocket jsocket=new judpSocket(csocket); - - //SocketManager.getInstance().addGC(jsocket,csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} - -/** - * ӵsocket - */ -public judpSocket accept() -{ -try { - judpSocket jsocket= sessionHandoff.take(); - return jsocket; -} catch (InterruptedException e) { - logger.info("judpSocketжϣ"+e.getMessage()); - e.printStackTrace(); -} -return null; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f6/305344955ca800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/f6/305344955ca800171a8482560d609ceb deleted file mode 100644 index a8661c2..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f6/305344955ca800171a8482560d609ceb +++ /dev/null @@ -1,229 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Destination; -import udt.packets.Shutdown; -import udt.util.UDTStatistics; - -public class UDTClient { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - private final UDPEndPoint clientEndpoint; - private ClientSession clientSession; - private boolean close=false; - private Thread closeThread=null;//cd - private final int waitClose=10*1000; - public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address,localport); - logger.info("Created client endpoint on port "+localport); - } - - public UDTClient(InetAddress address)throws SocketException, UnknownHostException{ - //create endpoint - clientEndpoint=new UDPEndPoint(address); - logger.info("Created client endpoint on port "+clientEndpoint.getLocalPort()); - } - - public UDTClient(UDPEndPoint endpoint)throws SocketException, UnknownHostException{ - clientEndpoint=endpoint; - } - - /** - * establishes a connection to the given server. - * Starts the sender thread. - * @param host - * @param port - * @throws UnknownHostException - */ - public void connect(String host, int port)throws InterruptedException, UnknownHostException, IOException{ - InetAddress address=InetAddress.getByName(host); - Destination destination=new Destination(address,port); - //create client session... - clientSession=new ClientSession(clientEndpoint,destination); - clientEndpoint.addSession(clientSession.getSocketID(), clientSession); - - clientEndpoint.start(); - clientSession.connect(); - //wait for handshake - while(!clientSession.isReady()){ - Thread.sleep(500); - } - logger.info("The UDTClient is connected"); - Thread.sleep(500); - } - - /** - * sends the given data asynchronously - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - public void send(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWrite(data); - } - - public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - clientSession.getSocket().doWriteBlocking(data); - } - - public int read(byte[]data)throws IOException, InterruptedException{ - return clientSession.getSocket().getInputStream().read(data); - } - - /** - * flush outstanding data (and make sure it is acknowledged) - * @throws IOException - * @throws InterruptedException - */ - public void flush()throws IOException, InterruptedException{ - clientSession.getSocket().flush(); - } - - - public void shutdown()throws IOException{ - - if (clientSession.isReady()&& clientSession.active==true) - { - Shutdown shutdown = new Shutdown(); - shutdown.setDestinationID(clientSession.getDestination().getSocketID()); - shutdown.setSession(clientSession); - try{ - clientEndpoint.doSend(shutdown); - TimeUnit.MILLISECONDS.sleep(100); - } - catch(Exception e) - { - logger.log(Level.SEVERE,"ERROR: Connection could not be stopped!",e); - } - clientSession.getSocket().getReceiver().stop(); - clientEndpoint.stop(); - //cd - clientEndpoint.removeSession(clientSession.getSocketID()); - clientSession.getSocket().getSender().stop(); - close=true; - } - } - - public UDTInputStream getInputStream()throws IOException{ - return clientSession.getSocket().getInputStream(); - } - - public UDTOutputStream getOutputStream()throws IOException{ - return clientSession.getSocket().getOutputStream(); - } - - public UDPEndPoint getEndpoint()throws IOException{ - return clientEndpoint; - } - - public UDTStatistics getStatistics(){ - return clientSession.getStatistics(); - } - - public long getSocketID() - { - //cd - return clientSession.getSocketID(); - } - - /** - * ͬر - * ȴݷɺٹر - * ֻȴ10ss - */ - public synchronized void close() - { - close=true; - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(clientSession.getSocket().getSender().isSenderEmpty()) - { - try { - shutdown(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if() - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } - - public boolean isClose() - { - return close; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f6/6074ea1c65a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/f6/6074ea1c65a800171a8482560d609ceb deleted file mode 100644 index b07dda3..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f6/6074ea1c65a800171a8482560d609ceb +++ /dev/null @@ -1,61 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - - - } - - }); - processSocket.setDaemon(true); - processSocket.setName("processSocket"); - processSocket.start(); - -} - -public static synchronized SocketControls getInstance() { - - if (instance == null) { - - instance = new SocketControls(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f6/70c6c0fe05ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/f6/70c6c0fe05ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 842ced2..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f6/70c6c0fe05ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,95 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; - -import java.util.WeakHashMap; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private final ReferenceQueue q = new ReferenceQueue(); - private long num=0; - /** - * ʹ - */ - private final WeakHashMap hashMap=new WeakHashMap (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("socket"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - if(num%200==0) - { - System.gc(); - } - num++; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f6/80457721b5ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/f6/80457721b5ad0017181ed9113883eda9 deleted file mode 100644 index 1bcb149..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f6/80457721b5ad0017181ed9113883eda9 +++ /dev/null @@ -1,515 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - // - } - - } - - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f7/40b0cfa5d6ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/f7/40b0cfa5d6ac001716b9ca6d5abb90bc deleted file mode 100644 index 350dea8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f7/40b0cfa5d6ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,288 +0,0 @@ -package udt.util; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -import udt.UDTInputStream.AppData; - -/** - * - * The receive buffer stores data chunks to be read by the application - * - * @author schuller - */ -public class ReceiveBuffer { - - private final AppData[]buffer; - - //the head of the buffer: contains the next chunk to be read by the application, - //i.e. the one with the lowest sequence number - private volatile int readPosition=0; - - //the lowest sequence number stored in this buffer - private final long initialSequenceNumber; - - //the highest sequence number already read by the application - private long highestReadSequenceNumber; - - //number of chunks - private final AtomicInteger numValidChunks=new AtomicInteger(0); - - //lock and condition for poll() with timeout - private final Condition notEmpty; - private final ReentrantLock lock; - - //the size of the buffer - private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡҲҪⲿٶȡ - public ReceiveBuffer(int size, long initialSequenceNumber){ - this.size=size; - this.buffer=new AppData[size]; - this.initialSequenceNumber=initialSequenceNumber; - lock=new ReentrantLock(false); - notEmpty=lock.newCondition(); - highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); - } - - public boolean offer(AppData data){ - if(numValidChunks.get()==size) { - return false; - } - lock.lock(); - try{ - long seq=data.getSequenceNumber(); - //if already have this chunk, discard it - if(SequenceNumber.compare(seq, initialSequenceNumber)<0)return true; - //else compute insert position - int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); - int insert=offset% size; - if(islagerRead) - { - // cd Ϊݶȡ׼ - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - } - else - { - //ԭ룬Сݽȫ - buffer[insert]=data; - numValidChunks.incrementAndGet(); - } - notEmpty.signal(); - return true; - }finally{ - lock.unlock(); - } - } - - /** - * return a data chunk, guaranteed to be in-order, waiting up to the - * specified wait time if necessary for a chunk to become available. - * - * @param timeout how long to wait before giving up, in units of - * unit - * @param unit a TimeUnit determining how to interpret the - * timeout parameter - * @return data chunk, or null if the - * specified waiting time elapses before an element is available - * @throws InterruptedException if interrupted while waiting - */ - public AppData poll(int timeout, TimeUnit units)throws InterruptedException{ - lock.lockInterruptibly(); - long nanos = units.toNanos(timeout); - - try { - for (;;) { - if (numValidChunks.get() != 0) { - return poll(); - } - if (nanos <= 0) - return null; - try { - nanos = notEmpty.awaitNanos(nanos); - } catch (InterruptedException ie) { - notEmpty.signal(); // propagate to non-interrupted thread - throw ie; - } - - } - } finally { - lock.unlock(); - } - } - - - /** - * return a data chunk, guaranteed to be in-order. - */ - public AppData poll(){ - if(numValidChunks.get()==0){ - return null; - } - AppData r=buffer[readPosition]; - if(r!=null){ - long thisSeq=r.getSequenceNumber(); - if(1==SequenceNumber.seqOffset(highestReadSequenceNumber,thisSeq)){ - increment(); - highestReadSequenceNumber=thisSeq; - } - else - { - - if(this.islagerRead) - { - //cd - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - } - return null; - } - } - // else{ - // System.out.println("empty HEAD at pos="+readPosition); - // try{ - // Thread.sleep(1000); - // Thread.yield(); - // }catch(InterruptedException e){}; - // } - if(this.islagerRead) - { - // cd - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - } - return r; - } - - public int getSize(){ - return size; - } - - void increment(){ - buffer[readPosition]=null; - readPosition++; - - if(readPosition==size) - {readPosition=0; - if(this.islagerRead) - { - //cd - clearDeHash(this.size-leftNum); - } - } - numValidChunks.decrementAndGet(); - } - - public boolean isEmpty(){ - return numValidChunks.get()==0; - } - - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } - - /** - * ôݶȡ - * @param islarge - */ - public void setLargeRead(boolean islarge) - { - this.islagerRead=islarge; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f7/603bf12c1fac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/f7/603bf12c1fac001710ff8a7c6bda0fb8 deleted file mode 100644 index 931c38e..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f7/603bf12c1fac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,28 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -/** - * @author jinyu - * - */ -public class PackagetCombin { - private static ConcurrentHashMap hash=new ConcurrentHashMap(); -public DataStruct addData(byte[] data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - DataStruct struct=hash.get(id); - if(struct==null) - { - struct=new DataStruct(num); - hash.put(id, struct); - } - boolean r= struct.addData(data); - return struct; -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f7/702d21411aac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/f7/702d21411aac001710ff8a7c6bda0fb8 deleted file mode 100644 index f8c9a59..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f7/702d21411aac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,76 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=20; - public static byte[][] split(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int num=data.length/bufsize+data.length%bufsize; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - byte[][] result=new byte[num][]; - for(int i=0;i list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public UDTSocket getSocket() -{ - UDTSocket find=null; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳر - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - return null; - -} -public void clear() -{ - list.clear(); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f8/60ddb5c326ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/f8/60ddb5c326ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 0152aaf..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f8/60ddb5c326ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,234 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; - -import udt.UDTClient; - -/** - * @author jinyu - * ͻ˷ - */ -public class judpClient { - private UDTClient client=null; - private final int bufSize=65535; - private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public int len=0; - public judpClient(String lcoalIP,int port) - { - InetAddress addr = null; - try { - addr = InetAddress.getByName(lcoalIP); - } catch (UnknownHostException e1) { - - e1.printStackTrace(); - } - - try { - client=new UDTClient(addr,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient() - { - try { - client=new UDTClient(null,0); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public judpClient(int port) - { - try { - client=new UDTClient(null,port); - } catch (SocketException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - SocketManager.getInstance().addGC(this,client); - } - public boolean connect(String ip,int port) - { - boolean isSucess=false; - if(client!=null) - { - try { - client.connect(ip, port); - isSucess=true; - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - - return isSucess; - } - public int sendData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - if(client!=null) - { - try { - client.sendBlocking(data); - r=data.length; - sumLen+=r; - } catch (IOException e) { - - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - return r; - } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData= PackagetSub.splitData(data); - for(int i=0;i=buffer.length) - { - //ɹ - if(sum==dataLen) - { - //ʼ - result=new byte[dataLen]; - ByteBuffer cur=ByteBuffer.wrap(result); - for(int i=0;i sessionHandoff=new SynchronousQueue(); -private boolean isStart=true; -private boolean isSucess=true; -private boolean isRWMaster=true;//Ĭֵһ -private boolean islagerRead; -private static final Logger logger=Logger.getLogger(judpServer.class.getName()); - -/** - * رշ - */ -public void close() -{ - isStart=false; - server.getEndpoint().stop(); -} - -/** - * - * @param port ˿ - */ -public judpServer(int port) -{ - - try { - server=new UDTServerSocket(port); - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - * @param localIP IP - * @param port ˿ - */ -public judpServer(String localIP,int port) -{ - try { - InetAddress addr= InetAddress.getByName(localIP); - server=new UDTServerSocket(addr,port); - - } catch (SocketException e) { - logger.log(Level.WARNING, "ʧܣ"+e.getMessage()); - isSucess=false; - } catch (UnknownHostException e) { - isSucess=false; - e.printStackTrace(); - } -} - -/** - * - */ -public boolean start() -{ - if(!isStart||!isSucess) - { - logger.log(Level.WARNING, "Ѿرյļ˿ڲʹ"); - return false; - } - Thread serverThread=new Thread(new Runnable() { - - @Override - public void run() { - while(isStart) - { - try { - UDTSocket csocket= server.accept(); - SocketControls.getInstance().addSocket(csocket); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - }); - serverThread.setDaemon(true); - serverThread.setName("judpServer_"+System.currentTimeMillis()); - serverThread.start(); - return true; -} -/** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * islagerRead=true - * @param isRead - */ -public void resetBufMaster(boolean isRead) -{ - this.isRWMaster=isRead; - -} - -/** - * ôݶȡ - * Ĭ false - * @param islarge - */ -public void setLargeRead(boolean islarge) -{ - this.islagerRead=islarge; -} -/** - * ӵsocket - */ -public judpSocket accept() -{ - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=SocketControls.getInstance().getSocket(); - } - judpSocket jsocket=new judpSocket(socket); - judpSocketManager.getInstance(socket.getEndpoint()).addSocket(jsocket); - return jsocket; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/fa/1096727405ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/fa/1096727405ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 7d221cc..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/fa/1096727405ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,87 +0,0 @@ -/** - * - */ -package judp; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import udt.UDPEndPoint; -import udt.UDTClient; -import udt.UDTSession; - -/** - * @author jinyu - * ܶ˵judpSocket - */ -public class judpSocketManager { - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private final ReferenceQueue q = new ReferenceQueue(); - private final WeakHashMap hashMap=new WeakHashMap (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/fb/30fc8d1b66a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/fb/30fc8d1b66a800171a8482560d609ceb deleted file mode 100644 index 6575b72..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/fb/30fc8d1b66a800171a8482560d609ceb +++ /dev/null @@ -1,45 +0,0 @@ -/** - * - */ -package judp; - -import java.util.ArrayList; - -import udt.UDTSocket; - -/** - * @author jinyu - * Ŀķ - */ -public class judpGroupSocket { -private ArrayList list=new ArrayList(); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * @return - */ -public judpGroupSocket getSocket() -{ - for( int i = 0 ; i < list.size() ; i++) { - if(list.get(i).getInputStream().isHasData()) - { - return list.get(i); - } - } - return null; - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/fb/e0a01d43f2ab001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/fb/e0a01d43f2ab001710ff8a7c6bda0fb8 deleted file mode 100644 index 549b0fd..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/fb/e0a01d43f2ab001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,115 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.TimeUnit; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); -// private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - int num=0; - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - num++; - // - if(!list.isEmpty()) - { - for(int i=0;ihandoffQueue; - - private Thread receiverThread; - - private volatile boolean stopped=false; - - //(optional) ack interval (see CongestionControl interface) - private volatile long ackInterval=-1; - - /** - * if set to true connections will not expire, but will only be - * closed by a Shutdown message - */ - public static boolean connectionExpiryDisabled=false; - - private final boolean storeStatistics; - - - - /** - * create a receiver with a valid {@link UDTSession} - * @param session - */ - public UDTReceiver(UDTSession session,UDPEndPoint endpoint){ - this.endpoint = endpoint; - this.session=session; - this.sessionUpSince=System.currentTimeMillis(); - this.statistics=session.getStatistics(); - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - ackHistoryWindow = new AckHistoryWindow(16); - packetHistoryWindow = new PacketHistoryWindow(16); - receiverLossList = new ReceiverLossList(); - packetPairWindow = new PacketPairWindow(16); - largestReceivedSeqNumber=session.getInitialSequenceNumber()-1; - bufferSize=session.getReceiveBufferSize(); - handoffQueue=new ArrayBlockingQueue(4*session.getFlowWindowSize()); - storeStatistics=Boolean.getBoolean("udt.receiver.storeStatistics"); - initMetrics(); - start(); - } - - private MeanValue dgReceiveInterval; - private MeanValue dataPacketInterval; - private MeanValue processTime; - private MeanValue dataProcessTime; - private void initMetrics(){ - if(!storeStatistics)return; - dgReceiveInterval=new MeanValue("UDT receive interval"); - statistics.addMetric(dgReceiveInterval); - dataPacketInterval=new MeanValue("Data packet interval"); - statistics.addMetric(dataPacketInterval); - processTime=new MeanValue("UDT packet process time"); - statistics.addMetric(processTime); - dataProcessTime=new MeanValue("Data packet process time"); - statistics.addMetric(dataProcessTime); - } - - - //starts the sender algorithm - private void start(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - nextACK=Util.getCurrentTime()+ackTimerInterval; - nextNAK=(long)(Util.getCurrentTime()+1.5*nakTimerInterval); - nextEXP=Util.getCurrentTime()+2*expTimerInterval; - ackInterval=session.getCongestionControl().getAckInterval(); - while(!stopped){ - receiverAlgorithm(); - } - } - catch(Exception ex){ - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING RECEIVER for "+session); - } - }; - receiverThread=UDTThreadFactory.get().newThread(r); - receiverThread.start(); - } - - /* - * packets are written by the endpoint - */ - protected void receive(UDTPacket p)throws IOException{ - if(storeStatistics)dgReceiveInterval.end(); - handoffQueue.offer(p); - if(storeStatistics)dgReceiveInterval.begin(); - } - - /** - * receiver algorithm - * see specification P11. - */ - public void receiverAlgorithm()throws InterruptedException,IOException{ - //check ACK timer - long currentTime=Util.getCurrentTime(); - if(nextACKseqNumbers=receiverLossList.getFilteredSequenceNumbers(roundTripTime,true); - sendNAK(seqNumbers); - } - - /** - * process EXP event (see spec. p 13) - */ - protected void processEXPEvent()throws IOException{ - if(session.getSocket()==null)return; - UDTSender sender=session.getSocket().getSender(); - //put all the unacknowledged packets in the senders loss list - sender.putUnacknowledgedPacketsIntoLossList(); - if(expCount>16 && System.currentTimeMillis()-sessionUpSince > IDLE_TIMEOUT){ - if(!connectionExpiryDisabled &&!stopped){ - sendShutdown(); - stop(); - logger.info("Session "+session+" expired."); - return; - } - } - if(!sender.haveLostPackets()){ - sendKeepAlive(); - } - expCount++; - } - - protected void processUDTPacket(UDTPacket p)throws IOException{ - //(3).Check the packet type and process it according to this. - - if(!p.isControlPacket()){ - DataPacket dp=(DataPacket)p; - if(storeStatistics){ - dataPacketInterval.end(); - dataProcessTime.begin(); - } - onDataPacketReceived(dp); - if(storeStatistics){ - dataProcessTime.end(); - dataPacketInterval.begin(); - } - } - - else if (p.getControlPacketType()==ControlPacketType.ACK2.ordinal()){ - Acknowledgment2 ack2=(Acknowledgment2)p; - onAck2PacketReceived(ack2); - } - - else if (p instanceof Shutdown){ - onShutdown(); - } - - } - - //every nth packet will be discarded... for testing only of course - public static int dropRate=0; - - //number of received data packets - private int n=0; - - protected void onDataPacketReceived(DataPacket dp)throws IOException{ - long currentSequenceNumber = dp.getPacketSequenceNumber(); - - //for TESTING : check whether to drop this packet -// n++; -// //if(dropRate>0 && n % dropRate == 0){ -// if(n % 1111 == 0){ -// logger.info("**** TESTING:::: DROPPING PACKET "+currentSequenceNumber+" FOR TESTING"); -// return; -// } -// //} - boolean OK=session.getSocket().getInputStream().haveNewData(currentSequenceNumber,dp.getData()); - if(!OK){ - //need to drop packet... - return; - } - - long currentDataPacketArrivalTime = Util.getCurrentTime(); - - /*(4).if the seqNo of the current data packet is 16n+1,record the - time interval between this packet and the last data packet - in the packet pair window*/ - if((currentSequenceNumber%16)==1 && lastDataPacketArrivalTime>0){ - long interval=currentDataPacketArrivalTime -lastDataPacketArrivalTime; - packetPairWindow.add(interval); - } - - //(5).record the packet arrival time in the PKT History Window. - packetHistoryWindow.add(currentDataPacketArrivalTime); - - - //store current time - lastDataPacketArrivalTime=currentDataPacketArrivalTime; - - - //(6).number of detected lossed packet - /*(6.a).if the number of the current data packet is greater than LSRN+1, - put all the sequence numbers between (but excluding) these two values - into the receiver's loss list and send them to the sender in an NAK packet*/ - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber+1)>0){ - sendNAK(currentSequenceNumber); - } - else if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)<0){ - /*(6.b).if the sequence number is less than LRSN,remove it from - * the receiver's loss list - */ - receiverLossList.remove(currentSequenceNumber); - } - - statistics.incNumberOfReceivedDataPackets(); - - //(7).Update the LRSN - if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)>0){ - largestReceivedSeqNumber=currentSequenceNumber; - } - - //(8) need to send an ACK? Some cc algorithms use this - if(ackInterval>0){ - if(n % ackInterval == 0)processACKEvent(false); - } - } - - /** - * write a NAK triggered by a received sequence number that is larger than - * the largestReceivedSeqNumber + 1 - * @param currentSequenceNumber - the currently received sequence number - * @throws IOException - */ - protected void sendNAK(long currentSequenceNumber)throws IOException{ - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(largestReceivedSeqNumber+1, currentSequenceNumber); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - //put all the sequence numbers between (but excluding) these two values into the - //receiver loss list - for(long i=largestReceivedSeqNumber+1;isequenceNumbers)throws IOException{ - if(sequenceNumbers.size()==0)return; - NegativeAcknowledgement nAckPacket= new NegativeAcknowledgement(); - nAckPacket.addLossInfo(sequenceNumbers); - nAckPacket.setSession(session); - nAckPacket.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(nAckPacket); - statistics.incNumberOfNAKSent(); - } - - protected long sendLightAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt=buildLightAcknowledgement(ackNumber); - endpoint.doSend(acknowledgmentPkt); - statistics.incNumberOfACKSent(); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - protected long sendAcknowledgment(long ackNumber)throws IOException{ - Acknowledgement acknowledgmentPkt = buildLightAcknowledgement(ackNumber); - //set the estimate link capacity - estimateLinkCapacity=packetPairWindow.getEstimatedLinkCapacity(); - acknowledgmentPkt.setEstimatedLinkCapacity(estimateLinkCapacity); - //set the packet arrival rate - packetArrivalSpeed=packetHistoryWindow.getPacketArrivalSpeed(); - acknowledgmentPkt.setPacketReceiveRate(packetArrivalSpeed); - - endpoint.doSend(acknowledgmentPkt); - - statistics.incNumberOfACKSent(); - statistics.setPacketArrivalRate(packetArrivalSpeed, estimateLinkCapacity); - return acknowledgmentPkt.getAckSequenceNumber(); - } - - //builds a "light" Acknowledgement - private Acknowledgement buildLightAcknowledgement(long ackNumber){ - Acknowledgement acknowledgmentPkt = new Acknowledgement(); - //the packet sequence number to which all the packets have been received - acknowledgmentPkt.setAckNumber(ackNumber); - //assign this ack a unique increasing ACK sequence number - acknowledgmentPkt.setAckSequenceNumber(++ackSequenceNumber); - acknowledgmentPkt.setRoundTripTime(roundTripTime); - acknowledgmentPkt.setRoundTripTimeVar(roundTripTimeVar); - //set the buffer size - acknowledgmentPkt.setBufferSize(bufferSize); - - acknowledgmentPkt.setDestinationID(session.getDestination().getSocketID()); - acknowledgmentPkt.setSession(session); - - return acknowledgmentPkt; - } - - /** - * spec p. 13:
- 1) Locate the related ACK in the ACK History Window according to the - ACK sequence number in this ACK2.
- 2) Update the largest ACK number ever been acknowledged.
- 3) Calculate new rtt according to the ACK2 arrival time and the ACK - departure time, and update the RTT value as: RTT = (RTT * 7 + - rtt) / 8.
- 4) Update RTTVar by: RTTVar = (RTTVar * 3 + abs(RTT - rtt)) / 4.
- 5) Update both ACK and NAK period to 4 * RTT + RTTVar + SYN.
- */ - protected void onAck2PacketReceived(Acknowledgment2 ack2){ - AckHistoryEntry entry=ackHistoryWindow.getEntry(ack2.getAckSequenceNumber()); - if(entry!=null){ - long ackNumber=entry.getAckNumber(); - largestAcknowledgedAckNumber=Math.max(ackNumber, largestAcknowledgedAckNumber); - - long rtt=entry.getAge(); - if(roundTripTime>0)roundTripTime = (roundTripTime*7 + rtt)/8; - else roundTripTime = rtt; - roundTripTimeVar = (roundTripTimeVar* 3 + Math.abs(roundTripTimeVar- rtt)) / 4; - ackTimerInterval=4*roundTripTime+roundTripTimeVar+Util.getSYNTime(); - nakTimerInterval=ackTimerInterval; - statistics.setRTT(roundTripTime, roundTripTimeVar); - } - } - - protected void sendKeepAlive()throws IOException{ - KeepAlive ka=new KeepAlive(); - ka.setDestinationID(session.getDestination().getSocketID()); - ka.setSession(session); - endpoint.doSend(ka); - } - - protected void sendShutdown()throws IOException{ - Shutdown s=new Shutdown(); - s.setDestinationID(session.getDestination().getSocketID()); - s.setSession(session); - endpoint.doSend(s); - } - - private volatile long ackSequenceNumber=0; - - protected void resetEXPTimer(){ - nextEXP=Util.getCurrentTime()+expTimerInterval; - expCount=0; - } - - protected void resetEXPCount(){ - expCount=0; - } - - public void setAckInterval(long ackInterval){ - this.ackInterval=ackInterval; - } - - protected void onShutdown()throws IOException{ - stop(); - } - - public void stop()throws IOException{ - stopped=true; - session.getSocket().close(); - //stop our sender as well - session.getSocket().getSender().stop(); - } - - @Override - public String toString(){ - StringBuilder sb=new StringBuilder(); - sb.append("UDTReceiver ").append(session).append("\n"); - sb.append("LossList: "+receiverLossList); - return sb.toString(); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/fc/10f958adb3ad0017181ed9113883eda9 b/.metadata/.plugins/org.eclipse.core.resources/.history/fc/10f958adb3ad0017181ed9113883eda9 deleted file mode 100644 index 969d09f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/fc/10f958adb3ad0017181ed9113883eda9 +++ /dev/null @@ -1,514 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; - -import udt.packets.Acknowledgement; -import udt.packets.Acknowledgment2; -import udt.packets.DataPacket; -import udt.packets.KeepAlive; -import udt.packets.NegativeAcknowledgement; -import udt.sender.SenderLossList; -import udt.util.MeanThroughput; -import udt.util.MeanValue; -import udt.util.SequenceNumber; -import udt.util.UDTStatistics; -import udt.util.UDTThreadFactory; -import udt.util.Util; - - -/** - * sender part of a UDT entity - * - * @see UDTReceiver - */ -public class UDTSender { - - private static final Logger logger=Logger.getLogger(UDTClient.class.getName()); - - private final UDPEndPoint endpoint; - - private final UDTSession session; - - private final UDTStatistics statistics; - - //senderLossList stores the sequence numbers of lost packets - //fed back by the receiver through NAK pakets - private final SenderLossList senderLossList; - - //sendBuffer stores the sent data packets and their sequence numbers - private final MapsendBuffer; - - //sendQueue contains the packets to send - private final BlockingQueuesendQueue; - - //thread reading packets from send queue and sending them - private Thread senderThread; - - //protects against races when reading/writing to the sendBuffer - private final Object sendLock=new Object(); - - //number of unacknowledged data packets - private final AtomicInteger unacknowledged=new AtomicInteger(0); - - //for generating data packet sequence numbers - private volatile long currentSequenceNumber=0; - - //the largest data packet sequence number that has actually been sent out - private volatile long largestSentSequenceNumber=-1; - - //last acknowledge number, initialised to the initial sequence number - private volatile long lastAckSequenceNumber; - - private volatile boolean started=false; - - private volatile boolean stopped=false; - - private volatile boolean paused=false; - - //used to signal that the sender should start to send - private volatile CountDownLatch startLatch=new CountDownLatch(1); - - //used by the sender to wait for an ACK - private final AtomicReference waitForAckLatch=new AtomicReference(); - - //used by the sender to wait for an ACK of a certain sequence number - private final AtomicReference waitForSeqAckLatch=new AtomicReference(); - - private final boolean storeStatistics; - - public UDTSender(UDTSession session,UDPEndPoint endpoint){ - if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); - this.endpoint= endpoint; - this.session=session; - statistics=session.getStatistics(); - senderLossList=new SenderLossList(); - sendBuffer=new ConcurrentHashMap(session.getFlowWindowSize(),0.75f,2); - sendQueue = new ArrayBlockingQueue(1000); - lastAckSequenceNumber=session.getInitialSequenceNumber(); - currentSequenceNumber=session.getInitialSequenceNumber()-1; - waitForAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.set(new CountDownLatch(1)); - storeStatistics=Boolean.getBoolean("udt.sender.storeStatistics"); - initMetrics(); - doStart(); - } - - private MeanValue dgSendTime; - private MeanValue dgSendInterval; - private MeanThroughput throughput; - private void initMetrics(){ - if(!storeStatistics)return; - dgSendTime=new MeanValue("Datagram send time"); - statistics.addMetric(dgSendTime); - dgSendInterval=new MeanValue("Datagram send interval"); - statistics.addMetric(dgSendInterval); - throughput=new MeanThroughput("Throughput", session.getDatagramSize()); - statistics.addMetric(throughput); - } - - /** - * start the sender thread - */ - public void start(){ - logger.info("Starting sender for "+session); - startLatch.countDown(); - started=true; - } - - //starts the sender algorithm - private void doStart(){ - Runnable r=new Runnable(){ - @Override - public void run(){ - try{ - while(!stopped){ - //wait until explicitely (re)started - startLatch.await(); - paused=false; - senderAlgorithm(); - } - }catch(InterruptedException ie){ - ie.printStackTrace(); - } - catch(IOException ex){ - ex.printStackTrace(); - logger.log(Level.SEVERE,"",ex); - } - logger.info("STOPPING SENDER for "+session); - } - }; - senderThread=UDTThreadFactory.get().newThread(r); - senderThread.start(); - } - - - /** - * sends the given data packet, storing the relevant information - * - * @param data - * @throws IOException - * @throws InterruptedException - */ - private void send(DataPacket p)throws IOException{ - synchronized(sendLock){ - if(storeStatistics){ - dgSendInterval.end(); - dgSendTime.begin(); - } - endpoint.doSend(p); - if(storeStatistics){ - dgSendTime.end(); - dgSendInterval.begin(); - throughput.end(); - throughput.begin(); - } - sendBuffer.put(p.getPacketSequenceNumber(), p); - unacknowledged.incrementAndGet(); - } - statistics.incNumberOfSentDataPackets(); - } - - /** - * writes a data packet into the sendQueue, waiting at most for the specified time - * if this is not possible due to a full send queue - * - * @return trueif the packet was added, false if the - * packet could not be added because the queue was full - * @param p - * @param timeout - * @param units - * @return - * @throws IOException - * @throws InterruptedException - */ - protected boolean sendUdtPacket(DataPacket p, int timeout, TimeUnit units)throws IOException,InterruptedException{ - if(!started)start(); - return sendQueue.offer(p,timeout,units); - } - - //receive a packet from server from the peer - protected void receive(UDTPacket p)throws IOException{ - if (p instanceof Acknowledgement) { - Acknowledgement acknowledgement=(Acknowledgement)p; - onAcknowledge(acknowledgement); - } - else if (p instanceof NegativeAcknowledgement) { - NegativeAcknowledgement nak=(NegativeAcknowledgement)p; - onNAKPacketReceived(nak); - } - else if (p instanceof KeepAlive) { - session.getSocket().getReceiver().resetEXPCount(); - } - } - - protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ - waitForAckLatch.get().countDown(); - waitForSeqAckLatch.get().countDown(); - - CongestionControl cc=session.getCongestionControl(); - long rtt=acknowledgement.getRoundTripTime(); - if(rtt>0){ - long rttVar=acknowledgement.getRoundTripTimeVar(); - cc.setRTT(rtt,rttVar); - statistics.setRTT(rtt, rttVar); - } - long rate=acknowledgement.getPacketReceiveRate(); - if(rate>0){ - long linkCapacity=acknowledgement.getEstimatedLinkCapacity(); - cc.updatePacketArrivalRate(rate, linkCapacity); - statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); - } - - long ackNumber=acknowledgement.getAckNumber(); - cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); - //need to remove all sequence numbers up the ack number from the sendBuffer - boolean removed=false; - boolean one=false; - for(long s=lastAckSequenceNumber;sthis.currentSequenceNumber) - { - //ȵǰͰ cd - lastAckSequenceNumber=ackNumber; - } - } - - } - - //send ACK2 packet to the receiver - sendAck2(ackNumber); - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - } - - /** - * procedure when a NAK is received (spec. p 14) - * @param nak - */ - protected void onNAKPacketReceived(NegativeAcknowledgement nak){ - for(Integer i: nak.getDecodedLossInfo()){ - senderLossList.insert(Long.valueOf(i)); - } - session.getCongestionControl().onLoss(nak.getDecodedLossInfo()); - session.getSocket().getReceiver().resetEXPTimer(); - statistics.incNumberOfNAKReceived(); - - if(logger.isLoggable(Level.FINER)){ - logger.finer("NAK for "+nak.getDecodedLossInfo().size()+" packets lost, " - +"set send period to "+session.getCongestionControl().getSendInterval()); - } - return; - } - - //send single keep alive packet -> move to socket! - protected void sendKeepAlive()throws Exception{ - KeepAlive keepAlive = new KeepAlive(); - //TODO - keepAlive.setSession(session); - endpoint.doSend(keepAlive); - } - - protected void sendAck2(long ackSequenceNumber)throws IOException{ - Acknowledgment2 ackOfAckPkt = new Acknowledgment2(); - ackOfAckPkt.setAckSequenceNumber(ackSequenceNumber); - ackOfAckPkt.setSession(session); - ackOfAckPkt.setDestinationID(session.getDestination().getSocketID()); - endpoint.doSend(ackOfAckPkt); - } - - /** - * sender algorithm - */ - long iterationStart; - public void senderAlgorithm()throws InterruptedException, IOException{ - while(!paused){ - iterationStart=Util.getCurrentTime(); - - //if the sender's loss list is not empty - if (!senderLossList.isEmpty()) { - Long entry=senderLossList.getFirstEntry(); - handleResubmit(entry); - logger.info("senderLossList:"+entry); - } - - else - { - //if the number of unacknowledged data packets does not exceed the congestion - //and the flow window sizes, pack a new packet - int unAcknowledged=unacknowledged.get(); - - if(unAcknowledged=session.getCongestionControl().getCongestionWindowSize()){ - statistics.incNumberOfCCWindowExceededEvents(); - } - waitForAck(); - } - } - - //wait - if(largestSentSequenceNumber % 16 !=0){ - long snd=(long)session.getCongestionControl().getSendInterval(); - long passed=Util.getCurrentTime()-iterationStart; - int x=0; - while(snd-passed>0){ - //can't wait with microsecond precision :( - if(x==0){ - statistics.incNumberOfCCSlowDownEvents(); - x++; - } - passed=Util.getCurrentTime()-iterationStart; - if(stopped)return; - } - } - } - } - - /** - * re-submits an entry from the sender loss list - * @param entry - */ - protected void handleResubmit(Long seqNumber){ - try { - //retransmit the packet and remove it from the list - DataPacket pktToRetransmit = sendBuffer.get(seqNumber); - if(pktToRetransmit!=null){ - endpoint.doSend(pktToRetransmit); - statistics.incNumberOfRetransmittedDataPackets(); - } - }catch (Exception e) { - logger.log(Level.WARNING,"",e); - } - } - - /** - * for processing EXP event (see spec. p 13) - */ - protected void putUnacknowledgedPacketsIntoLossList(){ - synchronized (sendLock) { - for(Long l: sendBuffer.keySet()){ - senderLossList.insert(l); - } - } - } - - /** - * the next sequence number for data packets. - * The initial sequence number is "0" - */ - public long getNextSequenceNumber(){ - currentSequenceNumber=SequenceNumber.increment(currentSequenceNumber); - return currentSequenceNumber; - } - - public long getCurrentSequenceNumber(){ - return currentSequenceNumber; - } - - /** - * returns the largest sequence number sent so far - */ - public long getLargestSentSequenceNumber(){ - return largestSentSequenceNumber; - } - /** - * returns the last Ack. sequence number - */ - public long getLastAckSequenceNumber(){ - return lastAckSequenceNumber; - } - - boolean haveAcknowledgementFor(long sequenceNumber){ - return SequenceNumber.compare(sequenceNumber,lastAckSequenceNumber)<=0; - } - - boolean isSentOut(long sequenceNumber){ - return SequenceNumber.compare(largestSentSequenceNumber,sequenceNumber)>=0; - } - - boolean haveLostPackets(){ - return !senderLossList.isEmpty(); - } - - /** - * wait until the given sequence number has been acknowledged - * - * @throws InterruptedException - */ - public void waitForAck(long sequenceNumber)throws InterruptedException{ - while(!session.isShutdown() && !haveAcknowledgementFor(sequenceNumber)){ - waitForSeqAckLatch.set(new CountDownLatch(1)); - waitForSeqAckLatch.get().await(10, TimeUnit.MILLISECONDS); - } - } - - /** - * wait for the next acknowledge - * @throws InterruptedException - */ - public void waitForAck()throws InterruptedException{ - waitForAckLatch.set(new CountDownLatch(1)); - waitForAckLatch.get().await(2, TimeUnit.MILLISECONDS); - } - - - public void stop(){ - stopped=true; - } - - public void pause(){ - startLatch=new CountDownLatch(1); - paused=true; - } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/fc/a0fc077523ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/fc/a0fc077523ac001710ff8a7c6bda0fb8 deleted file mode 100644 index ca42c64..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/fc/a0fc077523ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,305 +0,0 @@ -/** - * - */ -package judp; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; -import udt.UDTSession; -import udt.UDTSocket; -import udt.packets.Destination; - -/** - * @author jinyu - * - *˷صӿڶ - *socketݵĶ - */ -public class judpSocket { -private final int bufSize=65535; -private UDTSocket socket=null; -private boolean isClose=false; -private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -private int readLen=0; -public boolean getCloseState() -{ - return isClose; -} -public judpSocket(UDTSocket usocket) -{ - this.socket=usocket; - socketID=socket.getSession().getSocketID(); -} - -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - -/** - * ر - * ȴɹر - */ -public void close() -{ - isClose=true; - //ʵر - if(sendLen==0) - { - stop(); - System.out.println("رsocket"); - } - else - { - //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println("رsocket"); -} - -/** - * ȡ - * ؽյֽڴС - */ -public int readData(byte[]data) -{ - if(isClose) - { - return -1; - } - try { - int r=socket.getInputStream().read(data); - readLen+=r; - return r; - } catch (IOException e) { - e.printStackTrace(); - } - return -1; -} - -/** - * ȡȫ - */ -public byte[] readData() -{ - byte[] result=null; - if(socket!=null) - { - byte[] readBytes=new byte[bufSize];// - int r=0; - try { - while(true) - { - if(isClose) - { - return null; - } - r=socket.getInputStream().read(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } - - } catch (IOException e) { - - e.printStackTrace(); - } - - } - - return result; -} - -/* - * ȡʼ - */ -public long getInitSeqNo() -{ - if(socket!=null) - { - return socket.getSession().getInitialSequenceNumber(); - } - return 0; -} - -/** - * Ͱ - */ -public int getDataStreamLen() -{ - return socket.getSession().getDatagramSize(); -} - -/** - * Ŀsocket - * @return - */ -public Destination getDestination() -{ - - if(socket!=null) - { - return socket.getSession().getDestination(); - } - Destination tmp = null; - try { - tmp = new Destination(InetAddress.getLocalHost(), 0); - } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tmp; -} -/** - * - * ݲܷ - */ -public boolean sendData(byte[]data) { - if(isClose) - { - return false; - } - try { - socket.getOutputStream().write(data); - sendLen=+1; - return true; - } catch (IOException e) { - e.printStackTrace(); - } - return false; -} - -/** - * ȡԶhost - * @return - */ -public String getRemoteHost() { -return socket.getSession().getDestination().getAddress().getHostName(); - -} - -/** - * ȡԶ˶˿ - * @return - */ -public int getRemotePort() { - return socket.getSession().getDestination().getPort(); -} - -/** - * socketid - * @return - */ -public long getID() { - - return socketID; -} - - - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/fd/a0c92a2bd7ac001716b9ca6d5abb90bc b/.metadata/.plugins/org.eclipse.core.resources/.history/fd/a0c92a2bd7ac001716b9ca6d5abb90bc deleted file mode 100644 index 35e51b5..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/fd/a0c92a2bd7ac001716b9ca6d5abb90bc +++ /dev/null @@ -1,291 +0,0 @@ -/********************************************************************************* - * Copyright (c) 2010 Forschungszentrum Juelich GmbH - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * (1) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the disclaimer at the end. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * DISCLAIMER - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************************/ - -package udt; - -import java.io.IOException; -import java.io.InputStream; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; -import udt.util.ReceiveBuffer; - -/** - * The UDTInputStream receives data blocks from the {@link UDTSocket} - * as they become available, and places them into an ordered, - * bounded queue (the flow window) for reading by the application - * - * - */ -public class UDTInputStream extends InputStream { - - //the socket owning this inputstream - private final UDTSocket socket; - - private final ReceiveBuffer receiveBuffer; - - //set to 'false' by the receiver when it gets a shutdown signal from the peer - //see the noMoreData() method - private final AtomicBoolean expectMoreData=new AtomicBoolean(true); - - private volatile boolean closed=false; - - private volatile boolean blocking=true; - - private volatile boolean hasData=false;//cd - - - - /** - * create a new {@link UDTInputStream} connected to the given socket - * @param socket - the {@link UDTSocket} - * @throws IOException - */ - public UDTInputStream(UDTSocket socket)throws IOException{ - this.socket=socket; - int capacity=socket!=null? 2 * socket.getSession().getFlowWindowSize() : 128 ; - long initialSequenceNum=socket!=null?socket.getSession().getInitialSequenceNumber():1; - receiveBuffer=new ReceiveBuffer(capacity,initialSequenceNum); - } - - private final byte[]single=new byte[1]; - - @Override - public int read()throws IOException{ - int b=0; - while(b==0) - b=read(single); - - if(b>0){ - return single[0]; - } - else { - return b; - } - } - - private AppData currentChunk=null; - //offset into currentChunk - int offset=0; - long id=-1; - @Override - public int read(byte[]target)throws IOException{ - try{ - int read=0; - updateCurrentChunk(false); - while(currentChunk!=null){ - byte[]data=currentChunk.data; - int length=Math.min(target.length-read,data.length-offset); - System.arraycopy(data, offset, target, read, length); - read+=length; - offset+=length; - //check if chunk has been fully read - if(offset>=data.length){ - currentChunk=null; - offset=0; - } - - //if no more space left in target, exit now - if(read==target.length){ - return read; - } - - updateCurrentChunk(blocking && read==0); - } - - if(read>0)return read; - if(closed)return -1; - if(expectMoreData.get() || !receiveBuffer.isEmpty())return 0; - //no more data - return -1; - - }catch(Exception ex){ - IOException e= new IOException(); - e.initCause(ex); - throw e; - } - } - - /** - * Reads the next valid chunk of application data from the queue
- * - * In blocking mode,this method will block until data is available or the socket is closed, - * otherwise it will wait for at most 10 milliseconds. - * - * @throws InterruptedException - */ - private void updateCurrentChunk(boolean block)throws IOException{ - if(currentChunk!=null)return; - - while(true){ - try{ - if(block){ - currentChunk=receiveBuffer.poll(1, TimeUnit.MILLISECONDS); - while (!closed && currentChunk==null){ - currentChunk=receiveBuffer.poll(1000, TimeUnit.MILLISECONDS); - } - } - else currentChunk=receiveBuffer.poll(10, TimeUnit.MILLISECONDS); - - }catch(InterruptedException ie){ - IOException ex=new IOException(); - ex.initCause(ie); - throw ex; - } - return; - } - } - - /** - * new application data - * @param data - * - */ - protected boolean haveNewData(long sequenceNumber,byte[]data)throws IOException{ - hasData=true; - return receiveBuffer.offer(new AppData(sequenceNumber,data)); - } - - @Override - public void close()throws IOException{ - if(closed)return; - closed=true; - noMoreData(); - } - - public UDTSocket getSocket(){ - return socket; - } - - /** - * sets the blocking mode - * @param block - */ - public void setBlocking(boolean block){ - this.blocking=block; - } - - public int getReceiveBufferSize(){ - return receiveBuffer.getSize(); - } - - /** - * notify the input stream that there is no more data - * @throws IOException - */ - protected void noMoreData()throws IOException{ - expectMoreData.set(false); - } - - /** - * жûݽ - * cd - * @return - */ - public boolean isHasData() - { - return hasData; - } - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * islagerRead=true - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - receiveBuffer.setBufMaster(isRead); - - } - - /** - * ôݶȡ - * Ĭ false - * @param islarge - */ - public void setLargeRead(boolean islarge) - { - client.setLargeRead(islarge); - } - /** - * used for storing application data and the associated - * sequence number in the queue in ascending order - */ - public static class AppData implements Comparable{ - final long sequenceNumber; - final byte[] data; - public AppData(long sequenceNumber, byte[]data){ - this.sequenceNumber=sequenceNumber; - this.data=data; - } - - @Override - public int compareTo(AppData o) { - return (int)(sequenceNumber-o.sequenceNumber); - } - - @Override - public String toString(){ - return sequenceNumber+"["+data.length+"]"; - } - - public long getSequenceNumber(){ - return sequenceNumber; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result - + (int) (sequenceNumber ^ (sequenceNumber >>> 32)); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - AppData other = (AppData) obj; - if (sequenceNumber != other.sequenceNumber) - return false; - return true; - } - - - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/fe/502a91841bac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/fe/502a91841bac001710ff8a7c6bda0fb8 deleted file mode 100644 index f433ecc..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/fe/502a91841bac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,22 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -/** - * @author jinyu - * - */ -public class PackagetCombin { - private static ConcurrentHashMap hash=new ConcurrentHashMap(); -public static void addData(byte[] data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int index=buf.getInt(); - int dataLen=buf.getInt(); - -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/fe/e0de531569a800171a8482560d609ceb b/.metadata/.plugins/org.eclipse.core.resources/.history/fe/e0de531569a800171a8482560d609ceb deleted file mode 100644 index 972bd88..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/fe/e0de531569a800171a8482560d609ceb +++ /dev/null @@ -1,82 +0,0 @@ -/** - * - */ -package judp; - - -import udt.UDTSocket; - -import java.util.ArrayList; -import java.util.Map.Entry; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - -/** - * @author jinyu - * նж - */ -public class SocketControls { - private static SocketControls instance; -private ConcurrentHashMap hash=new ConcurrentHashMap(); - private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - } - } - - }); - processSocket.setDaemon(true); - processSocket.setName("processSocket"); - processSocket.start(); - -} - -public static synchronized SocketControls getInstance() { - - if (instance == null) { - - instance = new SocketControls(); - - -} - return instance; -} -public void addSocket(UDTSocket socket) -{ - long id=socket.getSession().getDestination().getSocketID();//ͬһĿ - judpGroupSocket group=hash.get(id); - if(group==null) - { - group=new judpGroupSocket(); - hash.put(id, group); - } - group.addSocket(socket); -} -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ff/7095ccf204ac001710ff8a7c6bda0fb8 b/.metadata/.plugins/org.eclipse.core.resources/.history/ff/7095ccf204ac001710ff8a7c6bda0fb8 deleted file mode 100644 index 7377664..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ff/7095ccf204ac001710ff8a7c6bda0fb8 +++ /dev/null @@ -1,32 +0,0 @@ -/** - * - */ -package judp; - - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.WeakReference; - -/** - * @author jinyu - * @param - * - */ -public class SocketReference extends WeakReference { - private long socketid=-1; - public SocketReference(T referent) { - super(referent); - - } - public SocketReference(T referent,long id) { - super(referent); - this.socketid=id; - } - public SocketReference(T referent, long socketID2, ReferenceQueue q) { - super(referent,q); - } - public long getid() - { - return socketid; - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/.indexes/properties.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/.indexes/properties.index deleted file mode 100644 index 1e099f3..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/.indexes/properties.index and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/.markers.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/.markers.snap deleted file mode 100644 index 1253ec8..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/.markers.snap and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/.syncinfo.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/.syncinfo.snap deleted file mode 100644 index 1253ec8..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/.syncinfo.snap and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/org.eclipse.egit.core/GitProjectData.properties b/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/org.eclipse.egit.core/GitProjectData.properties deleted file mode 100644 index ffbf0b8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/org.eclipse.egit.core/GitProjectData.properties +++ /dev/null @@ -1,3 +0,0 @@ -#GitProjectData -#Tue Oct 10 22:54:18 CST 2017 -.gitdir=../.git diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/judt/.indexes/e4/9d/9c/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/judt/.indexes/e4/9d/9c/history.index deleted file mode 100644 index b854251..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/judt/.indexes/e4/9d/9c/history.index and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/judt/.indexes/properties.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/judt/.indexes/properties.index deleted file mode 100644 index 1e099f3..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/judt/.indexes/properties.index and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/judt/.markers b/.metadata/.plugins/org.eclipse.core.resources/.projects/judt/.markers index a576ee1..faf387e 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/judt/.markers and b/.metadata/.plugins/org.eclipse.core.resources/.projects/judt/.markers differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/judt/.markers.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/judt/.markers.snap deleted file mode 100644 index b618355..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/judt/.markers.snap and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/judt/.syncinfo.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/judt/.syncinfo.snap deleted file mode 100644 index 1253ec8..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/judt/.syncinfo.snap and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/judt/org.eclipse.egit.core/GitProjectData.properties b/.metadata/.plugins/org.eclipse.core.resources/.projects/judt/org.eclipse.egit.core/GitProjectData.properties deleted file mode 100644 index ac9a869..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.projects/judt/org.eclipse.egit.core/GitProjectData.properties +++ /dev/null @@ -1,3 +0,0 @@ -#GitProjectData -#Tue Oct 10 22:58:05 CST 2017 -.gitdir=../.git diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index index 4982890..6d0d595 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index and b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap b/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap deleted file mode 100644 index 36540de..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/6.tree b/.metadata/.plugins/org.eclipse.core.resources/.root/6.tree deleted file mode 100644 index b03440d..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.root/6.tree and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources index 41dd2ec..998e401 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources and b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/6.snap b/.metadata/.plugins/org.eclipse.core.resources/6.snap deleted file mode 100644 index 3eab6da..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/6.snap and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs index ad87d2c..e371833 100644 --- a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs @@ -2,6 +2,6 @@ eclipse.preferences.version=1 org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=\r\n\r\n org.eclipse.debug.ui.user_view_bindings=\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n pref_state_memento.org.eclipse.debug.ui.DebugVieworg.eclipse.debug.ui.DebugView=\r\n -pref_state_memento.org.eclipse.debug.ui.VariableView=\r\n\r\n\r\n\r\n\r\n +pref_state_memento.org.eclipse.debug.ui.VariableView=\r\n\r\n\r\n preferredDetailPanes=DefaultDetailPane\:DefaultDetailPane| preferredTargets=default\:default| diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.egit.core.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.egit.core.prefs deleted file mode 100644 index 3444df2..0000000 --- a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.egit.core.prefs +++ /dev/null @@ -1,3 +0,0 @@ -GitRepositoriesView.GitDirectories=E\:\\Study\\java\\judt\\.git; -GitRepositoriesView.GitDirectories.relative=.git; -eclipse.preferences.version=1 diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs index 8c08b60..c8ae42b 100644 --- a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs @@ -1,4 +1,3 @@ -breadcrumb.org.eclipse.jst.j2ee.J2EEPerspective=true content_assist_disabled_computers=org.eclipse.jdt.ui.textProposalCategory\u0000org.eclipse.recommenders.calls.rcp.proposalCategory.templates\u0000org.eclipse.mylyn.java.ui.javaAllProposalCategory\u0000org.eclipse.jdt.ui.javaAllProposalCategory\u0000org.eclipse.jdt.ui.javaTypeProposalCategory\u0000org.eclipse.jdt.ui.javaNoTypeProposalCategory\u0000org.eclipse.recommenders.chain.rcp.proposalCategory.chain\u0000 content_assist_lru_history= content_assist_number_of_computers=24 diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.recommenders.completion.rcp.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.recommenders.completion.rcp.prefs deleted file mode 100644 index b9bd711..0000000 --- a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.recommenders.completion.rcp.prefs +++ /dev/null @@ -1,2 +0,0 @@ -completion_tips_seen=org.eclipse.recommenders.completion.rcp.tips.discovery\:org.eclipse.recommenders.completion.rcp.tips.types -eclipse.preferences.version=1 diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs index 23218da..6c404ca 100644 --- a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs @@ -1,5 +1,5 @@ PROBLEMS_FILTERS_MIGRATE=true eclipse.preferences.version=1 -platformState=1507442636466 +platformState=1502477236593 quickStart=false tipsAndTricks=true diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs index 1c460d8..24795e0 100644 --- a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs @@ -4,24 +4,24 @@ ColorsAndFontsPreferencePage.expandedCategories=Torg.eclipse.ui.workbenchMisc ColorsAndFontsPreferencePage.selectedElement=Forg.eclipse.jface.textfont ENABLED_DECORATORS=org.eclipse.jst.ws.jaxws.dom.integration.navigator.WebServiceDecorator\:true,org.eclipse.m2e.core.mavenVersionDecorator\:false,org.eclipse.wst.jsdt.chromium.debug.ui.decorators.ChromiumJavaScript\:true,org.eclipse.wst.server.ui.decorator\:false,org.eclipse.cft.server.navigatorDecorator\:true,org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.DependencyDecoration\:true,org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.ColumnDecoration\:true,org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.ForeignKeyDecoration\:true,org.eclipse.datatools.connectivity.sqm.core.internal.ui.explorer.IndexTriggerDecoration\:true,org.eclipse.datatools.connectivity.internal.core.ui.bookmarkDecoration\:true,org.eclipse.datatools.connectivity.internal.core.ui.FilterNodeDecoration\:true,org.eclipse.datatools.connectivity.ui.decorator.contentextension\:false,org.eclipse.datatools.enablement.ingres.ui.providers.decorators.SynonymDecorationService\:true,org.eclipse.datatools.enablement.ingres.internal.ui.providers.decorators.ParameterDecorationService\:true,org.eclipse.datatools.enablement.sybase.asa.proxytabledecorator\:true,org.eclipse.datatools.enablement.sybase.ase.webservicetabledecorator\:true,org.eclipse.datatools.enablement.sybase.systemtabledecorator\:true,org.eclipse.egit.ui.internal.decorators.GitLightweightDecorator\:true,org.eclipse.jdt.ui.override.decorator\:true,org.eclipse.jdt.ui.interface.decorator\:true,org.eclipse.jdt.ui.buildpath.decorator\:true,org.eclipse.jst.j2ee.internal.ui.util.AnnotationIconDecorator_ejb\:true,org.eclipse.jst.j2ee.navigator.internal.J2EEProjectDecorator\:true,org.eclipse.jst.jee.ui.internal.navigator.ejb.BeanDecorator\:true,org.eclipse.jst.jee.navigator.internal.JEEProjectDecorator\:true,org.eclipse.jst.j2ee.internal.ui.util.AnnotationIconDecorator_servlet\:true,org.eclipse.m2e.core.maven2decorator\:true,org.eclipse.mylyn.context.ui.decorator.interest\:true,org.eclipse.mylyn.tasks.ui.decorators.task\:true,org.eclipse.mylyn.team.ui.changeset.decorator\:true,org.eclipse.pde.ui.binaryProjectDecorator\:false,org.eclipse.rse.core.virtualobject.decorator\:true,org.eclipse.rse.core.binary.executable.decorator\:true,org.eclipse.rse.core.script.executable.decorator\:true,org.eclipse.rse.core.java.executable.decorator\:true,org.eclipse.rse.core.library.decorator\:true,org.eclipse.rse.core.link.decorator\:true,org.eclipse.rse.subsystems.error.decorator\:true,org.eclipse.ui.LinkedResourceDecorator\:true,org.eclipse.ui.SymlinkDecorator\:true,org.eclipse.ui.VirtualResourceDecorator\:true,org.eclipse.ui.ContentTypeDecorator\:true,org.eclipse.ui.ResourceFilterDecorator\:false,org.eclipse.wst.jsdt.ui.override.decorator\:true,org.eclipse.wst.json.bower.ui.bower\:true,org.eclipse.wst.json.bower.ui.bowerrc\:true,org.eclipse.wst.json.eslint.ui.ESLint\:true,org.eclipse.wst.json.jshint.ui.jshint\:true,org.eclipse.wst.json.npm.ui.NPM\:true,org.eclipse.wst.server.ui.navigatorDecorator\:true, PLUGINS_NOT_ACTIVATED_ON_STARTUP=org.eclipse.m2e.discovery; -REMOTE_COMMANDS_VIEW_FONT=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; +REMOTE_COMMANDS_VIEW_FONT=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; eclipse.preferences.version=1 -org.eclipse.compare.contentmergeviewer.TextMergeViewer=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; -org.eclipse.debug.ui.DetailPaneFont=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; -org.eclipse.debug.ui.MemoryViewTableFont=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; -org.eclipse.debug.ui.consoleFont=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; -org.eclipse.egit.ui.CommitMessageEditorFont=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; -org.eclipse.egit.ui.CommitMessageFont=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; -org.eclipse.egit.ui.DiffHeadlineFont=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; -org.eclipse.jdt.internal.ui.compare.JavaMergeViewer=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; -org.eclipse.jdt.internal.ui.compare.PropertiesFileMergeViewer=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; -org.eclipse.jdt.ui.PropertiesFileEditor.textfont=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; -org.eclipse.jdt.ui.editors.textfont=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; -org.eclipse.jface.textfont=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; -org.eclipse.mylyn.wikitext.ui.presentation.textFont=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; -org.eclipse.pde.internal.ui.compare.ManifestContentMergeViewer=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; -org.eclipse.pde.internal.ui.compare.PluginContentMergeViewer=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; -org.eclipse.wst.jsdt.internal.ui.compare.JavaMergeViewer=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; -org.eclipse.wst.jsdt.ui.editors.textfont=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; -org.eclipse.wst.sse.ui.textfont=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; -terminal.views.view.font.definition=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; +org.eclipse.compare.contentmergeviewer.TextMergeViewer=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; +org.eclipse.debug.ui.DetailPaneFont=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; +org.eclipse.debug.ui.MemoryViewTableFont=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; +org.eclipse.debug.ui.consoleFont=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; +org.eclipse.egit.ui.CommitMessageEditorFont=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; +org.eclipse.egit.ui.CommitMessageFont=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; +org.eclipse.egit.ui.DiffHeadlineFont=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; +org.eclipse.jdt.internal.ui.compare.JavaMergeViewer=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; +org.eclipse.jdt.internal.ui.compare.PropertiesFileMergeViewer=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; +org.eclipse.jdt.ui.PropertiesFileEditor.textfont=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; +org.eclipse.jdt.ui.editors.textfont=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; +org.eclipse.jface.textfont=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; +org.eclipse.mylyn.wikitext.ui.presentation.textFont=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; +org.eclipse.pde.internal.ui.compare.ManifestContentMergeViewer=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; +org.eclipse.pde.internal.ui.compare.PluginContentMergeViewer=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; +org.eclipse.wst.jsdt.internal.ui.compare.JavaMergeViewer=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; +org.eclipse.wst.jsdt.ui.editors.textfont=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; +org.eclipse.wst.sse.ui.textfont=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; +terminal.views.view.font.definition=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.jsdt.ui.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.jsdt.ui.prefs index b569421..4dcdc20 100644 --- a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.jsdt.ui.prefs +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.jsdt.ui.prefs @@ -1,6 +1,6 @@ eclipse.preferences.version=1 fontPropagated=true -org.eclipse.jface.textfont=1|Consolas|16.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Consolas; +org.eclipse.jface.textfont=1|Consolas|14.25|0|WINDOWS|1|-19|0|0|0|400|0|0|0|0|3|2|1|49|Consolas; org.eclipse.wst.jsdt.ui.editor.tab.width= org.eclipse.wst.jsdt.ui.formatterprofiles.version=11 org.eclipse.wst.jsdt.ui.javadoclocations.migrated=true diff --git a/.metadata/.plugins/org.eclipse.debug.core/.launches/TestClient.launch b/.metadata/.plugins/org.eclipse.debug.core/.launches/TestClient.launch index 5f7b192..f4eedbd 100644 --- a/.metadata/.plugins/org.eclipse.debug.core/.launches/TestClient.launch +++ b/.metadata/.plugins/org.eclipse.debug.core/.launches/TestClient.launch @@ -1,11 +1,14 @@ - + - + + + + diff --git a/.metadata/.plugins/org.eclipse.debug.core/.launches/TestRecFiles.launch b/.metadata/.plugins/org.eclipse.debug.core/.launches/TestRecFiles.launch deleted file mode 100644 index 0cde40b..0000000 --- a/.metadata/.plugins/org.eclipse.debug.core/.launches/TestRecFiles.launch +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.debug.core/.launches/TestSendFiles.launch b/.metadata/.plugins/org.eclipse.debug.core/.launches/TestSendFiles.launch deleted file mode 100644 index 088fde3..0000000 --- a/.metadata/.plugins/org.eclipse.debug.core/.launches/TestSendFiles.launch +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.debug.core/.launches/TestServer.launch b/.metadata/.plugins/org.eclipse.debug.core/.launches/TestServer.launch deleted file mode 100644 index a4b3c77..0000000 --- a/.metadata/.plugins/org.eclipse.debug.core/.launches/TestServer.launch +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.debug.ui/dialog_settings.xml b/.metadata/.plugins/org.eclipse.debug.ui/dialog_settings.xml index 60c61e7..7bc696f 100644 Binary files a/.metadata/.plugins/org.eclipse.debug.ui/dialog_settings.xml and b/.metadata/.plugins/org.eclipse.debug.ui/dialog_settings.xml differ diff --git a/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml b/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml index 6ec40d8..9f1b71f 100644 --- a/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml +++ b/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml @@ -2,7 +2,9 @@ - + + + @@ -12,7 +14,8 @@ - + + @@ -22,7 +25,9 @@ - + + + diff --git a/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi index a8ca829..c3b6aa5 100644 --- a/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi +++ b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi @@ -1,21 +1,21 @@ - - + + activeSchemeId:org.eclipse.ui.defaultAcceleratorConfiguration ModelMigrationProcessor.001 - + - + topLevel shellMaximized - - - - + + + + persp.actionSet:org.eclipse.mylyn.doc.actionSet persp.actionSet:org.eclipse.mylyn.tasks.ui.navigation persp.actionSet:org.eclipse.ui.cheatsheets.actionSet @@ -28,6 +28,7 @@ persp.actionSet:org.eclipse.ui.actionSet.keyBindings persp.actionSet:org.eclipse.ui.actionSet.openFiles persp.actionSet:org.eclipse.wst.jsdt.chromium.debug.ui.actionSets + persp.actionSet:org.eclipse.wb.core.ui.actionset persp.actionSet:org.eclipse.jst.j2ee.J2eeMainActionSet persp.actionSet:org.eclipse.jdt.ui.JavaActionSet persp.actionSet:org.eclipse.debug.ui.launchActionSet @@ -46,9 +47,8 @@ persp.viewSC:org.eclipse.search.ui.views.SearchView persp.viewSC:org.eclipse.ui.console.ConsoleView persp.showIn:org.eclipse.ui.navigator.ProjectExplorer - persp.actionSet:org.eclipse.wst.ws.explorer.explorer - persp.newWizSC:org.eclipse.m2e.core.wizards.Maven2ProjectWizard - persp.showIn:org.eclipse.tm.terminal.view.ui.TerminalsView + persp.newWizSC:org.eclipse.jpt.jpa.ui.wizard.newJpaProject + persp.perspSC:org.eclipse.jpt.ui.jpaPerspective persp.perspSC:org.eclipse.debug.ui.DebugPerspective persp.perspSC:org.eclipse.jdt.ui.JavaPerspective persp.perspSC:org.eclipse.ui.resourcePerspective @@ -69,47 +69,48 @@ persp.newWizSC:org.eclipse.ui.wizards.new.file persp.actionSet:org.eclipse.wst.server.ui.internal.webbrowser.actionSet persp.actionSet:org.eclipse.debug.ui.breakpointActionSet + persp.newWizSC:org.eclipse.m2e.core.wizards.Maven2ProjectWizard + persp.showIn:org.eclipse.tm.terminal.view.ui.TerminalsView + persp.actionSet:org.eclipse.wst.ws.explorer.explorer persp.actionSet:org.eclipse.eclemma.ui.CoverageActionSet - persp.showIn:org.eclipse.eclemma.ui.CoverageView - persp.newWizSC:org.eclipse.jpt.jpa.ui.wizard.newJpaProject - persp.perspSC:org.eclipse.jpt.ui.jpaPerspective - - - active - noFocus - - - - + + + Minimized + + + + - - - - - Minimized - - + + + + + + - + Minimized - - - - - - - - - - - + Java + noFocus + + + + + + + + + + + + - - + + persp.actionSet:org.eclipse.mylyn.doc.actionSet persp.actionSet:org.eclipse.mylyn.tasks.ui.navigation persp.actionSet:org.eclipse.ui.cheatsheets.actionSet @@ -122,6 +123,124 @@ persp.actionSet:org.eclipse.ui.actionSet.keyBindings persp.actionSet:org.eclipse.ui.actionSet.openFiles persp.actionSet:org.eclipse.wst.jsdt.chromium.debug.ui.actionSets + persp.actionSet:org.eclipse.wb.core.ui.actionset + persp.actionSet:org.eclipse.debug.ui.launchActionSet + persp.actionSet:org.eclipse.jdt.ui.JavaActionSet + persp.actionSet:org.eclipse.jdt.ui.JavaElementCreationActionSet + persp.actionSet:org.eclipse.ui.NavigateActionSet + persp.viewSC:org.eclipse.jdt.ui.PackageExplorer + persp.viewSC:org.eclipse.jdt.ui.TypeHierarchy + persp.viewSC:org.eclipse.jdt.ui.SourceView + persp.viewSC:org.eclipse.jdt.ui.JavadocView + persp.viewSC:org.eclipse.search.ui.views.SearchView + persp.viewSC:org.eclipse.ui.console.ConsoleView + persp.viewSC:org.eclipse.ui.views.ContentOutline + persp.viewSC:org.eclipse.ui.views.ProblemView + persp.viewSC:org.eclipse.ui.views.ResourceNavigator + persp.viewSC:org.eclipse.ui.views.TaskList + persp.viewSC:org.eclipse.ui.views.ProgressView + persp.viewSC:org.eclipse.ui.navigator.ProjectExplorer + persp.viewSC:org.eclipse.ui.texteditor.TemplatesView + persp.viewSC:org.eclipse.pde.runtime.LogView + persp.newWizSC:org.eclipse.jdt.ui.wizards.JavaProjectWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewPackageCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewClassCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewEnumCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewJavaWorkingSetWizard + persp.newWizSC:org.eclipse.ui.wizards.new.folder + persp.newWizSC:org.eclipse.ui.wizards.new.file + persp.newWizSC:org.eclipse.ui.editors.wizards.UntitledTextFileWizard + persp.perspSC:org.eclipse.jdt.ui.JavaBrowsingPerspective + persp.perspSC:org.eclipse.debug.ui.DebugPerspective + persp.viewSC:org.eclipse.ant.ui.views.AntView + persp.showIn:org.eclipse.egit.ui.RepositoriesView + persp.actionSet:org.eclipse.debug.ui.breakpointActionSet + persp.actionSet:org.eclipse.jdt.debug.ui.JDTDebugActionSet + persp.newWizSC:org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizard + persp.actionSet:org.eclipse.jdt.junit.JUnitActionSet + persp.showIn:org.eclipse.jdt.ui.PackageExplorer + persp.showIn:org.eclipse.team.ui.GenericHistoryView + persp.showIn:org.eclipse.ui.views.ResourceNavigator + persp.showIn:org.eclipse.ui.navigator.ProjectExplorer + persp.viewSC:org.eclipse.mylyn.tasks.ui.views.tasks + persp.newWizSC:org.eclipse.mylyn.tasks.ui.wizards.new.repository.task + persp.viewSC:org.eclipse.tm.terminal.view.ui.TerminalsView + persp.showIn:org.eclipse.tm.terminal.view.ui.TerminalsView + persp.viewSC:org.eclipse.wb.core.StructureView + persp.viewSC:org.eclipse.wb.core.PaletteView + persp.perspSC:org.eclipse.wst.jsdt.ui.JavaPerspective + persp.actionSet:org.eclipse.eclemma.ui.CoverageActionSet + + + + org.eclipse.e4.primaryNavigationStack + + + + + + + + + + + + + + + + org.eclipse.e4.secondaryDataStack + Java + Minimized + active + noFocus + + + + + + + + + + + + + + + Minimized + + + + org.eclipse.e4.secondaryNavigationStack + Minimized + + + + + + + + + + + persp.actionSet:org.eclipse.mylyn.doc.actionSet + persp.actionSet:org.eclipse.mylyn.tasks.ui.navigation + persp.actionSet:org.eclipse.rse.core.search.searchActionSet + persp.actionSet:org.eclipse.search.searchActionSet + persp.actionSet:org.eclipse.ui.edit.text.actionSet.annotationNavigation + persp.actionSet:org.eclipse.ui.edit.text.actionSet.navigation + persp.actionSet:org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo + persp.actionSet:org.eclipse.ui.externaltools.ExternalToolsSet + persp.actionSet:org.eclipse.ui.cheatsheets.actionSet + persp.actionSet:org.eclipse.ui.actionSet.keyBindings + persp.actionSet:org.eclipse.ui.actionSet.openFiles + persp.actionSet:org.eclipse.wst.jsdt.chromium.debug.ui.actionSets + persp.actionSet:org.eclipse.wb.core.ui.actionset persp.actionSet:org.eclipse.debug.ui.launchActionSet persp.actionSet:org.eclipse.debug.ui.debugActionSet persp.viewSC:org.eclipse.debug.ui.DebugView @@ -131,3210 +250,3504 @@ persp.viewSC:org.eclipse.ui.views.ContentOutline persp.viewSC:org.eclipse.ui.console.ConsoleView persp.viewSC:org.eclipse.ui.views.TaskList + persp.viewSC:org.eclipse.ant.ui.views.AntView + persp.viewSC:org.eclipse.datatools.sqltools.result.resultView + persp.perspSC:org.eclipse.datatools.sqltools.sqleditor.perspectives.EditorPerspective persp.actionSet:org.eclipse.ui.NavigateActionSet persp.actionSet:org.eclipse.debug.ui.breakpointActionSet persp.viewSC:org.eclipse.pde.runtime.LogView - persp.perspSC:org.eclipse.wst.xml.ui.perspective + persp.showIn:org.eclipse.egit.ui.RepositoriesView + persp.actionSet:org.eclipse.jdt.debug.ui.JDTDebugActionSet + persp.viewSC:org.eclipse.jdt.debug.ui.DisplayView persp.perspSC:org.eclipse.jdt.ui.JavaPerspective persp.perspSC:org.eclipse.jdt.ui.JavaBrowsingPerspective persp.actionSet:org.eclipse.jdt.ui.JavaActionSet persp.showIn:org.eclipse.jdt.ui.PackageExplorer - persp.perspSC:org.eclipse.wst.jsdt.ui.JavaPerspective - persp.showIn:org.eclipse.wst.jsdt.ui.PackageExplorer - persp.actionSet:org.eclipse.jdt.debug.ui.JDTDebugActionSet - persp.viewSC:org.eclipse.jdt.debug.ui.DisplayView - persp.showIn:org.eclipse.egit.ui.RepositoriesView persp.viewSC:org.eclipse.tm.terminal.view.ui.TerminalsView persp.showIn:org.eclipse.tm.terminal.view.ui.TerminalsView + persp.perspSC:org.eclipse.wst.jsdt.ui.JavaPerspective + persp.showIn:org.eclipse.wst.jsdt.ui.PackageExplorer + persp.perspSC:org.eclipse.wst.xml.ui.perspective persp.actionSet:org.eclipse.eclemma.ui.CoverageActionSet - persp.showIn:org.eclipse.eclemma.ui.CoverageView - persp.viewSC:org.eclipse.datatools.sqltools.result.resultView - persp.perspSC:org.eclipse.datatools.sqltools.sqleditor.perspectives.EditorPerspective - persp.viewSC:org.eclipse.ant.ui.views.AntView - - - - org.eclipse.e4.primaryNavigationStack - Minimized - - - - - - - - Minimized - - - - - - - - - - - org.eclipse.e4.secondaryDataStack + + + + + org.eclipse.e4.primaryNavigationStack + + + + + + + Minimized - - - - - - - - + + + + - - org.eclipse.e4.secondaryNavigationStack - Minimized - - + + + + org.eclipse.e4.secondaryNavigationStack + Minimized + + + + + org.eclipse.e4.secondaryDataStack + Java + General + Minimized + + + + + + + + + + + - - - - + + Minimized + + + - + View categoryTag:Help - + + View categoryTag:General + + ViewMenu + menuContribution:menu + + - + View categoryTag:Help - - + + org.eclipse.e4.primaryDataStack EditorStack + + + Editor + org.eclipse.jdt.ui.CompilationUnitEditor + removeOnHide + + + + Editor + org.eclipse.jdt.ui.CompilationUnitEditor + removeOnHide + + + + Editor + org.eclipse.jdt.ui.CompilationUnitEditor + removeOnHide + - + - + View categoryTag:General - active - + ViewMenu menuContribution:menu - + + menuContribution:popup + popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu + + + menuContribution:popup + popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu + + + menuContribution:popup + popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu + + menuContribution:popup popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu - + - + View categoryTag:General - + + View categoryTag:Java + + ViewMenu + menuContribution:menu + + + menuContribution:popup + popup:org.eclipse.jdt.ui.TypeHierarchy.supertypes + + + menuContribution:popup + popup:org.eclipse.jdt.ui.TypeHierarchy.subtypes + + + menuContribution:popup + popup:org.eclipse.jdt.ui.TypeHierarchy.typehierarchy + + + menuContribution:popup + popup:org.eclipse.jdt.ui.TypeHierarchy.members + + - + View categoryTag:Java Browsing - + - + View categoryTag:General - + ViewMenu menuContribution:menu - + + menuContribution:popup + popup:org.eclipse.ui.views.AllMarkersView + popup:org.eclipse.ui.ide.MarkersView + + + menuContribution:popup + popup:org.eclipse.ui.views.AllMarkersView + popup:org.eclipse.ui.ide.MarkersView + + - + View categoryTag:General - + View categoryTag:Server - + View categoryTag:Data Management - + View categoryTag:General - + + View categoryTag:General + + ViewMenu + menuContribution:menu + + + menuContribution:popup + popup:org.eclipse.ui.views.ProblemView + popup:org.eclipse.ui.ide.MarkersView + + + menuContribution:popup + popup:org.eclipse.ui.views.ProblemView + popup:org.eclipse.ui.ide.MarkersView + + + menuContribution:popup + popup:org.eclipse.ui.views.ProblemView + popup:org.eclipse.ui.ide.MarkersView + + + menuContribution:popup + popup:org.eclipse.ui.views.ProblemView + popup:org.eclipse.ui.ide.MarkersView + + + menuContribution:popup + popup:org.eclipse.ui.views.ProblemView + popup:org.eclipse.ui.ide.MarkersView + + + menuContribution:popup + popup:org.eclipse.ui.views.ProblemView + popup:org.eclipse.ui.ide.MarkersView + + + menuContribution:popup + popup:org.eclipse.ui.views.ProblemView + popup:org.eclipse.ui.ide.MarkersView + + - + View categoryTag:General - + View categoryTag:General - + active + activeOnClose + ViewMenu menuContribution:menu - + + menuContribution:popup + popup:org.eclipse.debug.ui.ProcessConsoleType.#ContextMenu + + menuContribution:popup popup:org.eclipse.debug.ui.ProcessConsoleType.#ContextMenu - + - + View categoryTag:General - + View categoryTag:General - + + View categoryTag:General + + ViewMenu + menuContribution:menu + + - + View categoryTag:General - + ViewMenu menuContribution:menu - + + menuContribution:popup + popup:org.eclipse.jdt.ui.outline + + + menuContribution:popup + popup:org.eclipse.jdt.ui.outline + + + menuContribution:popup + popup:org.eclipse.jdt.ui.outline + + + menuContribution:popup + popup:org.eclipse.jdt.ui.outline + + + menuContribution:popup + popup:org.eclipse.jdt.ui.outline + + + menuContribution:popup + popup:org.eclipse.jdt.ui.outline + + + menuContribution:popup + popup:org.eclipse.jdt.ui.outline + + + menuContribution:popup + popup:org.eclipse.jdt.ui.outline + + + menuContribution:popup + popup:org.eclipse.jdt.ui.outline + + + menuContribution:popup + popup:org.eclipse.jdt.ui.outline + + + menuContribution:popup + popup:org.eclipse.jdt.ui.outline + + + menuContribution:popup + popup:org.eclipse.jdt.ui.outline + + + menuContribution:popup + popup:org.eclipse.jdt.ui.outline + + + menuContribution:popup + popup:org.eclipse.jdt.ui.outline + + + menuContribution:popup + popup:org.eclipse.jdt.ui.outline + + + menuContribution:popup + popup:org.eclipse.jdt.ui.outline + + + menuContribution:popup + popup:org.eclipse.jdt.ui.outline + + + menuContribution:popup + popup:org.eclipse.jdt.ui.outline + + - + + View categoryTag:Mylyn + + ViewMenu + menuContribution:menu + + + menuContribution:popup + popup:org.eclipse.mylyn.tasks.ui.menus.activeTask + + + menuContribution:popup + popup:org.eclipse.mylyn.tasks.ui.views.tasks + + + menuContribution:popup + popup:org.eclipse.mylyn.tasks.ui.menus.activeTask + + + menuContribution:popup + popup:org.eclipse.mylyn.tasks.ui.views.tasks + + - + + + + + View + categoryTag:Java + + ViewMenu + menuContribution:menu + + + menuContribution:popup + popup:org.eclipse.jdt.ui.PackageExplorer + + + menuContribution:popup + popup:org.eclipse.jdt.ui.PackageExplorer + + + menuContribution:popup + popup:org.eclipse.jdt.ui.PackageExplorer + + + menuContribution:popup + popup:org.eclipse.jdt.ui.PackageExplorer + + + menuContribution:popup + popup:org.eclipse.jdt.ui.PackageExplorer + + + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:General + + + + + View + categoryTag:Ant + + + + + View + categoryTag:Git + + + + + View + categoryTag:Java + + + + + View + categoryTag:Terminal + + + + + View + categoryTag:WindowBuilder + + + + + View + categoryTag:WindowBuilder + + + + + + View + categoryTag:Java + + ViewMenu + menuContribution:menu + + + menuContribution:popup + popup:org.eclipse.jdt.callhierarchy.view + + + menuContribution:popup + popup:org.eclipse.jdt.callhierarchy.view + + + menuContribution:popup + popup:org.eclipse.jdt.callhierarchy.view + + + menuContribution:popup + popup:org.eclipse.jdt.callhierarchy.view + + + menuContribution:popup + popup:org.eclipse.jdt.callhierarchy.view + + + menuContribution:popup + popup:org.eclipse.jdt.callhierarchy.view + + + menuContribution:popup + popup:org.eclipse.jdt.callhierarchy.view + + + menuContribution:popup + popup:org.eclipse.jdt.callhierarchy.view + + + + View categoryTag:Debug - + ViewMenu menuContribution:menu - + + menuContribution:popup + popup:org.eclipse.debug.ui.DebugView + + + menuContribution:popup + popup:org.eclipse.debug.ui.DebugView + + menuContribution:popup popup:org.eclipse.debug.ui.DebugView - + menuContribution:popup popup:org.eclipse.debug.ui.DebugView - + - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + menuContribution:popup popup:org.eclipse.debug.ui.VariableView.detail - + menuContribution:popup popup:org.eclipse.debug.ui.VariableView - + + menuContribution:popup + popup:org.eclipse.debug.ui.VariableView.detail + + + menuContribution:popup + popup:org.eclipse.debug.ui.VariableView + + - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + + menuContribution:popup + popup:org.eclipse.debug.ui.VariableView.detail + + + menuContribution:popup + popup:org.eclipse.debug.ui.BreakpointView + + menuContribution:popup popup:org.eclipse.debug.ui.VariableView.detail - + menuContribution:popup popup:org.eclipse.debug.ui.BreakpointView - + - + View categoryTag:Debug - + View categoryTag:Debug - + + + + View + categoryTag:Data Management + + View categoryTag:Debug - - - - View - categoryTag:Java - - + View categoryTag:General - - - - View - categoryTag:Terminal - - - - - View - categoryTag:Data Management - - - - - View - categoryTag:Ant - - - + + toolbarSeparator - + - + Draggable - - Opaque - - - Opaque - - - Opaque - - - Opaque - - - Opaque - - - Opaque - - - Opaque - - - - Opaque - - - Opaque - - - Opaque - - - Opaque - + - + toolbarSeparator - + - + Draggable - - Opaque - - - Opaque - - - Opaque - - - Opaque - - - Opaque - - - Opaque - - - Opaque - - - Opaque - - + Draggable - - Opaque - - - Opaque - - - Opaque - - - Opaque - - - Opaque - - + Draggable - - Opaque - - - Opaque - - - Opaque - - + Draggable - - Opaque - - - Opaque - - - Opaque - - - Opaque - - + Draggable - - Opaque - - - Opaque - - + + Draggable + + Draggable - - Opaque - - - Opaque - - + toolbarSeparator - + - + Draggable - - Opaque - - - Opaque - - - Opaque - - - Opaque - - - Opaque - - - - Opaque - - - Opaque - - - Opaque - + - + toolbarSeparator - + - + toolbarSeparator - + - + Draggable - - Opaque - - - Opaque - - + stretch SHOW_RESTORE_MENU - + Draggable HIDEABLE SHOW_RESTORE_MENU - - + + stretch - + Draggable - + Draggable - - + + TrimStack Draggable - + + TrimStack + Draggable + + - + + TrimStack + Draggable + + TrimStack Draggable - - + + TrimStack Draggable - + TrimStack Draggable - + TrimStack Draggable - - - + + TrimStack + Draggable + + + TrimStack + Draggable + + + TrimStack + Draggable + + TrimStack Draggable - - - platform:win32 - - - - - - - - + + + + + + + + + + locale:zh - - - - - - - - - - - - - - + + + + + + + + + + + + + platform:win32 + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + locale:zh - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - locale:zh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + locale:zh - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - + + + locale:zh - - - - - - - - - - - - - - - + + + + + + + + + - - + + - - + + + + - - + + - - - + + - - - - + + - - + + + - - - - - - - - - - - - + + - - + + + - - + + + + + - - - - - + + + - - + + - - - + + - - + + - - + + + + - - - - - + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - + + - - - - + + + - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - - - - + + + - - - - - - + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - + + + - - - + + + + + + - - - - - + + + + + + - - - + + + - - + + + + + + + + - - - + + + + - - + + + - - + + - - + + + + - - - - + + + - - + + - - + + + + + + + + platform:win32 - - - + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + - - + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Editor - + View categoryTag:Ant - - - - View - categoryTag:Gradle - - - - - View - categoryTag:Gradle - - + View categoryTag:Data Management - + View categoryTag:Data Management - + View categoryTag:Data Management - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - - - - View - categoryTag:Java - - + View categoryTag:Git - + View categoryTag:Git - + View categoryTag:Git - + View categoryTag:Git - + View categoryTag:Git - + View categoryTag:General - + View categoryTag:Help - + View categoryTag:Debug - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:Java Browsing - + View categoryTag:Java Browsing - + View categoryTag:Java Browsing - + View categoryTag:Java Browsing - + View categoryTag:Java - + View categoryTag:General - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:JPA - + View categoryTag:JPA - + View categoryTag:JavaServer Faces - + View categoryTag:JavaServer Faces - + View categoryTag:Web Services - + View categoryTag:Maven - + View categoryTag:Maven - + View categoryTag:Mylyn - + View categoryTag:Mylyn - + View categoryTag:Mylyn - + View categoryTag:Oomph - + View categoryTag:API Tools - + View categoryTag:Plug-in Development - + View categoryTag:Plug-in Development - + View categoryTag:Plug-in Development - + View categoryTag:Plug-in Development - + View categoryTag:Plug-in Development - + View categoryTag:Code Recommenders - + View categoryTag:Code Recommenders - + View categoryTag:Code Recommenders - + View categoryTag:Code Recommenders - + View categoryTag:Remote Systems - + View categoryTag:Remote Systems - + View categoryTag:Remote Systems - + View categoryTag:Remote Systems - + View categoryTag:Remote Systems - + View categoryTag:Remote Systems - + View categoryTag:Remote Systems - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Team - + View categoryTag:Team - + View categoryTag:Terminal - + View categoryTag:Other - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Help - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Debug - + View categoryTag:JavaScript - + View categoryTag:JavaScript - + View categoryTag:JavaScript - + View categoryTag:JavaScript - + View categoryTag:JavaScript - + View categoryTag:Server - + View categoryTag:XML - + View categoryTag:XML - + View categoryTag:XML - + View categoryTag:XML - + View categoryTag:XML - - - - - - - - - - - - - - - + + + + View + categoryTag:WindowBuilder + + + + + View + categoryTag:WindowBuilder + + + + + View + categoryTag:Gradle + + + + + View + categoryTag:Gradle + + + + + View + categoryTag:Java + + + + glue + move_after:PerspectiveSpacer + SHOW_RESTORE_MENU + + + move_after:Spacer Glue + HIDEABLE + SHOW_RESTORE_MENU + + + glue + move_after:SearchField + SHOW_RESTORE_MENU + + + + + + + + - - - - - - + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - + + + + + + + + + + + + - - - + + + + + + - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/server-config.json b/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/server-config.json index 8c00a73..d5bfaa5 100644 --- a/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/server-config.json +++ b/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/server-config.json @@ -1,10 +1,10 @@ { "version": "v1", "title": "Eclipse", - "timestamp": 1507046825572, + "timestamp": 1503851957181, "ttl": 10080, "helpUrl": "https://dev.eclipse.org/recommenders/community/aeri/v2/help/", - "feedbackUrl": "https://www.codetrails.com/error-analytics/", + "feedbackUrl": "http://ctrlflow.com/automated-error-reporting", "aboutUrl": "https://wiki.eclipse.org/EPP/Logging", "submitUrl": "https://dev.eclipse.org/recommenders/community/confess/0.6/reports/", "maxReportSize": 262144, diff --git a/.metadata/.plugins/org.eclipse.jdt.core/1805218701.index b/.metadata/.plugins/org.eclipse.jdt.core/1805218701.index index e43944d..7afa7e9 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/1805218701.index and b/.metadata/.plugins/org.eclipse.jdt.core/1805218701.index differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache b/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache index 593f470..da20993 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache and b/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps b/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps index a76b12c..57047c1 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps and b/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt b/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt index 36fe9a7..9954f27 100644 --- a/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt +++ b/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt @@ -12,8 +12,8 @@ INDEX VERSION 1.130+E:\Study\java\judt\.metadata\.plugins\org.eclipse.jdt.core 3509802008.index 1805218701.index 1192406101.index -2973984958.index 3268650884.index +2973984958.index 3931001268.index 1829136339.index 3566617508.index diff --git a/.metadata/.plugins/org.eclipse.jdt.debug.ui/dialog_settings.xml b/.metadata/.plugins/org.eclipse.jdt.debug.ui/dialog_settings.xml index 5ca0b77..32d5440 100644 --- a/.metadata/.plugins/org.eclipse.jdt.debug.ui/dialog_settings.xml +++ b/.metadata/.plugins/org.eclipse.jdt.debug.ui/dialog_settings.xml @@ -1,3 +1,9 @@
+
+ + + + +
diff --git a/.metadata/.plugins/org.eclipse.jdt.launching/.install.xml b/.metadata/.plugins/org.eclipse.jdt.launching/.install.xml index eb442b5..1ad9277 100644 --- a/.metadata/.plugins/org.eclipse.jdt.launching/.install.xml +++ b/.metadata/.plugins/org.eclipse.jdt.launching/.install.xml @@ -1,5 +1,5 @@ - + diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml b/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml index d9d780c..71a75b6 100644 --- a/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml +++ b/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml @@ -1,7 +1,71 @@
+ + + + + + + + +
+
+
+ + + + +
+
+ + + + + +
+
+ + +
+
+ +
+
+ + + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/0.png b/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/0.png deleted file mode 100644 index 269f575..0000000 Binary files a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/0.png and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/1.png b/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/1.png deleted file mode 100644 index a839ceb..0000000 Binary files a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/1.png and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/10.png b/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/10.png deleted file mode 100644 index 7a33be7..0000000 Binary files a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/10.png and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/11.png b/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/11.png deleted file mode 100644 index 69ec8b9..0000000 Binary files a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/11.png and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/12.png b/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/12.png deleted file mode 100644 index 1c09643..0000000 Binary files a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/12.png and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/13.png b/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/13.png deleted file mode 100644 index 88bd98d..0000000 Binary files a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/13.png and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/14.png b/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/14.png deleted file mode 100644 index 18ebdd1..0000000 Binary files a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/14.png and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/15.png b/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/15.png deleted file mode 100644 index 38a7305..0000000 Binary files a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/15.png and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/2.png b/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/2.png deleted file mode 100644 index 5a8a6f0..0000000 Binary files a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/2.png and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/3.png b/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/3.png deleted file mode 100644 index a184bb2..0000000 Binary files a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/3.png and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/4.png b/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/4.png deleted file mode 100644 index ba2d4d6..0000000 Binary files a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/4.png and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/5.png b/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/5.png deleted file mode 100644 index 4ac9b38..0000000 Binary files a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/5.png and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/6.png b/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/6.png deleted file mode 100644 index 4e7488e..0000000 Binary files a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/6.png and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/7.png b/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/7.png deleted file mode 100644 index 588e908..0000000 Binary files a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/7.png and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/8.png b/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/8.png deleted file mode 100644 index 7b019ba..0000000 Binary files a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/8.png and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/9.png b/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/9.png deleted file mode 100644 index be086d7..0000000 Binary files a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/9.png and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/judt/2017/10/41/refactorings.history b/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/judt/2017/10/41/refactorings.history deleted file mode 100644 index 05b6d2d..0000000 --- a/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/judt/2017/10/41/refactorings.history +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/judt/2017/10/41/refactorings.index b/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/judt/2017/10/41/refactorings.index deleted file mode 100644 index b8ad2d5..0000000 --- a/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/judt/2017/10/41/refactorings.index +++ /dev/null @@ -1,4 +0,0 @@ -1507451177753 Infer generic type arguments -1507630373385 Delete element -1507630378761 Delete element -1507631173940 Delete elements diff --git a/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml b/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml index 9ed29b5..6b45f59 100644 Binary files a/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml and b/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml differ diff --git a/.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log b/.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log index dda4faf..a94aeb7 100644 --- a/.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log +++ b/.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log @@ -3,431 +3,3 @@ 2017-08-28 00:42:23,317 [Worker-3] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. 2017-08-28 00:43:51,647 [Worker-3] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. 2017-08-28 00:49:53,709 [Worker-4] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. -2017-10-04 00:06:54,492 [Worker-5] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is out-of-date. Trying to update. -2017-10-08 14:13:27,062 [Worker-13] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is not available. Remote download required. -2017-10-08 14:49:51,719 [Worker-30] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:52) ~[org.apache.maven.resolver.connector.basic_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:364) ~[org.apache.maven.resolver.connector.basic_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:76) ~[na:na] - at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:590) ~[org.apache.maven.resolver.connector.basic_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:258) ~[org.apache.maven.resolver.connector.basic_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:529) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -Caused by: org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178) ~[na:na] - at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:137) ~[na:na] - at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:150) ~[na:na] - at org.eclipse.aether.spi.connector.transport.AbstractTransporter.copy(AbstractTransporter.java:209) ~[org.apache.maven.resolver.spi_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.spi.connector.transport.AbstractTransporter.utilGet(AbstractTransporter.java:105) ~[org.apache.maven.resolver.spi_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.transport.http.HttpTransporter.access$100(HttpTransporter.java:81) ~[org.apache.maven.resolver.transport.http_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.transport.http.HttpTransporter$EntityGetter.handle(HttpTransporter.java:525) ~[org.apache.maven.resolver.transport.http_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:303) ~[org.apache.maven.resolver.transport.http_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTransporter.java:252) ~[org.apache.maven.resolver.transport.http_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(AbstractTransporter.java:68) ~[org.apache.maven.resolver.spi_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:456) ~[org.apache.maven.resolver.connector.basic_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:359) ~[org.apache.maven.resolver.connector.basic_1.0.3.v20170405-0725.jar:1.0.3] - ... 13 common frames omitted -2017-10-08 14:49:51,725 [Worker-35] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -2017-10-08 15:12:32,126 [Worker-74] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -2017-10-08 15:16:48,364 [Worker-80] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -2017-10-08 15:16:53,161 [Worker-73] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -2017-10-08 15:31:44,141 [Worker-87] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -2017-10-08 15:34:07,823 [Worker-92] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -2017-10-08 15:34:19,413 [Worker-88] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -2017-10-08 15:34:36,523 [Worker-83] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5991813; received: 525308 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -2017-10-08 15:54:17,111 [Worker-106] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:52) ~[org.apache.maven.resolver.connector.basic_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:364) ~[org.apache.maven.resolver.connector.basic_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:76) ~[na:na] - at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:590) ~[org.apache.maven.resolver.connector.basic_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:258) ~[org.apache.maven.resolver.connector.basic_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:529) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -Caused by: org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178) ~[na:na] - at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:137) ~[na:na] - at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:150) ~[na:na] - at org.eclipse.aether.spi.connector.transport.AbstractTransporter.copy(AbstractTransporter.java:209) ~[org.apache.maven.resolver.spi_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.spi.connector.transport.AbstractTransporter.utilGet(AbstractTransporter.java:105) ~[org.apache.maven.resolver.spi_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.transport.http.HttpTransporter.access$100(HttpTransporter.java:81) ~[org.apache.maven.resolver.transport.http_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.transport.http.HttpTransporter$EntityGetter.handle(HttpTransporter.java:525) ~[org.apache.maven.resolver.transport.http_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:303) ~[org.apache.maven.resolver.transport.http_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTransporter.java:252) ~[org.apache.maven.resolver.transport.http_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(AbstractTransporter.java:68) ~[org.apache.maven.resolver.spi_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:456) ~[org.apache.maven.resolver.connector.basic_1.0.3.v20170405-0725.jar:1.0.3] - at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:359) ~[org.apache.maven.resolver.connector.basic_1.0.3.v20170405-0725.jar:1.0.3] - ... 13 common frames omitted -2017-10-08 15:54:17,564 [Worker-99] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -2017-10-08 15:58:02,259 [Worker-109] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -2017-10-08 16:33:08,215 [Worker-127] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -2017-10-08 16:33:23,300 [Worker-121] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -2017-10-08 16:35:13,987 [Worker-131] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -2017-10-08 16:35:42,137 [Worker-132] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -2017-10-08 16:41:18,860 [Worker-136] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -2017-10-08 16:41:39,264 [Worker-130] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -2017-10-08 16:41:46,827 [Worker-137] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -2017-10-08 16:48:40,769 [Worker-137] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -2017-10-08 16:51:33,502 [Worker-139] WARN o.e.r.models.ModelRepository - Failed to download jre:jre:call:zip:1.0.0 -org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:303) ~[na:na] - at org.eclipse.recommenders.models.ModelRepository.resolveInternal(ModelRepository.java:193) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.models.ModelRepository.resolve(ModelRepository.java:172) [org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.EclipseModelRepository.resolve(EclipseModelRepository.java:168) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.recommenders.internal.models.rcp.DownloadModelArchiveJob.run(DownloadModelArchiveJob.java:76) [org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar:na] - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) [org.eclipse.core.jobs_3.9.1.v20170714-0547.jar:na] -Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer jre:jre:zip:call:1.0.0-20160630.185625-2 from http://download.eclipse.org/recommenders/models/oxygen/ was cached in the local repository, resolution will not be reattempted until the update interval of models has elapsed or updates are forced. Original error: Could not transfer artifact jre:jre:zip:call:1.0.0-20160630.185625-2 from/to models (http://download.eclipse.org/recommenders/models/oxygen/): Premature end of Content-Length delimited message body (expected: 5466505; received: 632000 - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:247) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:215) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:594) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:512) ~[na:na] - at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430) ~[na:na] - ... 8 common frames omitted -2017-10-09 02:12:03,504 [Worker-0] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. -2017-10-09 03:28:56,721 [Worker-5] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. -2017-10-09 03:58:25,404 [Worker-4] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. -2017-10-09 12:24:35,857 [Worker-3] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. -2017-10-09 22:39:42,200 [Worker-18] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is out-of-date. Trying to update. -2017-10-10 01:50:46,433 [Worker-3] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. -2017-10-10 02:32:01,033 [Worker-14] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. -2017-10-10 13:03:10,387 [Worker-6] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. -2017-10-10 14:00:08,793 [Worker-4] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. -2017-10-10 22:50:55,031 [Worker-1] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is out-of-date. Trying to update. -2017-10-10 22:52:17,272 [Worker-4] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. -2017-10-10 22:52:59,520 [Worker-4] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. -2017-10-10 22:54:36,290 [Worker-1] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. -2017-10-10 22:55:22,962 [Worker-0] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. -2017-10-10 22:57:43,820 [Worker-3] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. -2017-10-10 23:10:00,940 [Worker-0] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. diff --git a/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.8.1.20170728-1531.xml b/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.8.1.20170728-1531.xml deleted file mode 100644 index e33758c..0000000 --- a/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.8.1.20170728-1531.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - %date [%thread] %-5level %logger{35} - %msg%n - - - OFF - - - - - ${org.eclipse.m2e.log.dir}/0.log - - ${org.eclipse.m2e.log.dir}/%i.log - 1 - 10 - - - 100MB - - - %date [%thread] %-5level %logger{35} - %msg%n - - - - - - WARN - - - - - - - - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties b/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties index 6b42b24..f2bca2f 100644 --- a/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties +++ b/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties @@ -1,2 +1,2 @@ #Cached timestamps -#Tue Oct 10 23:09:39 CST 2017 +#Mon Aug 28 00:54:45 CST 2017 diff --git a/.metadata/.plugins/org.eclipse.pde.core/.local_targets/1507647106718.target b/.metadata/.plugins/org.eclipse.pde.core/.local_targets/1507647106718.target deleted file mode 100644 index 4cddeb2..0000000 --- a/.metadata/.plugins/org.eclipse.pde.core/.local_targets/1507647106718.target +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - -win32 -win32 -x86_64 -zh_CN - - diff --git a/.metadata/.plugins/org.eclipse.pde.core/.local_targets/1507647150848.target b/.metadata/.plugins/org.eclipse.pde.core/.local_targets/1507647150848.target deleted file mode 100644 index 4cddeb2..0000000 --- a/.metadata/.plugins/org.eclipse.pde.core/.local_targets/1507647150848.target +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - -win32 -win32 -x86_64 -zh_CN - - diff --git a/.metadata/.plugins/org.eclipse.pde.core/.local_targets/1507647262388.target b/.metadata/.plugins/org.eclipse.pde.core/.local_targets/1507647262388.target deleted file mode 100644 index 4cddeb2..0000000 --- a/.metadata/.plugins/org.eclipse.pde.core/.local_targets/1507647262388.target +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - -win32 -win32 -x86_64 -zh_CN - - diff --git a/.metadata/.plugins/org.eclipse.pde.core/.local_targets/1507647315540.target b/.metadata/.plugins/org.eclipse.pde.core/.local_targets/1507647315540.target deleted file mode 100644 index 4cddeb2..0000000 --- a/.metadata/.plugins/org.eclipse.pde.core/.local_targets/1507647315540.target +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - -win32 -win32 -x86_64 -zh_CN - - diff --git a/.metadata/.plugins/org.eclipse.pde.core/.local_targets/1507647349336.target b/.metadata/.plugins/org.eclipse.pde.core/.local_targets/1507647349336.target deleted file mode 100644 index 4cddeb2..0000000 --- a/.metadata/.plugins/org.eclipse.pde.core/.local_targets/1507647349336.target +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - -win32 -win32 -x86_64 -zh_CN - - diff --git a/.metadata/.plugins/org.eclipse.pde.core/.local_targets/1507648147331.target b/.metadata/.plugins/org.eclipse.pde.core/.local_targets/1507648147331.target deleted file mode 100644 index 4cddeb2..0000000 --- a/.metadata/.plugins/org.eclipse.pde.core/.local_targets/1507648147331.target +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - -win32 -win32 -x86_64 -zh_CN - - diff --git a/.metadata/.plugins/org.eclipse.pde.core/SavedExternalPluginList.txt b/.metadata/.plugins/org.eclipse.pde.core/SavedExternalPluginList.txt deleted file mode 100644 index b375747..0000000 --- a/.metadata/.plugins/org.eclipse.pde.core/SavedExternalPluginList.txt +++ /dev/null @@ -1,1001 +0,0 @@ -# List of external plug-in models previously loaded. Timestamp: 1507648179376 -file:/C:/Users/jinyu/.p2/pool/plugins/ch.qos.logback.classic_1.0.7.v20121108-1250.jar -file:/C:/Users/jinyu/.p2/pool/plugins/ch.qos.logback.core_1.0.7.v20121108-1250.jar -file:/C:/Users/jinyu/.p2/pool/plugins/ch.qos.logback.slf4j_1.0.7.v201505121915.jar -file:/C:/Users/jinyu/.p2/pool/plugins/com.google.gson_2.7.0.v20170129-0911.jar -file:/C:/Users/jinyu/.p2/pool/plugins/com.google.guava_21.0.0.v20170206-1425.jar -file:/C:/Users/jinyu/.p2/pool/plugins/com.google.guava_15.0.0.v201403281430.jar -file:/C:/Users/jinyu/.p2/pool/plugins/com.google.inject_3.0.0.v201312141243.jar -file:/C:/Users/jinyu/.p2/pool/plugins/com.google.inject.multibindings_3.0.0.v201402270930.jar -file:/C:/Users/jinyu/.p2/pool/plugins/com.google.javascript_0.0.20160315.v20161124-1903.jar -file:/C:/Users/jinyu/.p2/pool/plugins/com.google.protobuf_2.4.0.v201105131100.jar -file:/C:/Users/jinyu/.p2/pool/plugins/com.gradleware.tooling.client_0.19.3.v20170801075239.jar -file:/C:/Users/jinyu/.p2/pool/plugins/com.gradleware.tooling.model_0.19.3.v20170801075239.jar -file:/C:/Users/jinyu/.p2/pool/plugins/com.gradleware.tooling.utils_0.19.3.v20170801075239.jar -file:/C:/Users/jinyu/.p2/pool/plugins/com.ibm.icu_58.2.0.v20170418-1837.jar -file:/C:/Users/jinyu/.p2/pool/plugins/com.jcraft.jsch_0.1.54.v20170116-1932.jar -file:/C:/Users/jinyu/.p2/pool/plugins/com.sun.el_2.2.0.v201303151357.jar -file:/C:/Users/jinyu/.p2/pool/plugins/com.sun.jna_4.1.0.v20170410-1117.jar -file:/C:/Users/jinyu/.p2/pool/plugins/com.sun.jna.platform_4.1.0.v20170410-1117.jar -file:/C:/Users/jinyu/.p2/pool/plugins/java_cup.runtime_0.10.0.v201005080400.jar -file:/C:/Users/jinyu/.p2/pool/plugins/javaewah_1.1.6.v20160919-1400.jar -file:/C:/Users/jinyu/.p2/pool/plugins/javax.activation_1.1.0.v201211130549.jar -file:/C:/Users/jinyu/.p2/pool/plugins/javax.annotation_1.2.0.v201602091430.jar -file:/C:/Users/jinyu/.p2/pool/plugins/javax.el_2.2.0.v201303151357.jar -file:/C:/Users/jinyu/.p2/pool/plugins/javax.inject_1.0.0.v20091030.jar -file:/C:/Users/jinyu/.p2/pool/plugins/javax.jws_2.0.0.v201005080400.jar -file:/C:/Users/jinyu/.p2/pool/plugins/javax.mail_1.4.0.v201005080615.jar -file:/C:/Users/jinyu/.p2/pool/plugins/javax.persistence_2.1.0.v201304241213.jar -file:/C:/Users/jinyu/.p2/pool/plugins/javax.servlet_3.1.0.v201410161800.jar -file:/C:/Users/jinyu/.p2/pool/plugins/javax.servlet.jsp_2.2.0.v201112011158.jar -file:/C:/Users/jinyu/.p2/pool/plugins/javax.wsdl_1.6.2.v201012040545.jar -file:/C:/Users/jinyu/.p2/pool/plugins/javax.wsdl_1.5.1.v201012040544.jar -file:/C:/Users/jinyu/.p2/pool/plugins/javax.xml_1.3.4.v201005080400.jar -file:/C:/Users/jinyu/.p2/pool/plugins/javax.xml.rpc_1.1.0.v201209140446/ -file:/C:/Users/jinyu/.p2/pool/plugins/javax.xml.soap_1.2.0.v201005080501/ -file:/C:/Users/jinyu/.p2/pool/plugins/javax.xml.stream_1.0.1.v201004272200.jar -file:/C:/Users/jinyu/.p2/pool/plugins/javax.xml.ws_2.1.0.v200902101523.jar -file:/C:/Users/jinyu/.p2/pool/plugins/net.sourceforge.lpg.lpgjavaruntime_1.1.0.v201004271650.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.ant_1.10.1.v20170504-0840/ -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.axis_1.4.0.v201411182030/ -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.batik.css_1.8.0.v20170214-1941.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.batik.util_1.8.0.v20170214-1941.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.batik.util.gui_1.8.0.v20170214-1941.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.bcel_5.2.0.v201005080400.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.commons.codec_1.9.0.v20170208-1614.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.commons.collections_3.2.2.v201511171945.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.commons.compress_1.6.0.v201310281400.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.commons.discovery_0.2.0.v201004190315/ -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.commons.httpclient_3.1.0.v201012070820.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.commons.io_2.2.0.v201405211200.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.commons.jxpath_1.3.0.v200911051830.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.commons.lang_2.6.0.v201404270220.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.commons.lang3_3.1.0.v201403281430.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.commons.logging_1.1.1.v201101211721.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.commons.logging_1.0.4.v201101211617.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.commons.math_2.1.0.v201105210652.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.commons.net_3.2.0.v201305141515.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.commons.pool_1.6.0.v201204271246.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.felix.gogo.command_0.10.0.v201209301215.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.felix.gogo.runtime_0.10.0.v201209301036.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.felix.gogo.shell_0.10.0.v201212101605.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.felix.scr_2.0.10.v20170501-2007.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.httpcomponents.httpclient_4.5.2.v20170210-0925.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.httpcomponents.httpclient.win_4.5.2.v20170410-1149.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.httpcomponents.httpcore_4.4.6.v20170210-0925.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.jasper.glassfish_2.2.2.v201501141630.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.log4j_1.2.15.v201012070815.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.lucene.analyzers-common_6.1.0.v20161115-1612.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.lucene.analyzers-smartcn_6.1.0.v20161115-1612.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.lucene.core_6.1.0.v20161115-1612.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.lucene.core_3.5.0.v20120725-1805.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.lucene.misc_6.1.0.v20161115-1612.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.lucene.queryparser_6.1.0.v20161115-1612.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.maven.resolver.api_1.0.3.v20170405-0725.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.maven.resolver.connector.basic_1.0.3.v20170405-0725.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.maven.resolver.impl_1.0.3.v20170405-0725.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.maven.resolver.spi_1.0.3.v20170405-0725.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.maven.resolver.transport.file_1.0.3.v20170405-0725.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.maven.resolver.transport.http_1.0.3.v20170405-0725.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.maven.resolver.util_1.0.3.v20170405-0725.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.solr.client.solrj_3.5.0.v20150506-0844.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.velocity_1.5.0.v200905192330.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.ws.commons.util_1.0.1.v20100518-1140.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.wsil4j_1.0.0.v200901211807.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.xalan_2.7.1.v201005080400.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.xerces_2.9.0.v201101211617.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.xml.resolver_1.2.0.v201005080400.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.xml.serializer_2.7.1.v201005080400.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.apache.xmlrpc_3.0.0.v20100427-1100.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.aether.maven_3.1.0.v20140706-2237.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ant.core_3.5.0.v20170509-2149.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ant.launching_1.2.0.v20170509-2157.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ant.ui_3.7.0.v20170412-1054.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.buildship.branding_2.1.2.v20170807-1324.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.buildship.core_2.1.2.v20170807-1324.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.buildship.stsmigration_2.1.2.v20170807-1324.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.buildship.ui_2.1.2.v20170807-1324.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.cdt.core.native_5.10.0.201709131603.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.cdt.core.win32_5.4.1.201709131603.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.cdt.core.win32.x86_64_5.4.1.201709131603/ -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.cft.server.branding.core_1.0.2.v201709130027.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.cft.server.branding.ui_1.0.2.v201709130027.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.cft.server.core_1.2.3.v201709130027.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.cft.server.rse_1.0.1.v201709130027.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.cft.server.standalone.core_1.0.4.v201709130027.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.cft.server.standalone.ui_1.0.4.v201709130027.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.cft.server.ui_1.0.110.v201709130027.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.cft.server.verify.ui_1.0.1.v201709130027.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.compare_3.7.101.v20170724-1603.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.compare.core_3.6.100.v20170516-0820.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.compare.win32_1.2.0.v20170517-0839.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.core.commands_3.9.0.v20170530-1048.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.core.contenttype_3.6.0.v20170207-1037.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.core.databinding_1.6.100.v20170515-1119.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.core.databinding.beans_1.4.0.v20170210-0856.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.core.databinding.observable_1.6.100.v20170515-1119.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.core.databinding.property_1.6.100.v20170515-1119.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.core.expressions_3.6.0.v20170207-1037.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.core.externaltools_1.1.0.v20170113-2056.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.core.filebuffers_3.6.100.v20170203-1130.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.core.filesystem_1.7.0.v20170406-1337.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.core.filesystem.win32.x86_64_1.4.0.v20140124-1940.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.core.jobs_3.9.1.v20170714-0547.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.core.net_1.3.100.v20170516-0820.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.core.net.win32.x86_64_1.1.0.v20160323-1650.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.core.resources_3.12.0.v20170417-1558.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.core.resources.win32.x86_64_3.5.100.v20170516-0925.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.core.runtime_3.13.0.v20170207-1030.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.core.variables_3.4.0.v20170113-2056.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.common.doc.user_1.7.0.20090521092446.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity_1.14.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.apache.derby_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.apache.derby.dbdefinition_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.apache.derby.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.console.profile_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.db.generic_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.db.generic.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.dbdefinition.genericJDBC_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.doc.user_1.7.0.20090521092446.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.doc.user.contexts_1.7.0.20090521092446.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.oda_3.6.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.oda.consumer_3.4.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.oda.design_3.5.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.oda.design.ui_3.4.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.oda.flatfile_3.3.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.oda.flatfile.ui_3.3.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.oda.profile_3.4.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.oda.template.ui_3.4.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.sqm.core_1.4.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.sqm.core.ui_1.4.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.sqm.server.ui_1.3.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.ui_1.4.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.connectivity.ui.dse_1.3.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.doc.user_1.7.0.20090521092446.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.finfo_1.7.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.hsqldb_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.hsqldb.dbdefinition_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.hsqldb.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.ibm_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.ibm.db2_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.ibm.db2.iseries_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.ibm.db2.iseries.dbdefinition_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.ibm.db2.iseries.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.ibm.db2.luw_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.ibm.db2.luw.dbdefinition_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.ibm.db2.luw.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.ibm.db2.zseries_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.ibm.db2.zseries.dbdefinition_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.ibm.db2.zseries.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.ibm.informix_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.ibm.informix.dbdefinition_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.ibm.informix.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.ibm.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.ingres_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.ingres.dbdefinition_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.ingres.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.jdt.classpath_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.msft.sqlserver_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.msft.sqlserver.dbdefinition_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.msft.sqlserver.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.mysql_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.mysql.dbdefinition_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.mysql.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.oda.ws_1.4.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.oda.ws.ui_1.4.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.oda.xml_1.4.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.oda.xml.ui_1.4.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.oracle_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.oracle.dbdefinition_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.oracle.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.postgresql_1.3.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.postgresql.dbdefinition_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.postgresql.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.sap.maxdb_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.sap.maxdb.dbdefinition_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.sap.maxdb.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.sqlite_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.sqlite.dbdefinition_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.sqlite.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.sybase_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.sybase.asa_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.sybase.asa.dbdefinition_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.sybase.asa.models_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.sybase.asa.schemaobjecteditor.examples_2.7.0.200810071.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.sybase.asa.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.sybase.ase_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.sybase.ase.dbdefinition_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.sybase.ase.models_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.sybase.ase.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.sybase.models_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.enablement.sybase.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.help_1.7.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.intro_1.7.0.v201005281800.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.modelbase.dbdefinition_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.modelbase.derby_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.modelbase.sql_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.modelbase.sql.edit_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.modelbase.sql.query_1.3.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.modelbase.sql.query.edit_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.modelbase.sql.xml.query_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.oda.cshelp_1.3.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.common.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.data.core_1.4.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.data.ui_1.4.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.db.derby_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.db.derby.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.db.generic_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.db.generic.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.ddlgen.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.debugger.core_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.debugger.core.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.doc.user_1.7.0.20090521092446.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.doc.user.contexts_1.7.0.20090521092446.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.editor.core_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.editor.core.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.parsers.sql_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.parsers.sql.lexer_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.parsers.sql.query_1.4.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.parsers.sql.xml.query_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.plan_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.result_1.3.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.result.ui_1.3.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.routineeditor_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.routineeditor.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.schemaobjecteditor_1.3.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.schemaobjecteditor.ui_1.3.0.200810071.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.schemaobjecteditor.ui.pages_1.3.0.200810071.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.sql_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.sql.ui_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.sqlbuilder_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.sqleditor_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.sqlscrapbook_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.datatools.sqltools.tabledataeditor_1.2.0.201701131441.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.debug.core_3.11.0.v20170605-1534.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.debug.ui_3.12.0.v20170605-1534.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.draw2d_3.10.100.201606061308.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.dstore.core_3.4.0.201501311530.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.dstore.extra_2.1.400.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.core.commands_0.12.100.v20170513-0428.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.core.contexts_1.6.0.v20170322-1144.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.core.di_1.6.100.v20170421-1418.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.core.di.annotations_1.6.0.v20170119-2002.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.core.di.extensions_0.15.0.v20170228-1728.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.core.di.extensions.supplier_0.15.0.v20170407-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.core.services_2.1.0.v20170407-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.emf.xpath_0.2.0.v20160630-0728.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.ui.bindings_0.12.1.v20170823-1632.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.ui.css.core_0.12.101.v20170712-1547.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.ui.css.swt_0.13.1.v20170808-1940.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.ui.css.swt.theme_0.11.0.v20170312-2302.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.ui.di_1.2.100.v20170414-1137.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.ui.dialogs_1.1.100.v20170104-1425.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.ui.model.workbench_2.0.1.v20170713-1800.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.ui.services_1.3.0.v20170307-2032.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.ui.widgets_1.2.0.v20160630-0736.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.ui.workbench_1.5.1.v20170815-1446.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.ui.workbench.addons.swt_1.3.1.v20170319-1442.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.ui.workbench.renderers.swt_0.14.101.v20170713-1343.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.ui.workbench.swt_0.14.101.v20170710-1119.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.e4.ui.workbench3_0.14.0.v20160630-0740.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ecf_3.8.0.v20170104-0657.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ecf.filetransfer_5.0.0.v20160817-1024.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ecf.identity_3.8.0.v20161203-2153.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ecf.provider.filetransfer_3.2.300.v20161203-1840.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ecf.provider.filetransfer.httpclient4_1.1.200.v20170314-0133.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ecf.provider.filetransfer.httpclient4.ssl_1.1.0.v20160817-1024.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ecf.provider.filetransfer.ssl_1.0.0.v20160817-1024.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ecf.ssl_1.2.0.v20160817-1024.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.eclemma.core_3.0.0.201706140232.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.eclemma.doc_3.0.0.201706140232.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.eclemma.ui_3.0.0.201706140232.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.egit_4.8.0.201706111038-r.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.egit.core_4.8.0.201706111038-r.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.egit.doc_4.8.0.201706111038-r.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.egit.mylyn.ui_4.8.0.201706111038-r.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.egit.ui_4.8.0.201706111038-r.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf_2.6.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.ant_2.8.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.codegen_2.12.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.codegen.ecore_2.13.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.codegen.ecore.ui_2.13.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.codegen.ui_2.6.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.common_2.13.0.v20170609-0707.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.common.ui_2.12.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.converter_2.8.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.databinding_1.3.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.databinding.edit_1.3.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.ecore_2.13.0.v20170609-0707.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.ecore.change_2.11.0.v20170609-0707.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.ecore.change.edit_2.6.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.ecore.edit_2.9.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.ecore.editor_2.13.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.ecore.xmi_2.13.0.v20170609-0707.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.edit_2.12.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.edit.ui_2.13.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.exporter_2.7.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.importer_2.9.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.importer.ecore_2.8.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.importer.java_2.8.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.importer.rose_2.8.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.mapping_2.9.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.mapping.ecore_2.6.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.mapping.ecore.editor_2.6.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.mapping.ecore2ecore_2.9.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.mapping.ecore2ecore.editor_2.7.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.mapping.ecore2xml_2.9.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.mapping.ecore2xml.ui_2.8.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.emf.mapping.ui_2.7.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.epp.logging.aeri.core_2.0.6.v20170906-1226.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.epp.logging.aeri.ide_2.0.6.v20170906-1226.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.epp.mpc.core_1.6.1.v20170817-1804.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.epp.mpc.core.win32_1.6.1.v20170817-1804.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.epp.mpc.help.ui_1.6.1.v20170817-1804.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.epp.mpc.ui_1.6.1.v20170906-1438.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.epp.package.common_4.7.1.20170914-1200/ -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.epp.package.jee_4.7.1.20170914-1200/ -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.app_1.3.400.v20150715-1528.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.bidi_1.1.0.v20160728-1031.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.common_3.9.0.v20170207-1454.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.concurrent_1.1.0.v20130327-1442.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.console_1.1.300.v20170512-2111.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.ds_1.5.0.v20170307-1429.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.event_1.4.0.v20170105-1446.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.frameworkadmin_2.0.300.v20160504-1450.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.frameworkadmin.equinox_1.0.800.v20170524-1345.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.http.jetty_3.4.0.v20170503-2025.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.http.registry_1.1.400.v20150715-1528.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.http.servlet_1.4.0.v20170524-1452.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.jsp.jasper_1.0.500.v20150119-1358.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.jsp.jasper.registry_1.0.300.v20130327-1442.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.500.v20170531-1133/ -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.artifact.repository_1.1.600.v20170906-1259.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.console_1.0.600.v20170511-1106.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.core_2.4.101.v20170906-1259.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.director_2.3.300.v20160504-1450.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.director.app_1.0.500.v20160419-0834.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.directorywatcher_1.1.100.v20150423-1455.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.discovery_1.0.400.v20160504-1450.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.discovery.compatibility_1.0.201.v20170906-1259.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.engine_2.5.0.v20170319-2002.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.extensionlocation_1.2.300.v20160419-0834.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.garbagecollector_1.0.300.v20160504-1450.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.jarprocessor_1.0.500.v20160504-1450.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.metadata_2.3.200.v20170511-1106.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.metadata.repository_1.2.401.v20170906-1259.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.operations_2.4.300.v20170511-1106.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.publisher_1.4.200.v20170511-1216.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.publisher.eclipse_1.2.201.v20170906-1259.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.reconciler.dropins_1.1.400.v20160504-1450.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.repository_2.3.301.v20170906-1259.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.repository.tools_2.1.400.v20170511-1216.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.touchpoint.eclipse_2.1.501.v20170906-1259.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.touchpoint.natives_1.2.200.v20170511-1216.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.transport.ecf_1.1.300.v20161004-0244.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.ui_2.5.1.v20170906-1259.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.ui.discovery_1.0.300.v20170418-0708.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.ui.importexport_1.1.301.v20170816-1007.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.ui.sdk_1.0.500.v20170511-1216.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler_1.3.100.v20170418-0708.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.updatechecker_1.1.400.v20170106-2125.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.p2.updatesite_1.0.601.v20170906-1259.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.preferences_3.7.0.v20170126-2132.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.registry_3.7.0.v20170222-1344.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.security_1.2.300.v20170505-1235.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.security.ui_1.1.400.v20170505-1235.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.security.win32.x86_64_1.0.100.v20130327-1442.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.simpleconfigurator_1.2.0.v20170110-1705.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.simpleconfigurator.manipulator_2.0.300.v20170515-0721.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.equinox.util_1.0.500.v20130404-1337.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.gef_3.11.0.201606061308.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.help_3.8.1.v20170815-1448.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.help.base_4.2.101.v20170906-1700.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.help.ui_4.1.0.v20170311-0931.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.help.webapp_3.9.1.v20170816-0843.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jdt_3.13.1.v20170906-1700.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jdt.annotation_2.1.100.v20170511-1408.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jdt.annotation_1.1.100.v20160418-1457.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jdt.apt.core_3.5.0.v20170411-0710.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jdt.apt.pluggable.core_1.2.0.v20170322-1054.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jdt.apt.ui_3.5.0.v20170505-1107.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jdt.compiler.apt_1.3.0.v20170502-0408.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jdt.compiler.tool_1.2.0.v20170502-0408.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jdt.core_3.13.0.v20170516-1929.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jdt.core.manipulation_1.9.0.v20161219-2145.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jdt.debug_3.11.0.v20170510-1451/ -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jdt.debug.ui_3.8.1.v20170826-0709.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jdt.doc.user_3.13.0.v20170608-0925.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jdt.junit_3.10.0.v20170208-1347.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jdt.junit.core_3.9.0.v20170316-1142.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jdt.junit.runtime_3.4.600.v20160505-0715.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jdt.junit4.runtime_1.1.600.v20160505-0715.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jdt.launching_3.9.0.v20170419-1235.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jdt.ui_3.13.1.v20170822-1011.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jem_2.0.600.v201302011850.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jem.beaninfo_2.0.300.v201302011850.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jem.beaninfo.vm_2.0.300.v201302011850.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jem.beaninfo.vm.common_2.0.300.v201302011850.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jem.proxy_2.0.500.v201504161518.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jem.util_2.1.201.v201707201954.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jem.workbench_2.0.400.v201302011850.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jetty.continuation_9.4.5.v20170502.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jetty.http_9.4.5.v20170502.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jetty.io_9.4.5.v20170502.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jetty.security_9.4.5.v20170502.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jetty.server_9.4.5.v20170502.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jetty.servlet_9.4.5.v20170502.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jetty.util_9.4.5.v20170502.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jetty.webapp_9.4.5.v20170502.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jetty.xml_9.4.5.v20170502.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jface_3.13.1.v20170810-0135.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jface.databinding_1.8.100.v20170503-1507.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jface.text_3.12.0.v20170523-1043.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jgit_4.8.0.201706111038-r.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jgit.archive_4.8.0.201706111038-r.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.common.branding_1.4.0.v201309202144.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.common.core_1.5.0.v201603181811.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.common.eclipselink.branding_1.3.100.v201309202144.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.common.eclipselink.core_1.3.200.v201603180253.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.common.ui_1.4.200.v201705180510.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.common.utility_2.4.0.v201603181811.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.dbws.eclipselink.branding_1.2.100.v201309202144.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.dbws.eclipselink.core.gen_1.1.200.v201603180253.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.dbws.eclipselink.ui_1.1.200.v201603180253.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.doc.user_3.2.100.v201308231650.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.jaxb.branding_1.4.0.v201309202144.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.jaxb.core_1.4.100.v201603180253.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.jaxb.core.schemagen_1.1.200.v201603180253.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.jaxb.eclipselink.branding_1.4.100.v201309202144.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.jaxb.eclipselink.core_1.3.200.v201603180253.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.jaxb.eclipselink.core.schemagen_1.2.200.v201603180253.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.jaxb.eclipselink.ui_1.4.200.v201603180253.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.jaxb.ui_1.5.100.v201603180253.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.jpa.annotate_1.0.100.v201309261652.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.jpa.branding_3.4.0.v201309202144.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.jpa.core_3.5.0.v201603181811.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.jpa.db_2.2.200.v201603180253.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.jpa.db.ui_2.1.200.v201603180253.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.jpa.eclipselink.branding_3.4.0.v201309202144.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.jpa.eclipselink.core_2.4.100.v201603180253.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.jpa.eclipselink.core.ddlgen_2.2.200.v201603180253.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.jpa.eclipselink.ui_2.4.100.v201603180253.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.jpa.gen_2.3.200.v201512212242.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jpt.jpa.ui_3.4.200.v201705180510.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jsch.core_1.3.0.v20160422-1917.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jsch.ui_1.3.0.v20160323-1650.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jsf.branding_3.5.0.v201309172308.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.json_1.0.100.v201612232120.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.common.annotations.controller_1.1.300.v201302011850.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.common.annotations.core_1.1.300.v201302011850.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.common.annotations.ui_1.1.300.v201302011850.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.common.frameworks_1.1.701.v201509021802.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.common.project.facet.core_1.4.500.v201508121553.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.common.project.facet.ui_1.4.510.v201501141810.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.common.ui_1.0.301.v201707201954.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ejb.doc.user_1.1.301.v201105130955.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ejb.ui_1.1.910.v201701262130.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ejb.ui.infopop_1.0.300.v201002231012.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.j2ee_1.2.100.v201706292127.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.j2ee.core_1.3.300.v201706300342.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.j2ee.doc.user_1.1.400.v201008122207.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.j2ee.ejb_1.1.900.v201701262105.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.j2ee.ejb.annotation.model_1.1.400.v201701262105.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.j2ee.ejb.annotations.emitter_1.1.300.v201701262105.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.j2ee.ejb.annotations.ui_1.1.300.v201701262105.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet_1.2.300.v201701262105.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.j2ee.infopop_1.0.300.v201309091923.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.j2ee.jca_1.1.900.v201701262104.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.j2ee.jca.ui_1.1.600.v201701262104.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.j2ee.navigator.ui_1.1.700.v201701262104.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.j2ee.ui_1.1.920.v201707202055.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.j2ee.web_1.1.900.v201701262104.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.j2ee.webservice_1.1.500.v201701262104.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.j2ee.webservice.ui_1.1.600.v201701262104.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.j2ee.xdoclet.runtime_1.1.300.v201004280609.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.jee_1.0.900.v201706300342.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.jee.ejb_1.0.500.v201701262105.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.jee.ui_1.0.800.v201701262104.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.jee.web_1.0.600.v201701262104.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport_1.4.0.v201309172102.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.jsf.common_1.5.101.v201504022146.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.jsf.common.runtime_1.4.0.v201309172102.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.jsf.common.ui_1.5.100.v201701270025.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.jsf.core_1.8.0.v201704192341.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.jsf.doc.user_1.5.0.v201309172352.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.jsf.facelet.core_1.4.0.v201704192341.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.jsf.facelet.ui_1.3.110.v201603071844.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.jsf.facesconfig_1.5.100.v201701270025.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.jsf.facesconfig.ui_1.5.0.v201309172102.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.jsf.standard.tagsupport_1.5.0.v201309172102.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.jsf.ui_1.6.100.v201701270025.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.jsp.core_1.2.1001.v201707050024.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.jsp.ui_1.1.1200.v201702270522.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.jsp.ui.infopop_1.0.200.v201707252002.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.pagedesigner_1.8.0.v201704192341.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.pagedesigner.jsf.ui_1.5.0.v201309172102.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.pagedesigner.jsp.core_1.5.100.v201603071844.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.server.core_1.2.500.v201603031514.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.server.generic.core_1.0.900.v201606081655.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.server.generic.jonas_1.5.500.v201405151744.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.server.generic.ui_1.0.600.v201707132334.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.server.preview.adapter_1.1.300.v201606081655.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.server.tomcat.core_1.1.900.v201705172117.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.server.tomcat.ui_1.1.600.v201609072248.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.server.ui_1.1.300.v201309182039.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.server.ui.doc.user_1.0.600.v201309182117.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.server.ui.infopop_1.0.500.v201309182117.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.servlet.ui_1.1.910.v201701262104.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.servlet.ui.infopop_1.0.500.v201105121947.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.standard.schemas_1.2.201.v201501151629.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws_1.0.800.v201701262139.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.annotations.core_1.2.200.v201311102023.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.axis.consumption.core_1.0.550.v201505131719.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.axis.consumption.ui_1.0.900.v201701262139.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.axis.creation.ui_1.0.900.v201701262139.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.axis.infopop_1.0.400.v201309242123.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.axis.ui.doc.user_1.1.200.v201309242123.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.axis2.consumption.core_1.0.200.v201309242118.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.axis2.consumption.ui_1.0.200.v201309242118.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.axis2.core_1.0.300.v201309242118.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.axis2.creation.core_1.0.200.v201309242118.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.axis2.creation.ui_1.0.200.v201309242118.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.axis2.ui_1.0.400.v201309242118.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.axis2.ui.doc.user_1.0.200.v201309242118.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.consumption_1.0.950.v201701262139.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.consumption.infopop_1.0.400.v201309242123.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.consumption.ui_1.1.850.v201701262139.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.consumption.ui.doc.user_1.0.700.v201309242123.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.creation.ejb.ui_1.0.250.v201309242123.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.creation.ui_1.0.950.v201701262139.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.cxf.consumption.core_1.0.400.v201701262158.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.cxf.consumption.ui_1.0.400.v201701262158.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.cxf.core_1.1.300.v201701262158.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.cxf.creation.core_1.0.500.v201701262158.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.cxf.creation.ui_1.0.300.v201403242125.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.cxf.doc.user_1.0.300.v201309232209.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.cxf.ui_1.0.300.v201309232152.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.doc.user_1.0.700.v201612121628.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.infopop_1.0.400.v201309242123.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.jaxb.core_1.0.200.v201309232152.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.jaxrs.core_1.0.700.v201701262139.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.jaxrs.ui_1.0.700.v201505131719.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.jaxws.core_1.0.500.v201701262158.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.jaxws.doc.user_1.0.400.v201309232209.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.jaxws.dom.integration_1.0.300.v201308151836.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.jaxws.dom.runtime_1.0.300.v201308151836.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.jaxws.dom.ui_1.0.100.v201308151836.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.jaxws.ui_1.0.401.v201504291921.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.jaxws.utils_1.0.301.v201504272154.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.uddiregistry_1.0.600.v201505131719.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.jst.ws.ui_1.0.600.v201701262139.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ltk.core.refactoring_3.8.0.v20170105-1156.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ltk.ui.refactoring_3.9.0.v20170412-0825.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.archetype.common_1.8.1.20170728-1531/ -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.core_1.8.1.20170728-1531.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.core.ui_1.8.1.20170728-1531.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.discovery_1.8.1.20170728-1531.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.editor_1.8.1.20170728-1531.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.editor.xml_1.8.1.20170728-1531.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.importer_1.8.1.20170728-1531.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.jdt_1.8.1.20170728-1531.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.jdt.ui_1.8.1.20170728-1531.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.launching_1.8.1.20170728-1531.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.lifecyclemapping.defaults_1.8.1.20170728-1531.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.logback.appender_1.8.1.20170728-1531.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.logback.configuration_1.8.1.20170728-1531.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.maven.indexer_1.8.1.20170728-1531/ -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.maven.runtime_1.8.1.20170728-1531/ -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.8.1.20170728-1531/ -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.model.edit_1.8.1.20170728-1531.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.profiles.core_1.8.1.20170728-1531.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.profiles.ui_1.8.1.20170728-1531.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.refactoring_1.8.1.20170728-1531.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.scm_1.8.1.20170728-1531.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.workspace.cli_0.3.1.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.wtp_1.3.3.20170823-1905.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.wtp.jaxrs_1.3.3.20170823-1905.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.wtp.jpa_1.3.3.20170823-1905.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.wtp.jsf_1.3.3.20170823-1905.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.wtp.overlay_1.3.3.20170823-1905.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.m2e.wtp.overlay.ui_1.3.3.20170823-1905.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.bugzilla.core_3.23.1.v20170623-0008.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.bugzilla.ide_3.23.0.v20170411-2108.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.bugzilla.ui_3.23.1.v20170623-0008.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.commons.core_3.23.0.v20170411-1844.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.commons.identity.core_1.15.0.v20170411-1844.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.commons.net_3.23.0.v20170411-1844.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.commons.notifications.core_1.15.0.v20170411-1844.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.commons.notifications.feed_1.15.0.v20170411-1844.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.commons.notifications.ui_1.15.0.v20170411-1844.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.commons.repositories.core_1.15.0.v20170411-1844.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.commons.repositories.ui_1.15.0.v20170411-1844.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.commons.screenshots_3.23.0.v20170411-1844.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.commons.ui_3.23.0.v20170411-1844.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.commons.workbench_3.23.0.v20170503-0014.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.commons.xmlrpc_3.23.0.v20170411-1844.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.context.core_3.23.0.v20170411-2108.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.context.tasks.ui_3.23.0.v20170411-2108.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.context.ui_3.23.0.v20170414-0629.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.debug.ui_3.23.0.v20170411-2108.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.discovery.core_3.23.0.v20170411-1844.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.discovery.ui_3.23.0.v20170411-1844.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.help.ui_3.23.1.v20170623-0008.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.ide.ant_3.23.0.v20170411-2108.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.ide.ui_3.23.0.v20170411-2108.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.java.tasks_3.23.0.v20170411-2108.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.java.ui_3.23.0.v20170411-2108.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.monitor.core_3.23.0.v20170411-1844.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.monitor.ui_3.23.0.v20170411-1844.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.resources.ui_3.23.0.v20170411-2108.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.tasks.bugs_3.23.1.v20170623-0008.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.tasks.core_3.23.1.v20170623-0008.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.tasks.index.core_3.23.1.v20170623-0008.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.tasks.index.ui_3.23.1.v20170623-0008.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.tasks.search_3.23.1.v20170623-0008.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.tasks.ui_3.23.1.v20170623-0008.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.team.ui_3.23.0.v20170411-2108.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext_3.0.6.20170311142502.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.ant_3.0.6.20170311142502.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.asciidoc_3.0.6.20170311142502.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.asciidoc.ui_3.0.6.201703111926.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.confluence_3.0.6.20170311142502.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.confluence.ui_3.0.6.201703111926.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.context.ui_3.0.6.201703111926.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.help.ui_3.0.6.201703111926.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.html_3.0.6.20170311142502.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.markdown_3.0.6.20170311142502.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.markdown.ui_3.0.6.201703111926.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.mediawiki_3.0.6.20170311142502.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.mediawiki.ui_3.0.6.201703111926.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.osgi_3.0.6.201703111926.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.tasks.ui_3.0.6.201703111926.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.textile_3.0.6.20170311142502.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.textile.ui_3.0.6.201703111926.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.tracwiki_3.0.6.20170311142502.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.tracwiki.ui_3.0.6.201703111926.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.twiki_3.0.6.20170311142502.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.twiki.ui_3.0.6.201703111926.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.mylyn.wikitext.ui_3.0.6.201703111926.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.nebula.widgets.tablecombo_1.0.0.201707111605.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.base_1.8.0.v20170318-0624.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.base.edit_1.8.0.v20170318-0624.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.extractor.lib_1.3.0.v20161116-0647.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.jreinfo_1.8.0.v20170318-0624.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.jreinfo.ui_1.8.0.v20170327-1117.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.jreinfo.win32.x86_64_1.2.0.v20160426-0508.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.p2_1.8.0.v20170318-0419.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.p2.core_1.8.0.v20170410-0909.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.p2.doc_1.8.0.v20170318-0419.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.p2.edit_1.8.0.v20170318-0419.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.p2.ui_1.8.0.v20170327-1117.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.predicates_1.8.0.v20170327-1117.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.predicates.edit_1.8.0.v20170318-0419.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.preferences_1.8.0.v20170318-0419.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.resources_1.8.0.v20170318-0419.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.resources.edit_1.8.0.v20170318-0419.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.setup_1.8.0.v20170408-0745.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.setup.core_1.8.0.v20170531-0903.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.setup.doc_1.9.0.v20170706-0615.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.setup.edit_1.8.0.v20170318-0419.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.setup.editor_1.8.0.v20170327-1117.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.setup.p2_1.8.0.v20170318-0419.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.setup.p2.edit_1.8.0.v20170318-0419.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.setup.sync_1.8.0.v20170530-1735.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.setup.ui_1.8.0.v20170530-1735.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.setup.ui.questionnaire_1.8.0.v20170318-0419.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.ui_1.8.0.v20170327-1117.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.util_1.8.0.v20170706-0534.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.workingsets_1.8.0.v20170318-0419.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.workingsets.edit_1.8.0.v20170318-0419.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.oomph.workingsets.editor_1.8.0.v20170327-1117.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.osgi_3.12.1.v20170821-1548.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.osgi.compatibility.state_1.1.0.v20170516-1513.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.osgi.services_3.6.0.v20170228-1906.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.osgi.util_3.4.0.v20170111-1608.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde_3.13.1.v20170906-1700.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde.api.tools_1.1.101.v20170714-0724.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde.api.tools.annotations_1.1.0.v20170118-0848.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde.api.tools.ui_1.1.101.v20170810-1621.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde.build_3.9.300.v20170515-0912/ -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde.core_3.11.100.v20170517-0724.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde.doc.user_3.13.1.v20170830-1120.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde.ds.annotations_1.1.0.v20170516-2121.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde.ds.core_1.1.100.v20170515-0910.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde.ds.lib_1.1.0.v20170303-1624/ -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde.ds.ui_1.1.100.v20170515-0910.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde.ds1_2.lib_1.0.0.v20170303-1624/ -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde.genericeditor.extension_1.0.0.v20170315-0955.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde.junit.runtime_3.5.0.v20151013-0625.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde.launching_3.7.0.v20170322-1119.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde.runtime_3.6.0.v20170413-1620.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde.ua.core_1.1.0.v20170201-2036.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde.ua.ui_1.1.100.v20170515-0910.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde.ui_3.10.1.v20170804-0814.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.pde.ui.templates_3.6.100.v20170515-0910.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.persistence.antlr_3.2.0.v201302191141.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.persistence.asm_5.0.1.v201405080102.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.persistence.core_2.6.0.v20140809-296a69f.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.persistence.dbws_2.6.0.v20140809-296a69f.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.persistence.dbws.builder_2.6.0.v20140809-296a69f.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.persistence.jpa_2.6.0.v20140809-296a69f.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.persistence.jpa.jpql_2.6.0.v20140809-296a69f.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.persistence.moxy_2.6.0.v20130815-a4708b6.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.platform_4.7.1.v20170906-1700/ -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.platform.doc.user_4.7.1.v20170630-0820.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rcp_4.7.1.v20170906-1700.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.apidocs_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.apidocs.rcp_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.calls_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.calls.rcp_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.chain.rcp_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.completion.rcp_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.constructors_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.constructors.rcp_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.coordinates_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.coordinates.rcp_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.injection_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.jayes_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.jayes.io_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.jdt_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.models_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.models.rcp_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.mylyn.rcp_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.net_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.overrides_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.overrides.rcp_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.rcp_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.subwords.rcp_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.types.rcp_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.utils_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.recommenders.utils.rcp_2.4.10.v20170911-1410.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse_3.5.0.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.connectorservice.dstore_3.1.301.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.connectorservice.local_2.1.400.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.connectorservice.ssh_2.1.300.201505220524.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.connectorservice.telnet_1.2.300.201505220524.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.core_3.3.100.201603151753.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.doc.user_3.4.100.201403101646.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.dstore.security_3.0.400.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.efs_2.1.401.201507172212.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.efs.ui_2.1.400.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.files.ui_3.2.200.201507172213.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.importexport_1.2.300.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.processes.ui_3.0.400.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.services_3.3.0.201506120731.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.services.dstore_3.3.0.201406041609.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.services.files.ftp_3.0.500.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.services.local_2.2.1.201507180454.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.services.ssh_3.2.100.201403281521.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.services.telnet_2.0.400.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.shells.ui_3.0.500.201403271554.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.subsystems.files.core_3.3.1.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.subsystems.files.dstore_2.1.300.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.subsystems.files.ftp_2.2.100.201601281414.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.subsystems.files.local_2.1.300.201403251512.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.subsystems.files.ssh_2.1.300.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.subsystems.processes.core_3.1.300.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.subsystems.processes.dstore_2.1.400.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.subsystems.processes.local_2.1.400.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.subsystems.processes.shell.linux_1.1.400.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.subsystems.shells.core_3.1.300.201403271554.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.subsystems.shells.dstore_2.1.400.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.subsystems.shells.local_2.1.400.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.subsystems.shells.ssh_2.1.400.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.subsystems.shells.telnet_1.2.300.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.ui_3.3.400.201704241037.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.rse.useractions_1.1.500.201403100950.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.search_3.11.100.v20170515-1603.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.swt_3.106.1.v20170829-0553.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.swt.win32.win32.x86_64_3.106.1.v20170829-0553.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.team.core_3.8.100.v20170516-0820.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.team.genericeditor.diff.extension_1.0.1.v20170809-1356.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.team.ui_3.8.1.v20170515-1133.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.text_3.6.100.v20170203-0814.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.tm.terminal.connector.local_4.2.0.201609191434.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.tm.terminal.connector.process_4.2.0.201609191434.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.tm.terminal.connector.ssh_4.2.0.201609191434.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.tm.terminal.connector.telnet_4.2.0.201609191434.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.tm.terminal.control_4.3.0.201706130821.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.tm.terminal.view.core_4.2.0.201609191434.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.tm.terminal.view.ui_4.3.0.201706130844.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.tools.layout.spy_1.0.0.v20170428-1608.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui_3.109.0.v20170411-1742.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.browser_3.6.100.v20170418-1342.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.cheatsheets_3.5.100.v20170515-0748.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.console_3.7.1.v20170728-0806.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.editors_3.11.0.v20170202-1823.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.externaltools_3.4.0.v20161212-0515.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.forms_3.7.101.v20170815-1446.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.genericeditor_1.0.1.v20170822-2211.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.ide_3.13.1.v20170822-1526.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.ide.application_1.2.0.v20170512-1452.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.intro_3.5.100.v20170418-0710.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.intro.quicklinks_1.0.100.v20170515-0756.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.intro.universal_3.3.100.v20170515-1335.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.monitoring_1.1.100.v20170131-1736.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.navigator_3.7.0.v20170418-1342.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.navigator.resources_3.6.1.v20170823-1443.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.net_1.3.100.v20170516-0820.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.themes_1.2.1.v20170809-1435/ -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.trace_1.1.0.v20170201-2036.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.views_3.9.0.v20170226-1833.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.views.log_1.2.100.v20170515-1458.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.views.properties.tabbed_3.8.1.v20170713-0803.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.win32_3.3.0.v20160505-1310.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.workbench_3.110.1.v20170704-1208.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.ui.workbench.texteditor_3.10.100.v20170426-2021.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.update.configurator_3.3.400.v20160506-0750.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.userstorage_1.1.0.v20170328-0205.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.userstorage.oauth_1.0.0.v20170526-1605.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.userstorage.ui_1.0.2.v20170526-1605.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.command.env_1.0.500.v201505131719.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.command.env.core_1.0.300.v201505131719.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.command.env.doc.user_1.5.400.v201309242123.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.command.env.infopop_1.0.200.v201309242123.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.command.env.ui_1.1.200.v201503231435.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.common.core_1.2.0.v200908251833.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.common.emf_1.2.500.v201701191735.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.common.emfworkbench.integration_1.2.101.v201107081800.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.common.environment_1.0.400.v200912181831.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.common.frameworks_1.2.201.v201707201954.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.common.frameworks.ui_1.2.400.v201504292002.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.common.infopop_1.0.300.v201309101952.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.common.modulecore_1.3.0.v201705041406.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.common.modulecore.ui_1.0.301.v201707201954.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.common.project.facet.core_1.4.300.v201111030423.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.common.project.facet.ui_1.4.601.v201707201954.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.common.snippets_1.2.300.v201705162046.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.common.ui_1.1.500.v200911182011.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.common.uriresolver_1.2.300.v201702270556.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.css.core_1.1.1000.v201704250120.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.css.ui_1.0.1100.v201704250105.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.doc.user_1.2.0.v201707252002.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.dtd.core_1.1.700.v201211012112.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.dtd.ui_1.0.801.v201308100602.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.dtd.ui.infopop_1.0.400.v201707252002.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.dtdeditor.doc.user_1.0.700.v201208081537.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.html.core_1.2.101.v201707042220.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.html.ui_1.0.1200.v201608060428.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.html.ui.infopop_1.0.201.v201707252002.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.internet.cache_1.0.800.v201702270716.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.internet.monitor.core_1.0.600.v201309182039.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.internet.monitor.ui_1.0.700.v201309182039.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.chromium_0.5.200.v201610211901.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.chromium.debug_0.4.0.v201605131737.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.chromium.debug.core_0.5.300.v201705091354.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.chromium.debug.js_0.1.200.v201610211901.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.chromium.debug.jsdtbridge_0.5.200.v201610211901.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.chromium.debug.ui_0.6.200.v201701261810.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.chromium.wip.eclipse_0.5.200.v201610212001.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.chromium.wipbackend.dev_0.5.200.v201610212001.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.chromium.wipbackend.protocol_1_0_0.5.200.v201610212001.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.core_2.0.300.v201703171536.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.debug.core_3.2.200.v201610211901.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.debug.crossfire_1.0.500.v201505071819.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.debug.rhino_1.0.500.v201605251607.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.debug.rhino.debugger_1.0.600.v201604292217.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.debug.rhino.ui_1.0.500.v201604292217.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.debug.transport_1.0.300.v201502261613.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.debug.ui_1.0.600.v201605311817.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.doc_2.0.200.v201610220243.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.js.bower_1.0.200.v201610220243.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.js.cli_1.0.0.v201605192332.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.js.common_1.0.200.v201610211901.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.js.grunt_1.0.200.v201610211901.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.js.gulp_1.0.200.v201610211901.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.js.node_1.1.100.v201705091354.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.js.node.common_1.0.0.v201605131737.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.js.npm_1.0.200.v201610211901.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.manipulation_1.0.601.v201602241911.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.support.firefox_1.0.501.v201602241911.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.support.ie_1.0.601.v201602241911.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.ui_2.0.300.v201704191905.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.web.core_1.0.901.v201707142218.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.web.support.jsp_1.0.600.v201307151913.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.jsdt.web.ui_1.0.801.v201602241914.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.json.bower.core_1.0.0.v201605150457.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.json.bower.ui_1.0.0.v201605201503.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.json.core_1.0.100.v201707252002.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.json.eslint.core_1.0.0.v201605150457.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.json.eslint.ui_1.0.0.v201605201503.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.json.jshint.core_1.0.0.v201605150457.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.json.jshint.ui_1.0.0.v201605201503.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.json.npm.core_1.0.0.v201605150457.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.json.npm.ui_1.0.0.v201605201503.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.json.schemaprocessor_1.0.200.v201704192002.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.json.ui_1.0.100.v201612232120.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.server.core_1.10.0.v201705172051.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.server.discovery_1.3.100.v201705102053.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.server.http.core_1.0.300.v201606081655.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.server.http.ui_1.0.400.v201309182039.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.server.preview_1.1.500.v201704201544.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.server.preview.adapter_1.1.300.v201708030026.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.server.ui_1.5.400.v201705172051.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.server.ui.doc.user_1.1.600.v201309182117.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.server.ui.infopop_1.1.200.v201309182117.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.sse.core_1.1.1001.v201707042225.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.sse.doc.user_1.1.100.v201208081537.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.sse.ui_1.3.600.v201707042340.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.sse.ui.infopop_1.0.300.v201707252002.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.standard.schemas_1.0.800.v201706011851.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.validation_1.2.701.v201707142105.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.validation.infopop_1.0.300.v201309101952.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.validation.ui_1.2.501.v201707142105.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.web_1.1.800.v201312041437.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.web.ui_1.1.601.v201602221748.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.web.ui.infopop_1.0.300.v200805140206.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.webtools.doc.user_1.0.500.v201208081537.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.ws_1.1.400.v201503231435.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.ws.explorer_1.0.900.v201612121628.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.ws.infopop_1.0.400.v201309242123.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.ws.parser_1.0.600.v201505131719.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.ws.service.policy_1.0.450.v201505131719.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.ws.service.policy.ui_1.0.500.v201505131719.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.ws.ui_1.1.300.v201503231435.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.wsdl_1.2.400.v201505131719.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.wsdl.ui_1.2.800.v201510282151.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.wsdl.ui.doc.user_1.0.850.v201309242123.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.wsdl.validation_1.1.700.v201505131719.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.wsi_1.0.600.v201505131719.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.wsi.ui_1.0.600.v201505131719.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.wsi.ui.doc.user_1.0.750.v201309242123.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xml.core_1.1.1100.v201705012045.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xml.ui_1.1.800.v201704102213.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xml.ui.infopop_1.0.400.v201707252002.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xml.xpath.core_1.3.1.v201509231858.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xml.xpath.ui_1.1.102.v201509231858.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xml.xpath2_1.1.0.v201309251557.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xml.xpath2.processor_2.1.101.v201409111854.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xml.xpath2.processor.doc.user_2.0.0.v201209212251.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xml.xpath2.wtptypes_2.0.0.v201208081543.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xmleditor.doc.user_1.0.700.v201707252002.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xsd.core_1.1.900.v201401141857.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xsd.ui_1.2.600.v201511240159.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xsdeditor.doc.user_1.0.800.v201707252002.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xsl_1.2.0.v201309251559.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xsl.core_1.1.301.v201405151730.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xsl.debug.ui_1.0.302.v201304240928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xsl.doc_1.0.100.v201309251559.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xsl.exslt.core_1.0.0.v201005240422.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xsl.exslt.ui_1.0.0.v201006012004.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xsl.jaxp.debug_1.0.300.v201304102131.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xsl.jaxp.debug.ui_1.0.200.v201103081755.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xsl.jaxp.launching_1.0.300.v201304102131.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xsl.launching_1.1.0.v201304240928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xsl.saxon_1.0.200.v201103081755.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xsl.ui_1.1.301.v201304222136.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wst.xsl.xalan_1.0.100.v201208081544.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wtp.epp.package.capabilities_1.3.0.v201005102000.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wtp.epp.package.jee.intro_1.3.0.v201006142040.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wtp.javascript.capabilities_1.0.100.v201005102000.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wtp.jee.capabilities_1.0.100.v201005102000.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wtp.web.capabilities_1.0.100.v201005102000.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.wtp.xml.capabilities_1.0.100.v201005102000.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.xsd_2.13.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.eclipse.xsd.edit_2.8.0.v20170609-0928.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.gradle.toolingapi_3.5.0.v20170801075239.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.hamcrest.core_1.3.0.v201303031735.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.jacoco.agent_0.7.9.v20170208-1730.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.jacoco.core_0.7.9.v20170208-1730.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.jacoco.report_0.7.9.v20170208-1730.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.jdom_1.1.1.v201101151400.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.jsoup_1.7.2.v201411291515.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.junit_4.12.0.v201504281640/ -file:/C:/Users/jinyu/.p2/pool/plugins/org.mozilla.javascript_1.7.5.v201504281450.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.objectweb.asm_5.2.0.v20170126-0011.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.objectweb.asm_5.0.1.v201404251740.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.objectweb.asm.commons_5.2.0.v20170126-0011.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.objectweb.asm.tree_5.2.0.v20170126-0011.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.objectweb.asm.tree_5.0.1.v201404251740.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.sat4j.core_2.3.5.v201308161310.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.sat4j.pb_2.3.5.v201404071733.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.slf4j.api_1.7.2.v20121108-1250.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.slf4j.impl.log4j12_1.7.2.v20131105-2200.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.sonatype.m2e.mavenarchiver_0.17.2.201606141937-signed-20160830073346.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.tukaani.xz_1.5.0.v20170111-1717.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.uddi4j_2.0.5.v200805270300.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.w3c.css.sac_1.3.1.v200903091627.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.w3c.dom.events_3.0.0.draft20060413_v201105210656.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.w3c.dom.smil_1.0.1.v200903091627.jar -file:/C:/Users/jinyu/.p2/pool/plugins/org.w3c.dom.svg_1.1.0.v201011041433.jar diff --git a/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml b/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml index 83e3255..690670e 100644 --- a/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml +++ b/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml @@ -1,34 +1,8 @@
-
- - - - - -
-
- - - - - - - - - -
-
- - -
-
- - -
diff --git a/.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml b/.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml deleted file mode 100644 index aef57a9..0000000 --- a/.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml +++ /dev/null @@ -1,21 +0,0 @@ - -
-
- - - - - - - - - -
-
- - - - - -
-
diff --git a/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml b/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml index 5593325..70080ea 100644 --- a/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml +++ b/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml @@ -1,5 +1,9 @@
+
+ + +
@@ -12,10 +16,23 @@
+
+
- + + + + + +
+
+ + + + +
diff --git a/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml b/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml index e0ae5d3..0148db2 100644 --- a/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml +++ b/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.wst.jsdt.core/externalLibsTimeStamps b/.metadata/.plugins/org.eclipse.wst.jsdt.core/externalLibsTimeStamps index 960f66f..af94777 100644 Binary files a/.metadata/.plugins/org.eclipse.wst.jsdt.core/externalLibsTimeStamps and b/.metadata/.plugins/org.eclipse.wst.jsdt.core/externalLibsTimeStamps differ diff --git a/.metadata/version.ini b/.metadata/version.ini index 6b6ec34..d0ebdb2 100644 --- a/.metadata/version.ini +++ b/.metadata/version.ini @@ -1,3 +1,3 @@ -#Tue Oct 10 23:09:53 CST 2017 +#Mon Aug 28 00:49:46 CST 2017 org.eclipse.core.runtime=2 -org.eclipse.platform=4.7.1.v20170906-1700 +org.eclipse.platform=4.7.0.v20170612-0950 diff --git a/.recommenders/caches/identified-project-coordinates.json b/.recommenders/caches/identified-project-coordinates.json index cf39ea6..27340ec 100644 --- a/.recommenders/caches/identified-project-coordinates.json +++ b/.recommenders/caches/identified-project-coordinates.json @@ -1 +1 @@ -[[{"location":"D:\\javapath\\jre1.8.0_144","type":"JRE","hints":{"EXECUTION_ENVIRONMENT":"JavaSE-1.8"}},"jre:jre:1.8.0"]] \ No newline at end of file +[[{"location":"D:\\javapath\\jre1.8.0_111","type":"JRE","hints":{"EXECUTION_ENVIRONMENT":"JavaSE-1.8"}},"jre:jre:1.8.0"],[{"location":"D:\\jinyu\\udt-java\\judt","type":"PROJECT","hints":{"PROJECT_NAME":"judt"}},"ABSENT"]] \ No newline at end of file diff --git a/.recommenders/caches/manual-mappings.json b/.recommenders/caches/manual-mappings.json index 09f370e..9e26dfe 100644 Binary files a/.recommenders/caches/manual-mappings.json and b/.recommenders/caches/manual-mappings.json differ diff --git a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.fdt b/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.fdt deleted file mode 100644 index ba10aeb..0000000 Binary files a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.fdt and /dev/null differ diff --git a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.fdx b/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.fdx deleted file mode 100644 index 1ba41ae..0000000 Binary files a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.fdx and /dev/null differ diff --git a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.fnm b/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.fnm deleted file mode 100644 index 98f1ed7..0000000 --- a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.fnm +++ /dev/null @@ -1,3 +0,0 @@ - -coordinate fingerprintssymbolic-names -classifierselfcovrpovrmcallovrdselfmctor \ No newline at end of file diff --git a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.frq b/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.frq deleted file mode 100644 index 6e7f714..0000000 --- a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.frq +++ /dev/null @@ -1,1109 +0,0 @@ -dͬn15}6Qy_'Ej3A8539%+Am4??9[8)E,3 !i9b57WD3 -S>-×/OM18Q;%:8"r"7 09 -8*,A* -3 ;R $* # P95 -0G<:4! Q"K.:0 4*&A B5 ("0 J"4#"51a!P,': %84,A 9D.BB06 A/0!*[#+6< M".%D%B OB!0D ')t)T-2+9`-_977(#<$ -~y "Yg$rfZJ+ q;<Q2c -4Jpe4-@f,A[N{;z:`p(zLB~J\M\|E. _?%TØj=qI|DA2Lc#J-!6Ae!NBGA G H)C(oM!0Fe);8u+a -6*+8aUga0$"!]Dqr8Z96 )i FY5[.#? )]8&5;$G-O!%*%_K"@""}0a!$O g,@] -6%n -cP!CL#&"7  #2*!")Nk( - O+Fm6,WA#c!` -BY $AK*%7;A+57skDQrw o!41@G -U%m7-:M6  2P' -6IF {] 8e>/ $M7AY7 -*@Y =)a -6*O&VW  -!?, #emy!%;2!"Q *Jl 47Yc@6). 3' {N _A9("Y>qi #A,Xk 7**U %#O &J:!:#u79e.6" `%~?5Q -gU/OY)=]Uy=#'d2+c;?M6#76p!A%A7W!+WU ^":U/0?;=; NsY+e 7* mVW8Ee!כG 9:8XPrU I#k:8;g -m/ mRl|"Ttb^v v%!)E"x3 DŽGtтa") Ð#7P.y|y+C5lY%e=7 cAO C2( "#26!ٕۛa >P? 4g -$ # -3<3:8Uh V[L3,6Rì i0A+(q˅&]a%#DZ#c7>5NUi}ўl:? -4UɞmE- ).8 -;(I8U6#NY 3890I7\ 9(0 T -Q1 - Ǧo3 4͇?%X#ӓuf/"12φ -$|`/#U%P !*C)+ ) ^!O?$ 7{8 ^NZ o 8K $y7i9 " -.c7nTwK0 n l' -X)!o"*{X!Ob9'Z!1 Oa:#7f"."C r6 F G7i  ; 3 }! 8x7A \ x8!z9Z&9s" +zE.7B[7|!9  E55!=8y#O!&7GM6V!P} $b1X?.Q#;  &à033# 6ϭ"6]g"XS;P$? 07>(/9Z+!#"ɛ[& < aRK0c!g$_"<  bHxO -\" !6!g *"CB##,`&+# "Zg \)PR!V!Y(:)&! *J. (/Ji  Y!6$(%*K:$<%E6G"0 ő + *Hg#ϖ10  ŐK  !a{g%70N%T # -mUm -*n E4%:e : $N,B'"9"ɀ )B; !'7J7<z{ k@sZ9:MFM#YK.C":,##57'!%M'<17QEa08P-? -[Tz}%8& )9:thkۃ=3" 7* *5O0!$A%G# 9( ( 9 >#.7 8#3#N ix'"9` C5"8 2 -5 -1 6% M" / O$6)881"4' #& );2 #!#(#(""#;1 &!; 3" "H 7$ #! 92 (#D#"8 5 -,#$ " #"- -6+ 0  -6"(4' -:%96 :2  7 1 M  5#" .99%0!, 6_?K]1w7AoLa8ɗYbJTn -[!hkr!X5gI}XIt(!4*{e8 \.Q 0T-0 a&3a-(V=  490(6(3)aO 0/"X,%!-!'>) 1Pb( 81 \5,"0x -7Q- 4 1V.+ !m 26E0C 0)$Y4=626 2K"#P, _\4D/66 -- \(3V8 3/9=`~  b_1)L}, W&P.O'(Q1 E:(#J4\"4 "'G"(aT1/&*) ( - +V,QW3L( E3r+%U א P]p9zLѯA ]m!!c1% #9 x }<\ W 1K=1 ("*#28 -1JM$%OBLH˯=hcVCsk#p/׆BՋXR2KI44ю1CGFǐ o$;?A9]G%3W! !R'":; : ( #3"!7.@ -T"N4Q<"a) 8' 6,f +'( "mL9 -!=WT eVXD@2!+"$Kt+#:$<=5)"+A6>EK s3zc/ ::' @  2 -  08}!j&DG) ]$pe7 M~ J#*f5\ -4D/P:?m{ mG "%,-F$?8b8-P `655: !/o|G263CDG67. 1R L.h/* 8q78 4x8b -5Db@KCAW#/>"/7) 6)@7? -#E+ ?1K 6"qQ%tU:->aӚߢ&+ -%o)AA !1@M&@>9 -%l %/$n/O@#3W;3-D.D(E(/&#E 3[:,ѫtݒP77#+x}*:G8{"S:=%G8 7 E?<6+"4% D# 87q !x%yRHJN  x 0 -HOcL!# -48"P%= -!F)' 57va%z=Վ_M.n)i; Km k(! _z8G;c"D,d!l3L -mS"&KAY}"7@nc1z(ыCS>vm2kCçAopG70DQ] ]a3:8Uq@hn "piÑ!)BO~ioSA|UAGI ncASA)veQGkA-#@EK^Q=a|xK>oCY8 A"un+{mQP w!9eb7?[7Nk LDU}!yoL?.O9pEW [k"~g+!uc+{y_37lF_E#VDQ*eTK|",0!A 2kSEWX -!IALwD9La>@SBg6 6l|kn"!   $om7sM^#Q˔[Q -Mǐ([fɅZ-V\MӋxrI8()J7eك0)%ţF~zLRt׃=PǂLq\=&87 dӊ8IW# .P ` &O&?K"8!> -+P% -<"E` A$YE-F 6#=7+P f 7 #5 pF=*|(th 75> , AQ!a4 -P &%p/ - N G HVw# FC *74)(& ?>9 %""B{"q9]"o7$Xv #_ 4q0 !l?7"^ B|(x&%fI4"33U %ՄTVB[1j'Q!J+bSJ(PfՄ4uM5~R4X6=PP\W,QQ>\xYQJJ -aQ ^P&)V;L3a($,A: @C # -o;6:?צ=u\H-y*no-&٥уٌ ӫٞ.|ǟ;^C ͤ?@7'h(ˍtӂ -QA /kju%t 4RiLQa۪KP(q@mQ;TL*OA]'$ Jh \75/aˊhQ8>IE V$K@U: -Hav7M`aMH">r[ ;?(;`6d&"< 7J]?U%!;M%\ MW8 95a!eA#+["# -*I_:`gJ>.xqBVϊQ} ~D4TpbXەG˄tp> -zVɤɒ^@B?xD6IaJp mRT*l%Ǭ -J` m͖%_.+Xg/4S ǐ!Z&W T m^Y>x} q5z1SrD?d i"jD>@w%3 !#*0";UN= / A Z* - - -l?2?,9'@gݎ]JMQc {s:!!c.37S8b r6e * / -nF*+t# 8-~ }תeO";ɜ/5 AUIE -Xo -8SjD`Q˘L$iZ;;g b%$)PU3Ha7pBMD>sSM'`>Qc0l\D՚&A="J&fg3??o+@(C;:6T0E('D(*fx% 1m3/,Dn7H8jx(5C&@-wPM'[ךjd3{WJeNW7 B7f *_`!Q-/ ө m" : ~u%ya=S!26+w9 I8#o (rM~"53B -v8e% - ^;{v7m قa!#. 5> sEc@S}3#+/!чaD_kCx o7ۡQ=n4ը9h Y5Kl۩ra`ykw # N{ -La@lO$d q8ߪ9]6ko)@ -I=V= r#o h+ -=6q!!no98%Q+E9# C! %+#&?7 R -<75D'$aK-+@0 '-&7A7 -0-6 5?q" 5#G (E7!0@%"%/F"M'03# (J=9 e -8@M -W#@,b'K@3;A L0 *5g2?!5A&:+Q WT")8 "D4?!)C $m C J/D8 PA!9T!(%` h( -R )9 ."=-# ,M C% *!< +"80~ m~%<L9&/$6< -LC *&E"*5!8 )+ & "0AE9%:!@#!@% -qa߁"Q^(s%cAEk-"4u5BW9M6;g<5s>i bgm(R[ϘeEO`4e? Y@QOg"WjW:K# aC'\c~R>/VA U&gAIb%[>:G3DVP4)+?&+b) (.: 3)_-a Z8) & AU (*G )?)Z,:36]1e) 3.M f)b@%( 31K)D&/<F' X`4_l_Y͓s -NW Z+ ]5ӆZQQ '0DvN -n5/ &Y -%#*'0#  n . 9;??C:0+8$@IIb 1/'J(O:HJK'G?E I! \ɲ,E;#aX*#K -w9=óB` D 3W9I#pBSm$"&;H !\ !TF! ' -T&:6 a#' WE-  9(,%% B4S )k"?1(C+'"69"0 "=%L#@(oi d 1?7K K= I_%8Ox .aS!m2NdLћk2,`NÒ ݥg{ReZONEY7>7g/6s7ݞ^ 20 ba9 M$"'y UY - +/E66"y{ 17:+ ߚ -=#~ۋW  e 9(c;M Z%Ւ B "+"7ǒ16i# ;7m4M  u4v55LE8! -<"~'>H7%{ -!2L>A\U~#ۘ  r708, 8LӒ"|Sj#l j3(ncL!-83}084Ձ a85t4#]ղ{}5 l>Mk' '4c@[7 -?AnMZZO?R %4]_IP;,_8 ShK 8 "pO7#!AYdi$[q--*"7 -$A67J]D7UW#Jc$> 8m)908! ap9kd $[l]AAe#JCUY9 a! -6Aim -e[ {[*m ";q5D"#"q/|o cwa,<*cwtD9 7n8oSCW6ۍS6WS9bT 9 S?mD/[L!`&1(2# !%Q!IbZ8JS9f10&PdSy7G [ - g%_!A } 6 (bc!5;!"zgN9 9a!  9_ a7beeT #"? - j!O5gէJ JA]#t!w5 9cӧ#{_moU -MnN 9]l_S$;+x/2e"!_ 0uQ!/8O(?W$nWKU5|-@ -6k&9/ v[[i?,n͈)Ok ٢s ]~fi 8/W 9q!!i Q-#S -7יUP_ߍ!( 0Ra B8i RSm 1a -8\ S Fߧk5%/J 3cNB :6n #WmI7' ߒwa# q276M%!Qkf#YKɨig# .x-.IJ$,e5MCk _7eףWω"_nW50]8 9o27V7"pQj8 B-KLW U! -+{S;jU ]ק][6 -T8 _][m9l, m, oagmTeDDWjc -R[7|OфMvGYy -.!G2%_6=93tjcJWrA#-  8" wmYc^!'6 o"SF2"k*{BO:y;!#KϤ)D45#?mQ"X9k"E 8 ;G`5 ]g -M[!%k'b -8iz!7N/SۑcFK   "e{aA]7ŗU-dž1Wk 7YnH8 -T;!b7 Wf tc g| - &m_ l!)QD7, oqdZ? э q_a"z@6F! h :] 3:_L$U i"mzUqFD - Qg#")Go##"( aw*Ys><"6;(_EU8 6_p3"ms@8_+\kWAYAOy8Q yA7$}Aq  /< 'rM 1gt$N$j0,"9  R45 C6MD" + c:4l1nem7/nO(|V=! . W`o.*i+á.sQb%a; -0S( ((! 8-#<O"p -\3,(E0])RWT˗8#.s1%%Sq1&% -QZU\x*KW!82BaC ~*l5JSӜb6ш͐M:L:GӤld׭mtLo> Dž4n%~9 --)Dp'3ϟT]o&ˏD̓WsqP uRσrsτIm<[n H[7u7zh>ɩy@9Ϫ/*@8"iN?@ :7 -r ׍[6 $m !>8We9B>85>: C5S#q"s''@u/"p4!9_?"HA8PYŇYj ",!_-58( Wly[727)zK]їe LU ˥kӕm2Q!P!Kǀ eB˒^ h0e חf -8Y -${VLv9n )V = :C - ||Ni"}["( 6PM7xeM N7 !Æ ] O!Y5M ! 7!7l Z77e!C9 ! Yߋ#]:$yE7w7$F 7`997N83N#lO!K7a ,` a v9 -9;9{Z#b8< -L5\ m!5u:0 gJ7S 9 W V_K "7"?Sєn$0D/&6&K 5I@"K+g / %#n -!K4/ C$Q  -fG -!;Fa#@DEGg$7N j!#%+׈"j" _K5Z  @ + 7 _Mc z89!eA!G;`"7$ -\8K7)xa>86)zՏz"26Pp"+#94V ː9Z,q"$ g8w7&ztj 6&OX-d 5f"6U#4}4P` ok w J i q ~Q FW%fۭ9-Bݪnc{\ y 2Y*&YmGq*Ũ ?rWMkU#oQl&Y׉UcJoAˤp'o1ۈi@u[&_ch+~kKٲ)y>R7ucHoDRgKII1lE#j-;:16uzc60#OŢE-D)C$ ϋ3`t5ݲfs5.Hi/٠wZ@/>a;9D(d--m% u/J5943w'G23 -R#"#t2=%l99_9/<21 7;p)c3 # M&? 9B[NRw+7=5L; -h -V׍_M,r hO -~".* -r$O"S#EM"o Y38P>Ob -]OmGÎLRxMf6C݌ -YgvE @3PP"%c%68mC Ab9\LM]7:-1o S H$J g xP 5@ Ma{&8"T !t26 ^t6PŠ$#39S (p1:I MӀ!o6 k o c HQ[0S1C -9{) kh -E9 _,!U -5Y9gmD(8+$*Ea" -zɓ!'cZ#7 I:1#c"z8Q o -5D!fdQ#2-"J 9 @$"(P$ -8% :94 <@$99#/)#O' N< A%"(L"4?3 D+$6CG*7l -'C : )Jl 7F -P>* 6\A1 -4?4! ?E78 (? )9#r 8%#(8@  -O4L6q$Fr>r"E. &!R)D"h"nY : J!P -0XS^ۏE9|1vn 7>L*/"] -nсh} 6qF!x +ɐDqd 6BɃ -9 IU"#\0&`]9d -Y Iz?@!IjӒg(|]& Ilv3\JBe 3 &KY V ; -692I+"bG)dOPc׋ -l"*]ifm[r6 'zuZE ,w۳7Ky*%S&u%E~GS V,JKty02D9P1 cWh' 5A9 % 335  *1ۜm^1s&7EE 3?B -| '. 3l' }ݬU#!}"݅ 5!?I7 efDF9-9~9@ 6QA"" !77<> #DLO ;6Q :) _;k 5A; DABWAL]3F 8!I D*:3!89GJO# P*A ,PS3 -r g!Wx"y ewx! :# m!9k^6z3"N:j4ӧK_ۇ!S!ٍZ77 G"0WJ6Շ٣UH"ZA'&ə͆#$(ňk+z&Q|o4K g3if&Ô=v) ن&LN6 -! #sg>"SA</} *L4 ϙI^\y3v ;N - !"_R8U,0 ǕZz"-n@ - 1y: }e io&8& {Z.C7[-Lo -.o  r˚M!{ۜ*@ŌOD82N5uz< ~X3D'j#c.N[e"uDɑFD*y"@V#NDu"zO@=VϢ1߫Mi0Q0UA / z1Ç#Je -@49Օ]l 0+z= -vE Bߒf:^7 ePz?Hs!VC6z 8 n8v] #'m$# D!*&&I0$$"5Xe/o#͘3 ߗ 7Cl6Kb;9N w! -L o" -t!p(@8W 6+30& 45$%#'H%3[:Z@~/)&)P-;&=! R 1D0 &=)3( >' 791 !#$!'%0 &( *,J&(  > !+=% -ד< - ͨt {sh B!8*V&F@ | 0`    - - -          -                                                                                                                                                                                                                                                         /|0`    - - -  !%   & " !%                                                                                                                                                                                                                                                       /|0`    - - -  !%   & " !%                                                                                                                                                                                                                                                       /|0`    - - -  !%   & " !%                                                                                                                                                                                                                                                           /|0`    - - -   " "&   !$                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    L|0`-  +(='($6$'=)5 &) -%0)% )!&!$)4# +""(%#($)$*+()4(* )'"%/>(36 +!$&)),,6-$2/4#,(.!"//!84),*&$-'#&"##&2%&"-*&+%%(#,0))1, ,*$6+**+ &,+*+!&!(+!%  %*)%-+(.1%!%+#) "+.'-#)++$''#,#!+#)&!" $$'!.) $%($) ,+%(?()*#  %$'/*'".'+)%=$(+*-4&%#+(1+&"()&. )11'!7*- ;df~R>`pͬuv6ߦݧF_{|CAYY33m4RR.1jiEZ 8Oqr9ٛWݜ˨Sݱ×/Odd8ãus:;ѰQ^9D}n,ݢӘ3SsRui*k3H9Y9ɪyni"O [}~P:ըtjR,O z(J8X"՛yVQ.8UTl,k3 ,mwf"ǕCcGɮwb R0i_v? X{i%OCDcMͲ''ttTT22a`_U׬u97_t<͉eN -~y "Yg$rfZJ+ q;<Q2c -4Jpe4-@f,A[N{;z:`p(zLB~J\M\t}E_?8%Øj=qI|DA͠~2rc'ßlXX!67XDDKG^Hr`NM$.0~Tϛ$ݳz>,+7m\xCute͂!jiG$ruq[Z)*LBa`FݛTU5lFK)Iab &@>v5|.-Ot%56cA\]H=bkIۊtuU(ij2R.utDCӨ/.P -LLm:{|߮ll5%p;H͙0LBU{Iv10ht/ bϯhh1' CB }}0 A[\*kkuߕ*)4k5ՒYWxlJM+ -geD,;<'Ś9_24Uw10?,*[Gu55)dX'43_JK(ǃ߂ݠׄC?߰YXb*llvU%aaI7^@sR>?w5 ۚdç6:F"%~BC??Iգˬ+*))DHHH=לϗd;AABxOpCCAAd^::;Ar?CB==]tuْ,+5m37*åVVNFEbכ6o:8v%rU I#k:8;g -m/ mRl|"Ttb^v v#)nx3 DŽGtтa) #M.y+CxslY%A@| yAO\˞Cu y"F6ٕۛa>PϏ4g -4Tw -\)3mUthOn ;ϥ_=J>V[3,g1Rueì *,i0Asl˅&]a%#DZ&cF\5TtUi}ўl:z4Uɞկddpm).IJ?q(sم6_uY AzE;mE  dT|uRQ\ג ;9Ǧy|oo͇4 ?eoǍXӓufD1AŖ21φ$ѡ``zUrpPխ+LLm^ӭ?d W{yT{Z{oPhKs$:i/ -9cnvTjOQ0n|lmwXXzϑoӦ*zyX>?bZ^{=1O Ya@Jfۉ.QPCr!Fg~Gi ŧG;T3} 9xLA|\ӱx!UZˀVs+ۥJf.S[|/F9E{5W]=R5qOͳ:GH~VwpP 0ӖX?Dc6nQ~reH;&àd0D#zϭN"2]X[ųPdp$7fե>v9Z8`>ɛ'[cC< ߝ<Rۙic3׊+< =Hّ|O -ge .!ߔnX{*GcCsjBe,׫`N+|ZZɟ\ˑ@R'~Y(b6[;*u(X)מiuYu!XV|-*yK]ɝ$ˆ`E{jGz}dQ0őD o8Hyϖ9i3/ kKŐlK|!Ń{0K߲%9jsNn`T߃Um -ݤݘ*ѣh4Yep̀2 ,nn=N"ɀ5 "KۗvVq9baz@+{kqYsbZYFMNρ^vpKyMyh2#_L!%M'<Ŕ -X&3vxNH\> ?ߌ9BTuٚ .6Y`=J\A OG3"g - @ &Q~՞z Si1QulEI)a0i0?PJTz+ө٪]%&k1thkۃ=3^Q/b*7!4۟R0wK0`JS {2l( W{ӕ\S>s@`tRixE'hxN?ͯ٩χ Nuh0S]V{rӪ X[9Y 4Y\pi1)H]ѓlߊDg1Tōݡf.W fF?`Ʉ`Ã8ӥ$8tO7o=˩y߬hV3Q[zɱeM-#j1 dAtR5@KًOrm,'Ee߈lI, xB -(i8ue.$A$il1'V^F ߑx_Vjt ݆c@pj17Ѥh:F|?a17AAL8ɗeJTon|[hhrXXgIK}XYוt-(4+*9e %ߡ.Dݫ-w^/&/&c/U-eL@p _B9rj6^ͦEe(s YϜ/Ík/ݖѦUu7b+ۖ/nϞz^5,|Zuݔ-N>rgKgݰTʼn8j Ϡ,N݋F^>Qь4TVǧ8+vV!2i#h`nL;E_7Yͪ[QZِ2h= VF"OI@_{\yDt@Ì6nk P8͟Kll3o-'yC}Z:d VOwZO SǞB8`]"yWu*MGX{wٰT۞@/g)7W -L :\ۨLkÀp*r*{VfXY ]}pLѯǮJAx]m)(c1W1 kvx}=ݣi ?=UY |H*-P2jY(MǩrfO_BxLH˯=hcVCsk#p/׆BՋXR~2I44ю1CGFٳ MAۯu_]mHS3kmŁ- "\]=n(J=xV3TWzoTwnO41m7")Lh%_!W" VD2Qsd?w͏+Nkb>SX3z#E]/RL M?' ;E xh0}ՃMkGp} $u -{~i*9? -ŲPG LJtmqrӔ}$I,Z%$/g+b-}`86n:.. %G˝i2cbřrqf7mlsRׇ X|| A!YbSS݈}U5{@IAӰ$#f(Kjj3)R7cǎp.0ϡ++8o$4%tU:->aӚߢ&+*(4H)< :%'H=~ McfXٗ -ݝ01 ZFG$:Ot@@Wnc35}<ˢѮŀC2sq^cE|67&3[:,ѫtݒP7P##ͱ*BG{S:]=^X8r7WE߄r<+M4Y Rh0#˭; -%XLz,ѥ+ - Aq|:_OůH`&x -C0#tߙT}_=˰ Sq0m5va%z=Վ_.ɰ)<=F;qK B-(# GGӃA"]ב,wu3| -ٮ"HK׌}7@Qј(ыCCv2ϝAAG0tu]}a:?>c"4w ۦ+nmP[w!Z\߅b@?7L}oNL}.9_]Wwk~L+٭ˈϦ+{z3kɂF]6V*׏Tno|Ş,BER0[Z2ŝ]]Xoec"!͑ML9υ>~RR6W6Պ"C6!ɘ !$mst^~#Q˔[QWyn20Mǐ([fɅZ-V\MӋxrI8()J7eك0)%ţF~zLRt׃=PǂLq\=x?,7 pӊNW{. {Ո&:Psa?fqW8>+|%G<ɫf^<` e#$YE-F 6ZyElUluYfryC -3S!'՗F*Ŝ( @u>Hٍ,LkaŕPpZ-%4TH'wVG Xî$E$wFOCyϰ4^nI2&x>EY "9\x]p8/b>_ - ?0WpQF>!ӳ?v~qˋB|(@ffIhkkV4vUՄTsB1x'!l+S(x4kM5RێX=b`k^},ÏQ`YJۤk -f> k<>&.);3(C"@$n,[:cCۆo;6:?צ=u\H-y*no-&٥уٌ ӫٞ.ǟ;^CLͤ@@'!hˍtӂ -gџ/kj%4RiQLQ۪͜K(@QqjBOx]x.$ht\:5/oQFIeVp$.ZUR -vM~\"4>y[ H?g;`6d&GH(O/o:??dUV;sա%ǁ__ߣM~~Hߘ;<'}NOn#U1hrɆע<:`gJ>.qVϊQ} ɌDxTqbXەG˄tp>HzVɤɒ^@B?xD6IaJp mRT*l%Ǭ -J` m͖%_.+XggѝhS Þ!`aWT m^Y>x} q5z1SˉrݚDoOݍ?d1 ͛F"BͰDYw%cE#NǡbtsPN= P\9שANf*K@Á -?ױrf,Vtݎ]JRQuiM{s:\!c.53778:db r66KK YT -|n^aş+j}1$#-~š}תvve=4VW<}v\=;QQ? X6<05,jɜ߱/dpUIEpz -˲cc87(HD`˘Z$ikZ;<;l %'$)zU43Hߩ7XM˱>S'ߐ>3h0\՚h&<1@&6ɠ:b;ŏ95h J,j#{ˮDa=yC2v  ->d٧QS.vwí !r  N W6  -,A { -T)Tlp0z+:b ?'xх~ӯBa۠Iߏm]a,Ǣ@HKPs/48y ͊іq#U76-Jvc8fP0}i>&df-#W2D|ipua!ˣњlsߥ& /bpIՅ"%pjC9٬+u 4S!T%Rǜo1xnNvEc@S}3+/!чǥa_Dkx!7ۡX=n49qhY5Kl۩zaêt`ykw # N{ -L_asS$d q8ߪ9]6ko@KVH=GhŪp -H~&o9rr{QGFjNjGGgӇQee%?œ[۲vkJrabdO?''e{@JOZ@?^DDˌHHՍb1#E%%lhTT7Xbbe-fT^ÉzW.n/,sώ's@;}L|*n82qٓ5vז&K(iϘN z?b !O>jjϫKt00#'~S/VU&;<[ϳBAPe&%G\PPi12hɈ}}ɔO V}-nٖgŰ7} ^p/0UqzI;+ۓ^/d&5x?BLűBͩ;py78k8j&)+po{|. -USѠ\BA ]^Ř02"'>)*g a_ł`=s54'i@Ej,nm5)/ ߛdzxB - ݀դ`_STl]R:ѭABK}|Z1۝{[ ń{|F-~2}|D>Tno˦Wے*j44<;=Ui%*@͍ji0ۄK!cbM7Xeձu1yفo z? ae9^՜8GA[!cQNNV=549zmk8D*4^ -x}d՟_. W4y:]I y~ 7rdqty;2FNy=äs{3ŊbDzi.ɥ3_|D_-ә( ׮)pa8V%/oA'RՓה:ZG6 GpPۅ*nT ;"Wی+,f36]1|e˫ m?MnfE=ɉrUï2(ݕbO1J˖B>)NFόmz,۰arǤmlё͓NN:X3C:5ӆ4 Q4dO1ijQuh'Wva}NÚןpd5v  -}S00r3mM#%ߓ2Bq ߯FG#b:hX/+^LE@aNq8 cqr/(O[ tLdϕI.'XpGPuV{ !v ɲY-;{XaףiϓX#ozw=óB` R_o;è %Bͮv݄و"H|\OA"`fU.s!9{&-gթ^u7Uvfn/swR^2cbc9FӮ$G'ˠsU͝Y[frK]El6yݯ{h1;K+ߚ=`~2ۋWd { ScMmZ bB"N>h1i U?m4Ɂuv5E~)<_~ץN>H% -!2>\~ۘrݩ0i,68"Ssjlvj(cO!k80iR4Ձâa~m8ݨt#]ղ{}}l[]k߆Z'2l4lM@[ϱBZ\Zɬ?RK 2]_`װ;,_aaUhitٟ߭ .7&G:%݉i]\? .-XzI>ei$7ϐ|D&EKJo>@Lss0AzBA!ò==d32 Z//SOALӗaMJ('@mw&2[MM0 trDFcfeE#7||{oѐwusa, Dž4n%~9 --)Dp'3ϟT]o&ˏD̓WsqP uRσrsτIm[ H[u7zh>ɩy@9Ϫ/kۣ*-PiׂRJ@`Bz1.[ם$`!1W{eY]5sǭN Spxц'N Q/rp4U99?aHH:PQ(ŇujݓM,_f-.JI(nlJ٦j2)KїpeLL0˥ͧհm22*qPݐǀe˧^~hEe חfp8$VLvɯzn)IwV^=YNC͒Oi}[(56ņMeN/ Æ~]OqxY5+ :X!wlZKe(C|1Yxߋ]ߨ$E}wӬcF W`tJQVN3#pOKaۂ,Iہ`a݂vQ;uZ}bGg#GewϲǓ7j3%g<׈<j"._K5zZ ٱ@JÜ7+W7_czǒ9@e%>G`7Q$ -\ݭK)aנn8)ՏzQ2RTp+#K8`Vׯ<Zq$-9gw&tj 6&XŒ- 5"6#4IP`oykw T viq ~Ǡ<͞qO@:[bv): q|sk"Ox*Y7|2&jۮ4Pd]ŭϔux>QFkXWfۭ9-Bݪnc{\ y 22*&&mG׳q*˳Ũ?rrMkk#ol&&׉UJـAˤpr)o1ۈi@A[&ch+~Kٲ)y>R7cHoDRSII1ml#j.-:216zפ60#$ŢED)C$ ϋ3`t5ݲfsc5XH՘i٠w}˛ZAabśUoD)dY-.T uJJ4pqgas #LL)ӑǏBVG@RRpqǪuSOb-Ϭ]mGgÎLRxMfC݌Ygp.vE M3VPH"c%6nmMCAb\éM]Q-1yoS -H7J g݇xZP5@MMa~{&8[T -t2h ^tPŠ$G39S](p1=IW Ӏ!ok͋ol! .OHH0S1CQR ߤ)7shKJ?M,`U<;^[}Db()َq'$G?EFf",ɓnmE$'SѨIT1٫cz]QoyG5DffdQ#2Pǚ-9E":bdzh/$}C ͔T $=v#Cb\9':ZPqp%H0|8w~9A[GCr'kw5 ӈ?Mp >*ɕ^;Aa~? -mײ!-ՆM(nx/D\˕\T0uˎ~ YLf#`@vY -L6ɧ$js>g"ÕZ8DhqÊ(kwYWq P -04XS^lۏE|21vnO wL/"nсh} 6qF!x +ɐDqdp6UPBɃɍ9ZϒIUF"\&`]^d -YyI?!;XIjӒ(]5& Ilv3\JBeU T &K!V6R|F;QIubG)dOPc׋ -l"*]iffm[r6 'zuZE ,w۳7Ky*y%zF!~GÛV,JKtyMdՖDbKggt3h@JI'c`CPhy89n3M#1ۜm^GHZ'n6ɖE;N?-'ՙaU})ݬ<]}݅ +?INL"!DbF9~YUQRcASsr{oÝr˚nM*kŌV\=25z"@#Nu#zO=[kVϢ6߫MiQU / 1Ç#Jev K -49Օ] +0+=HvEOBߒfg:^Ö ePz?HA"sW_zNA vn:] #'Ցm#.r!CiyIKH$nXe/v͘O\ߗf/ CqKrbݮX9rNcwې -Wwo-"!˒i(cWvK`+ɇtɋJѱ[)^˓Pv+<u qS|v:ɚZ~D-oH]?.irdӐςh&<F, ^ɢzeQ0nU|=b3}9 ˙Nl4 l[:l1ǣ6|[|\,xmщE;gӲFLrf$ɡ8v9t=ǙbM3 ד_zwC 76Þ9uVa-;IOL]7 &ǃX %ݫzW*,Q "H&f]á -<\'ˌEWnhC߱qe=_d!(#l!!eeg=dX8nm&#QzӯgH>4gP# I"Ja4`Pz*AUuh/{ -&/U?,)w@4kGkC'ߜ] eqNc7{*c,Xs(*b%3 sXC T 3rd}+-џq\IVty<z`T?ˏӝSuŔIg4ۂ_Րfo;2_1;,|'ϊߊ QnUk. q5}b]M DEnP4y G9DX.4_a]W8JpVy_ۘE?x/xAkIqˇL[zsVv`n|Í@Q}*5- ͇vAuqD+8:#U%ѡ lQߡiL{4~;oQ`6%T=ODv17!6>apOMY;!z__dɘ9-M-YieaFǫNl ςTgEZ[gXqL<5^>r]ptݳz `gA Jw٥L$? U4 v2.ek-;{5cx?$:mcN$'idKJk [J=MI93PU\lsgi&J9 SBdE &&=p\9 vuNO3f&Xgr Hx  VѲŐuoAlѪYh)A۝KD>AQF[r.RvbH9-ńߒLHxAr!$+ 2ը'p4Cd>uYicxzf.3wz}TJL_ -!'Lwä=^ :_%v>>ϑX*L-ϕW tݬ>RpS%&j'u ߩ͖m1GݡIa;ـ -od%ZcњBB}C[Zbdߠk?ך[pצ.^61ɥe_av< 1ipۨh -ZQ=ө - aii$"Ǐo%vny PWp{U>/}Ʉۛ 4fZ} IW߇X:ŮBɊ`WÆEIp1QznElc,Y/gs@$w/U(! v%ψcj "LWۄY}ՈG=h͕8G$.cS50"F0{  'm0tn:͜HXTa4ˉ%i<k}&U^+h3rӏ^Ǣí~M} )+>*b'/Vqc'ɗ?\h_=4kaJ)iEg=ݎY"bővӛ >05zuLLl!-ɀXQèNN{fe,.0iTVFg 6ZSNN]G!nqlMCT@U{tׁكIo WP'݇)l;&@J,xH<Õ4z$~R#dzJ#Z@0nׅ Wk]/^'ш -4~ -j;\5?F5|eO \_23SVE-.tY ۚ>զ.թ8U՗x9JӱUY ɱ&]PbnD{-&sQG=_ASaYݨՊg[B:HՇymS>TCvm -ɏt90'}:ե'J͈EI)]b׉GR,'Wr^9 ' K;ݑ*E"ӭt)xVo9,fH&ͦFczMbK{8w{/2_V0݌j -%)4ߗa0THhMR*Ng@2?{vnρv+|%Ǘ@A r}G˃Vѥݚ[ۦ4 -0!t=uod7 -fy N:!DWAq՝5,tI$CTP`,)YX87?&XÏHoѭ+1ox),:'F8 -w&ˣj54% s+)6բfKϐ:3DbYhϜPG5XTv 6ՙKF\8-2)SyC.<՛*͒XKy&otVY IEْiE#Ǡ8ۉ40`5\٢tÂZ}?T:Gfk_)R+?e[\3>CJ75tz{ {czC ݛsv/ 4 K5e,(t\4BH ~FgAShE0}.۫X#A7d1ut Hdgٳmf ϟ2e]* AٞӉ2ō&Hl<ëlߕC1jŝaIňt DpZ["Q\Cs]@wBũyb+wEG,eU##+9Nxs =j+ˮ kOm-#7`G+x BѫA:K,Y&YWۓ_ZɕתEِݟrr.7l T~FӥE  l>#YeɋӤivKZُqǦ'5orG0Ts՟ӊ&vY@sR/˜^zb}_6d V hS$ǮF?c":6ٙwrJ-Hvٱ%1%$(%UOف%`\uAa&TN=<"GN+Ucۮنv2,h[pK^&z"7'kj0i1 .sۇGDphToAd jD8n{˭(TN*~σ~B˂563MiO? ϙCC*)p ynw:l>%2!͆"):OۃARQ@2%$<S~ߚV+9t}szɢEaGjUtvNKE LӎdI[ IKnmہɈ(Vχ0O;$A+l8QkbRMp2p%>ˑ|:t -n4ͣϡ-8*u.:2tXUNcZ* ߂ÔURf|ǪA+pD_ $}r qC/%j,(Xd,`9|=XGkp<P&}rK,T\u,v#l0o;IhWf(ha٦w/o_CJMQ\ɠ\וyK {nS;B#J7&3~r&g&|H -%3 ۲\CS#R @tH -ӗ/IWBfdez DՕ1ExuAR{2P ZLɮf(44ř-2UF#-X+٣?Ӝ_qR5 -U>1ZDq(Zg5W1;T9t۰M ٪fE^7Dod|yKY#I/ - -'RsG?:2[jVV3/ݯ22 !DfowWϥ6MoӚ:ÃFBK -sQ94Ft|(4JElYl!HS 0^kn'ϲxղǨLYKq~l<Ӧs&J -{c[$jE`d}mDVق#c -Znf")8ǩhٝ$R ] v"WF>4#-myc8aU!-u]$ۆ4$V DW8 -O sw;C3d\ǂO6ٮ>PeBUN}.[B9,]LQrtDݩ9?IR Uaf/-igOiaǜ`mWWvC~ݘ s pa(Dr%!Y6R*9i.tJ=F W|j % [; 6 @wXp"H}cj0/h~,oL(UAۢٯ* Q`Ea>j? "P6Wr*' ͱ[IxK`ɝ-@2 c6J{oZgNӓ]]&w8 [{ZN#Wsk{ۤfcUiS^1k"-QQ~~0y!`lC9e, Ռ!]y-|u<,9m@E)fwщŤߛoYwIh k;gˈs% -ǣ˫fgOl*#Uŭ9%ߦg @~jct{HTOe^7vx pBd|1 P@LѨ,cO45{m% -JeT3DR~9 x)uˋ ٫59FZv h%@.5[z68YS[kX/V6ٍϧ RbW!mf?wymqŊѤyPYߓ#t׋Zy[-\4 1qыeDo3p)&}07۟m7qDv&GWOLÎW))Q`:g'-JCǡRϠWfɍvQKttߏc5͑13 A^L"sqJ0+۩=E C&~#~ Hc l[>| TՋHobq[jkӖiqHP?jEA~U`9ˬC?s+F7/D'_"w1"3Di4!nzP~ÛYu}-x215Fw1{/m0$Jr7:fůeύk#x[ә"p!g(_~HӁO,ׄŋ!JBKie(e~>D/P_Ys1Gsӂ?=$aKn|M:5xNWyǓywu'MI-5ymkhn2Ӑ_+8}7d(/vMXðv˩1k%dB`fXwwEuנh٬,F߉ɨ?81džl"Dkߔ3UJNAsˆD\S,3-2AM;,%pb1@b.=AU%na`o&o>B 0ٌtK CJ9ǐw| -iӋV͐*El7z)rhݤ. kjuM ݓ4 nW EןZͤ$G ݂dGTό߰5}RH*0F9mJrgE=Rj[:MJݜ A 0iGɑ/sɂoMxŚ0j6q9DW@l?x(xfmyGmŒ.Zx=,9~) mr-Hwǝz. ]~5*[+ *tՏLU1'n30ɜ16s`t]*o 2(,ux'Bu٩P4~_g')yzar"7ŕ^j?!NH4[DmvK_ ͓O -E<M5FYѰ w>] |# ŧ&H 3ߞ1rm7&c j*e<\#e[oN^ml3\A.Ŗ#P)9SbۈלH{4IkfI6I^^`ׇ -4Ie/ZwFaB]ìT4|p]IkK>Lo+ŏKz<&N`dg{uǙV)Ͳժc .Zӫ!u67hTv Nכ8lى w +^L n( Ap$y\-cj}pѓ"/7*,E -U#I#-Tײxb8YGZXWF'r^VՂm}גNَ_P 9ۣŌ;\׈0h;ANS(|߆5:1Sя/ߖXRAh/vgLv9rur6 }-ߋyS|Y۪a~T[ɇ=HOӔ_xװ$@uC=dyтGсNf˕Pp.(*WX) _zhV2"~o_U:ݥcω ɯT"-j{Ӣ4=$jϦ˦X\zI\r#@- x,0-A'_^kjW]tr ->6:F 9GўNj9۞Y9\ra{^=hA{(j.6Oqw!A$YiUZ|\KKjeQi13B7nJX&ۭm[ێg[jVZNj_~lTry+Ë`yvKS[xRQ1}Ӡ79ϝe?G۳>&˧p`јiV%DDBq׆ aa]jII=MHQ`Q{.@I8%6լiW P m Efs8L^ь1F7C"jBaS"b<%Sɪnc5`%CWћ`2`--ǀ;c[10obMwHdeg\ m,|$lZ!\J(#gLmp+SL,DWmlUߎխ# -lEvSZ~;R'{zˢVvDRvUCۯC~kYѠףD,XDz5"LY?aG?R]O2C׀qs:eӳۡ4T - -|':w@ -y{Ӭ~[RMyf ͍$˘ɓq'}ߤ24O -nQ ! уF͋]y!۬ÒY'ZNj#zt[=81i ׳e{7vGɐozò4oq*Mm>M˒)V)uEU[͔Gѧ\D}Pyz>NűZ$4ݝGS.xWœϪH`ii(R^!]\00Y'p}s{ӕ< .L{\O]˙KX ɭs<4f( M`9"ūwQq5X QhKC6i~<='?Dž(&E~bhJ?x0-3V7`lPNS|2Ñ:k?&7CC(M@vmZb9y٨v˄HWflo<łK2e9Zbe&^ghSO^ׂٖ.O*d_c( %8sY-j F1iݭ-5Q,MCE? [nmQMUU~V67-Ka0;C݁*SFzy0mxrCѦɁkv:9m!PϒJm'U9"hwMHUm3S D7aE?QɲÖ"/Il.o|wr'ua}Sh7.%ͅa(7Fs'v8k՞8?t6s dH<OJvfA=Sf]X.$bb?!aF 1Ms'H!yt+Y,ۖGZזgj9rC߭F&߮JtlKٚd{RKNv)ѝÐ((2~ÌoR <KÚy:(|i.PnrE6ñݮjz;'2!q_ŅWšZV]E7op|rp80cՃӃx5W"r>+2իaLӞLV"4͠FɚjV"ru@; -32@TR4r +U6ED{2=VUXX%)<{kSS4=ͳ6[wE:ߑ٘ۋ yɞ9blݗh2*] &V K~ )B^ZaOݖ@-;4?ۏ̓/ϓbD٭eONӧÈOkRf"]b4e<݄՜x<$}ǘ}Q{î(M9^Ŏ} 4.)7+٠R%JWceg]\GQu%5FgAǰ61sSC(9q,K@V'gu:f`S"7BϞg2,K(@@InM]ok ۥ:ӘlŢݧPZ9d( דdɧϯ'k~{\b"TP.מow`zJ"iBZ&`6}1J#*BiczLXٟ"a+15Fgvh?tAZ\tipO|O!@3})uݞu m+yHPτ^Ll'\n>:dyHWJ_;ϭJ'j:rN[HG"qm-ͰLцÉ/-|+{ks;klaG%ɉhyRV -/׫vyH)!$2A ZN[KB)dZ(C`>2ɖ>n@|n{0e߈Vs:npb|H+LR uon|"8nu[hD˲7 cV!פwu1Uˠ/ׯӇ\}+qhc!J e_>'͙Y,yiuE7kBS?pH(ߟysY -h#şYgQUOq׌O}_lٕxf6,y%kuNJb0Ød.pP:əɆ/4F|Jbl'HNS)6ͬV(Es!Uf9n2C46bd]=$~OQ_/0'|ע9_^sߝXZ63aYYjZ#ILA HTlF^[ ' " -5|u%372f˰N ;|יj> կ 2 @m9o BK%bZDAKnPץçv~ã*>0 TŦiq+@HKR;]57ǔuՎ4DM݅TA^Ϭah/M{8n[}EpX{"nר0" G6k;PjVoۊ[߬fr ˝,!ïRT8@1#z^ _9AP6yFCm&PjՁ#m.b+Ӓ"Z݆T~r*T?C)BAY]h>AEͩeD>,}-}=˞3#^ ^xDje5ˊۜX˪QP -Lbͨw vqC(N հQ~aj ŀ)CRSŘIߍjCb -DZBuY2ծՉ/d.b!Z*z=o^N0X.J`YF:]  IM/TqTF{Tͮ{%/?t= Y Drc$DŪ}ՔS(6/dOzi# J!My'1Oj_ic!@$`ͭTS_zA&nu$!w+c5*FP=:{>% 8b%@Vi^$FэvV4:5Ų2s b#ɰ"cGё^.{n8DO{"I@`ŗ -Qx,OV*1xM;c ׃[ 3?xq/}wxBRPBS xZk.T|ó+x-_)O Çfd]8'HC_pKk͚t($+_\}||QݢcI*h݀qͧ ϰ,`5[3s$NCi1^;,JAh% LÙu)`reӣ/iTC+Y;_dNm׍ 00|vH E;JLX|2r;gg8)Se:nUO`#!ˡjd6>l&N ۍgxϋ}ّ0Tv<8Y;k)mէggճ~ ϛF7;ˎq]%swx߁/ەϣ'݋)ݒX-ǯ`I!zɣbs,=3V+ rB(׮">;qPRIh~Gilфv5R,I2:?RG5ݣ;XMIfc+AL2C^ W*nd/au/Qbp3tV1hGd?zH/LU~fm,q $I0TSWOX? )X,qW!+.6z8G$)!noM@åuf-Ѯ|e=y$0!}tNٛW/Orka:}FNlc-ߙ:xj}PRvPXdHV_1G2_J@W7\: u.!$LHߨa4cwk_) Nk<*&O qO@ !E6*#7L7)_?* -LB - -Ѭ#Ϙ݈ɤ[sK^*F8͢/?8߯xA8ՀX+Pgr)7O$ݕ#NEӈ[`=&ɎDaˍ@'|c*Á^ZDst7\N RB TncP_م-B{*>ɫ~ru8VH/)HOq"5=RQb;hXݠ!Vaב?Hx׊݊LJ AH:NՅ:a}ۧu'=AGbx( -D]q$N(;z 7pŠG6wB.#@ z~&QmZq8Y^ѕ6 :)ZɅBه̀;bmשۅw6E\0t(z3[4ߣx@˥f,#hF6X r^^ms asǭ9`1PgQX|68lC7{{n*!Os%3]|iAn<rPl&h͞R/FEMSBvh6.=)Ϥ;U0Se&z@ -N|]Wq=|!ˁ]Me-5RÀ Üt0e/<VɳLtDb(Q -H+wٲfգ ќZ3*хM]aeOJ9CO]1,:gr1n rqJr$|R!߲]<۔>^i͌ ^w-8׭q)ch!Y( *{IwXD ~+ٔՍ%D|Փ(Ƀ3 zpqlSb5|k='(O$6b*snFg*-/OM18Q;%:8"9 -8*,A* -R $95 -0G<:4!:0 4("0 J"4#"51a!P,A 9B060!*+6<B OB!')t)T-`-97<$ -~ Yg$rZJ <2 -4Je4-@f,N;:`p(zB~J\M\|E. _?%TØ=qIDA2L!6ABGA G H)C(oM!0Fe);8u+a -6*+8aUga0$"!]Dqr8Z96 FY5[.#?-O!%*%n -cP!C*!")Nk( - O+Fm6,WA#c!`$AK*%7;A+57skDQrw o!4M6  2P' -6IFy!%;2!"Q l 47Y). 3_A9("Y>qi #A,Xk 7%#O &J:!:#u79e.6" `~?5Q=#'d2+c#76p!A%A7W!+WU ^":U/0?;=; N+e 7VW8Ee!9PrUI#k8g -m/ Rl"Tb^v v%!)E"x3 тa") Ð#7P.y+l cAC2( "#2!ۛa P? 4 -$ # -3<3:8Uh V[L,6Rì iA+(q˅%#c7>5NUi}ў:? -UɞmE- ).8 -;(I8U6#NY 3890I 9(0T -Q1 - Ǧo3 4?%X#uf/"φ -$|`/#U%*C)+ ) ^!O?$ 7{8 ^K $y7 -.c7wK0 l' -X)!*{b9'Z!."C  F G7i  ; 3 }! 8x7A \ x8!z99s" E.7B[7|! E55!=8y#O!&7GM6V!P $b1X?.Q#&# 6ϭ"6]g"XS;P$? 07>(/9Z+!ɛ[& < aRK0c!g$_"<  bHxO -\" !6CZg )P! *J. (/Ji  !6$(%*K:$<%0 ő + *Hg#ŐK  {gN%T # -mU -*n E4%:e : $N,B'"9")B; !J7<{ k@FM#YK.C":,##57'%M34V;љI(#5N .'Y9V -N3N?M%B@u."`= E. -E 2pp՞ h><17QaP-? -[T}%8 )9:thkۃ=3" 7* *5OA%G# 9( ( 9 >#.7 8N '"9` -5 -1 6% M" / O$61"#&2 #!#(#("" &H 7$ #! 92 (#D,# #"- 0 "(4.99%0!_?K]1wɗYbJTn -hkr!X5gIt(!4*{e80T-0 a&3a-(VU 17*&/>"X,%!1Pb( 81,"0Q- 4 1+ C 0=626"#P_D/66 --~  b_1 W& E:(#J "'/&*) ( E3rא]zm!!c}<\ W 1K=1 ("1JM$%OB˯=hVsk#p/BՋX2K41CGFǐ;?A9]G%3":; : ( #T"N<"a) 8' 6 +'( "mL9 -!=WTVXD@2!+"$Kt:$<=5)"+A6>EK s3zc/ ::' 2 -08}!j&D ]~ J#*f5\ -4D/P:?mG "%,-F$?8b8-P 655: !/o|263CDG67. 1R L. 8q78 48b@KAW#/>"/7 -#E+ ?1K 6"qQ%tU:->aӚߢ&+ -%o)AA !1@M&@>9 %/O@#3.D(&#E3[:,77:G8{":=%G8 7 E?<64%# 8 !x%yRHJN 0 -HOcL!# -48= -!F)57va0DQ] ]a3Uq@hn "piÑ!)B~ioSAAGIASA)veQG#@EK^Q=a|>oCY8un+{mQP w!9?[7N}!oL?.OEW y_37lF_E#VDQ*e,0!2kSEWX -LwD9La>@S6l|kn"!   $om7#Q˔[Q -Mǐ([fZ-V\Ӌx(J7كzRt׃=PL\=&87 dӊW# .P ` ?K"> -<"E$YE6#7+P #5pF=*|(th> , AQ!a4 -P &%p/ - G HVw# FC *7>9 %""Bq9]"o7$Xv #_ 4q0 !lB|(x4"33ՄVB['Q!J+b(PfՄ4uM5~R4X6=P\W,Q\xYQJJ -a ^&)V;L3a($,A: @C # -6:צu\H-y*no&уٌ ӫٞ.|ǟ^C ͤ?@7'h(ˍtӂ -QA %t 4iLQa۪KP@mT*OA]'$ Jh \7/aˊhQ8>IE V$K@U: -Hav7M`aMH>r[ ;`6d&"< ?U%!95a!eA# -*I_:`gJ>qBϊQ ~D4TX˄t> -zVɤ^@BxDpm*Ǭ -J`͖%_.Xg/4S ǐ!Z&W T mY>x51Sr?d iD>@w3 !#*0";UN= / A Z* - - -l,9'@gݎ]JMQc {s:!c.37S8b r -nF*+t# 8-~ }תeO";s'`c\D՚&A&f??@(CT0'D(*fx%jx(@-M'ךj{N7 B7 _Q-/ : ~ #r53e% ^;{ 5s@S+/чaDx o=n4ը9h Y5۩ra`k# N -LlO$dq9]6o)@ -I== o q!!no98%Q+E9# C! %+#&R -<75D'$+@0 ?q"  (E7!0@%M'03# (J=9 e M -W#'K@3;A L0 g2?!5A+Q WT")8 "D4?! J/DT!(%` h( -R )9 ."=-# ,M C% *!< +"80%<L9&/$6< -L*5!8 )+ &:!@#!@% -"Q^4u<5sgm(R[ϘeEO`4e?# aC'\c~R>/&gAIb%[>:G4R65_>TI7Wl 08W#MXeD1Dvفo? nn? AGAA!AQNoVV=4U9azk8R' - -Y"*0@ AI:4" =07Sh/2>)+?&+b) (.: _a Z8) &UG)Z,:61e)f)b1K)D&F' `4l_Y͓s -NW Z+ ]5QQ '0DN -nY -%#*'0# . 9;??C:0+8$@Ib 1O:HJK'G?E I! \ɲ,E;#aX*#K -w9=óBW9I#BSm$"&;!\ !TF -T&:6 a#' E-  9(S )k"?1(C'"69"0 "=#@(oi d 1?7K K= I_%8Ox .a!m2NdLћk2,`NÒ ݥg{ReZONE>7g/6ݞ^ ba9  U/y{ 17:+ ߚ -=#~ۋW  e 9(c;M Z%ՒB "7ǒ16i# ;4M  u4v5E8 -~'H7 -!2L\Uۘ  r7088LӒSj#l j3(ncL!-83}4Ձ at4#]ղ{}5 >Mk4c@[7 -?ZZO? %4_IP;,8 S7#!i$[--*"$A67J]D7UJc$> 8m)908! ap $[l]AAe#Y9 6Ai[ q5D"#"q|o cwa,tD97n8CW6ۍS6WS9b S?mD/[L!`&1(2 !Q!IbZ8J9f10&y7G [ - g%A }(bc!;!"zgNa!   a7bee #"? -5gէJ JA]#t!w 9cӧ#{_moU -Mnl_S$;+x/_ 0uQ!/8O(?W$nW|-@ -6k9/ v[i?,n͈٢s ]fi 8/W 9q!!i Q#S -7P( B8i RSm 1a -8\  k5%/J cB :6n #Wm' ߒwa# q%!Qkf#YKɨig# .x-.$,e508 9o7V7j8 B-KLW U! -+{S;jU ]ק][6 -][m9l, m, oagmDDWjc -|OфMv2%_6=93tjcJWrA#-  8" wm^!'6 o"SF2"ky;!#K5#?mQ" 8 ;`5 ] -M[!%k7N/SۑcFK e{aA]7ŗU-dž1YT;!b7 Wf tc g| - &m_ l!dZ? э q_a"z@6F! h :] 3:_L$U i"mzUqFD - Qg#")Go##"( awYs><"6;EU8 ms@8_+\kYAOy8QyA7$}Aq  /< 'rM 1g$N$j0,"9  R45 C6MD" + :4l1nm7/nO(|=!. Wo.Qb%a; -0S( ((! 8O"p,(ERWT˗8#.s1%%S1&Z\x*W!Ba~SӜbш͐Md׭mtLDž9 --'3ϟ&̓squIm<[n [7uh>ɩ@/"iN?@ :7 -r ׍[6 $m !>8We9B>85>: C5S#q"s''@u/"p4!9_?"PYŇYj ,!_-58( Wly[7K˥kӕmP!eB˒^ h0e חf -8Y -Ln V = :C -Ni"}( 6PM7x Æ O!Y5M ! !7l C9 ! E7$F97N83N#lK7a ,` a  -9;9{Z#b8< -L5\ m!0 gS W _K "7?S0D/&6"K+%#n -$Q G -!;DEGg$#%+"j"  @ _Mz89eAG;`" -K7)xa>p"V ːZ,q"$ &z6A ˃a8jË́"1%{_C:=w_-(!$I73!ˁH`.ѩGa+ρӞ -a;9 J5943w3 -Rt2=%;p)# &? 9B[NRw7=5L; -h -V׍_M,r hO~".O"S Y>OGÎLRxM݌gvE"%c%68mC A\LM]7g xP 5a{&26 ^t6PŠ$#391:I MӀ!o6k o c HQ[0 -9{) kh -E9 _,!U -5Y9gmD(8+$*Ea" -zɓ!'cZ#7I:1#c"o -D!f-"J 9 @$"(P$ -8% :94 <@$99#/)#O' N< A%"(L"4?3 D+$6l -'C : )Jl 7F -P>* 6 -4?4)9r 8%#(8@ -O4>r"E. &!Rh"n J!P0XE9|1vn 7>L*/"] - 6qF +I"#\0]9dY z!Ӓg(|]&I3 3 &KY V92I+")dOc׋ -l"*]fm6'zuZE 7Ky%S&u%EGS ,Ky02D9cWh' 5A9% 335  *ۜm^1s&7EE 3| '. 3ݬU#!}"݅ 5!? efDF9-9~ 6Q !77<> #DLO ;6Q :) _;k "SA</}*I^\y3v ;N - !"R8,0 Ǖz-n@ -: }e io&8&{[-Lo -. !+=% -  {B!8*V&F@d6QyA8539%+A4??9[8)E,3 !i9b57S>-/OM18Q;%:8"9 -8*,A* -R $95 -0G<:4!:0 4("0 J"4#"51a!P,A 9B060!*+6<B OB!')t)T-`-97<$ -~ Yg$rZJ <2 -4Je4-@f,N;:`p(zB~J\M\|E. _?%TØ=qIDA2L!6ABGA G H)C(oM!0Fe);8u+a -6*+8aUga0$"!]Dqr8Z96 FY5[.#?-O!%*%n -cP!C*!")Nk( - O+Fm6,WA#c!`$AK*%7;A+57skDQrw o!4M6  2P' -6IFy!%;2!"Q l 47Y). 3_A9("Y>qi #A,Xk 7%#O &J:!:#u79e.6" `~?5Q=#'d2+c#76p!A%A7W!+WU ^":U/0?;=; N+e 7VW8Ee!9PrUI#k8g -m/ Rl"Tb^v v%!)E"x3 тa") Ð#7P.y+l cAC2( "#2!ۛa P? 4 -$ # -3<3:8Uh V[L,6Rì iA+(q˅%#c7>5NUi}ў:? -UɞmE- ).8 -;(I8U6#NY 3890I 9(0T -Q1 - Ǧo3 4?%X#uf/"φ -$|`/#U%*C)+ ) ^!O?$ 7{8 ^K $y7 -.c7wK0 l' -X)!*{b9'Z!."C  F G7i  ; 3 }! 8x7A \ x8!z99s" E.7B[7|! E55!=8y#O!&7GM6V!P $b1X?.Q#&# 6ϭ"6]g"XS;P$? 07>(/9Z+!ɛ[& < aRK0c!g$_"<  bHxO -\" !6CZg )P! *J. (/Ji  !6$(%*K:$<%0 ő + *Hg#ŐK  {gN%T # -mU -*n E4%:e : $N,B'"9")B; !J7<{ k@FM#YK.C":,##57'%M34V;љI(#5N .'Y9V -N3N?M%B@u."`= E. -E 2pp՞ h><17QaP-? -[T}%8 )9:thkۃ=3" 7* *5OA%G# 9( ( 9 >#.7 8N '"9` -5 -1 6% M" / O$61"#&2 #!#(#("" &H 7$ #! 92 (#D,# #"- 0 "(4.99%0!_?K]1wɗYbJTn -hkr!X5gIt(!4*{e80T-0 a&3a-(VU 17*&/>"X,%!1Pb( 81,"0Q- 4 1+ C 0=626"#P_D/66 --~  b_1 W& E:(#J "'/&*) ( E3rא]zm!!c}<\ W 1K=1 ("1JM$%OB˯=hVsk#p/BՋX2K41CGFǐ;?A9]G%3":; : ( #T"N<"a) 8' 6 +'( "mL9 -!=WTVXD@2!+"$Kt:$<=5)"+A6>EK s3zc/ ::' 2 -08}!j&D ]~ J#*f5\ -4D/P:?mG "%,-F$?8b8-P 655: !/o|263CDG67. 1R L. 8q78 48b@KAW#/>"/7 -#E+ ?1K 6"qQ%tU:->aӚߢ&+ -%o)AA !1@M&@>9 %/O@#3.D(&#E3[:,77:G8{":=%G8 7 E?<64%# 8 !x%yRHJN 0 -HOcL!# -48= -!F)57va0DQ] ]a3Uq@hn "piÑ!)B~ioSAAGIASA)veQG#@EK^Q=a|>oCY8un+{mQP w!9?[7N}!oL?.OEW y_37lF_E#VDQ*e,0!2kSEWX -LwD9La>@S6l|kn"!   $om7#Q˔[Q -Mǐ([fZ-V\Ӌx(J7كzRt׃=PL\=&87 dӊW# .P ` ?K"> -<"E$YE6#7+P #5pF=*|(th> , AQ!a4 -P &%p/ - G HVw# FC *7>9 %""Bq9]"o7$Xv #_ 4q0 !lB|(x4"33ՄVB['Q!J+b(PfՄ4uM5~R4X6=P\W,Q\xYQJJ -a ^&)V;L3a($,A: @C # -6:צu\H-y*no&уٌ ӫٞ.|ǟ^C ͤ?@7'h(ˍtӂ -QA %t 4iLQa۪KP@mT*OA]'$ Jh \7/aˊhQ8>IE V$K@U: -Hav7M`aMH>r[ ;`6d&"< ?U%!95a!eA# -*I_:`gJ>qBϊQ ~D4TX˄t> -zVɤ^@BxDpm*Ǭ -J`͖%_.Xg/4S ǐ!Z&W T mY>x51Sr?d iD>@w3 !#*0";UN= / A Z* - - -l,9'@gݎ]JMQc {s:!c.37S8b r -nF*+t# 8-~ }תeO";s'`c\D՚&A&f??@(CT0'D(*fx%jx(@-M'ךj{N7 B7 _Q-/ : ~ #r53e% ^;{ 5s@S+/чaDx o=n4ը9h Y5۩ra`k# N -LlO$dq9]6o)@ -I== o q!!no98%Q+E9# C! %+#&R -<75D'$+@0 ?q"  (E7!0@%M'03# (J=9 e M -W#'K@3;A L0 g2?!5A+Q WT")8 "D4?! J/DT!(%` h( -R )9 ."=-# ,M C% *!< +"80%<L9&/$6< -L*5!8 )+ &:!@#!@% -"Q^4u<5sgm(R[ϘeEO`4e?# aC'\c~R>/&gAIb%[>:G4R65_>TI7Wl 08W#MXeD1Dvفo? nn? AGAA!AQNoVV=4U9azk8R' - -Y"*0@ AI:4" =07Sh/2>)+?&+b) (.: _a Z8) &UG)Z,:61e)f)b1K)D&F' `4l_Y͓s -NW Z+ ]5QQ '0DN -nY -%#*'0# . 9;??C:0+8$@Ib 1O:HJK'G?E I! \ɲ,E;#aX*#K -w9=óBW9I#BSm$"&;!\ !TF -T&:6 a#' E-  9(S )k"?1(C'"69"0 "=#@(oi d 1?7K K= I_%8Ox .a!m2NdLћk2,`NÒ ݥg{ReZONE>7g/6ݞ^ ba9  U/y{ 17:+ ߚ -=#~ۋW  e 9(c;M Z%ՒB "7ǒ16i# ;4M  u4v5E8 -~'H7 -!2L\Uۘ  r7088LӒSj#l j3(ncL!-83}4Ձ at4#]ղ{}5 >Mk4c@[7 -?ZZO? %4_IP;,8 S7#!i$[--*"$A67J]D7UJc$> 8m)908! ap $[l]AAe#Y9 6Ai[ q5D"#"q|o cwa,tD97n8CW6ۍS6WS9b S?mD/[L!`&1(2 !Q!IbZ8J9f10&y7G [ - g%A }(bc!;!"zgNa!   a7bee #"? -5gէJ JA]#t!w 9cӧ#{_moU -Mnl_S$;+x/_ 0uQ!/8O(?W$nW|-@ -6k9/ v[i?,n͈٢s ]fi 8/W 9q!!i Q#S -7P( B8i RSm 1a -8\  k5%/J cB :6n #Wm' ߒwa# q%!Qkf#YKɨig# .x-.$,e508 9o7V7j8 B-KLW U! -+{S;jU ]ק][6 -][m9l, m, oagmDDWjc -|OфMv2%_6=93tjcJWrA#-  8" wm^!'6 o"SF2"ky;!#K5#?mQ" 8 ;`5 ] -M[!%k7N/SۑcFK e{aA]7ŗU-dž1YT;!b7 Wf tc g| - &m_ l!dZ? э q_a"z@6F! h :] 3:_L$U i"mzUqFD - Qg#")Go##"( awYs><"6;EU8 ms@8_+\kYAOy8QyA7$}Aq  /< 'rM 1g$N$j0,"9  R45 C6MD" + :4l1nm7/nO(|=!. Wo.Qb%a; -0S( ((! 8O"p,(ERWT˗8#.s1%%S1&Z\x*W!Ba~SӜbш͐Md׭mtLDž9 --'3ϟ&̓squIm<[n [7uh>ɩ@/"iN?@ :7 -r ׍[6 $m !>8We9B>85>: C5S#q"s''@u/"p4!9_?"PYŇYj ,!_-58( Wly[7K˥kӕmP!eB˒^ h0e חf -8Y -Ln V = :C -Ni"}( 6PM7x Æ O!Y5M ! !7l C9 ! E7$F97N83N#lK7a ,` a  -9;9{Z#b8< -L5\ m!0 gS W _K "7?S0D/&6"K+%#n -$Q G -!;DEGg$#%+"j"  @ _Mz89eAG;`" -K7)xa>p"V ːZ,q"$ &z6A ˃a8jË́"1%{_C:=w_-(!$I73!ˁH`.ѩGa+ρӞ -a;9 J5943w3 -Rt2=%;p)# &? 9B[NRw7=5L; -h -V׍_M,r hO~".O"S Y>OGÎLRxM݌gvE"%c%68mC A\LM]7g xP 5a{&26 ^t6PŠ$#391:I MӀ!o6k o c HQ[0 -9{) kh -E9 _,!U -5Y9gmD(8+$*Ea" -zɓ!'cZ#7I:1#c"o -D!f-"J 9 @$"(P$ -8% :94 <@$99#/)#O' N< A%"(L"4?3 D+$6l -'C : )Jl 7F -P>* 6 -4?4)9r 8%#(8@ -O4>r"E. &!Rh"n J!P0XE9|1vn 7>L*/"] - 6qF +I"#\0]9dY z!Ӓg(|]&I3 3 &KY V92I+")dOc׋ -l"*]fm6'zuZE 7Ky%S&u%EGS ,Ky02D9cWh' 5A9% 335  *ۜm^1s&7EE 3| '. 3ݬU#!}"݅ 5!? efDF9-9~ 6Q !77<> #DLO ;6Q :) _;k "SA</}*I^\y3v ;N - !"R8,0 Ǖz-n@ -: }e io&8&{[-Lo -. !+=% -  {B!8*V&F@d6QyA8539%+A4??9[8)E,3 !i9b57S>-/OM18Q;%:8"9 -8*,A* -R $95 -0G<:4!:0 4("0 J"4#"51a!P,A 9B060!*+6<B OB!')t)T-`-97<$ -~ Yg$rZJ <2 -4Je4-@f,N;:`p(zB~J\M\|E. _?%TØ=qIDA2L!6ABGA G H)C(oM!0Fe);8u+a -6*+8aUga0$"!]Dqr8Z96 FY5[.#?-O!%*%n -cP!C*!")Nk( - O+Fm6,WA#c!`$AK*%7;A+57skDQrw o!4M6  2P' -6IFy!%;2!"Q l 47Y). 3_A9("Y>qi #A,Xk 7%#O &J:!:#u79e.6" `~?5Q=#'d2+c#76p!A%A7W!+WU ^":U/0?;=; N+e 7VW8Ee!9PrUI#k8g -m/ Rl"Tb^v v%!)E"x3 тa") Ð#7P.y+l cAC2( "#2!ۛa P? 4 -$ # -3<3:8Uh V[L,6Rì iA+(q˅%#c7>5NUi}ў:? -UɞmE- ).8 -;(I8U6#NY 3890I 9(0T -Q1 - Ǧo3 4?%X#uf/"φ -$|`/#U%*C)+ ) ^!O?$ 7{8 ^K $y7 -.c7wK0 l' -X)!*{b9'Z!."C  F G7i  ; 3 }! 8x7A \ x8!z99s" E.7B[7|! E55!=8y#O!&7GM6V!P $b1X?.Q#&# 6ϭ"6]g"XS;P$? 07>(/9Z+!ɛ[& < aRK0c!g$_"<  bHxO -\" !6CZg )P! *J. (/Ji  !6$(%*K:$<%0 ő + *Hg#ŐK  {gN%T # -mU -*n E4%:e : $N,B'"9")B; !J7<{ k@FM#YK.C":,##57'%M34V;љI(#5N .'Y9V -N3N?M%B@u."`= E. -E 2pp՞ h><17QaP-? -[T}%8 )9:thkۃ=3" 7* *5OA%G# 9( ( 9 >#.7 8N '"9` -5 -1 6% M" / O$61"#&2 #!#(#("" &H 7$ #! 92 (#D,# #"- 0 "(4.99%0!_?K]1wɗYbJTn -hkr!X5gIt(!4*{e80T-0 a&3a-(VU 17*&/>"X,%!1Pb( 81,"0Q- 4 1+ C 0=626"#P_D/66 --~  b_1 W& E:(#J "'/&*) ( E3rא]zm!!c}<\ W 1K=1 ("1JM$%OB˯=hVsk#p/BՋX2K41CGFǐ;?A9]G%3":; : ( #T"N<"a) 8' 6 +'( "mL9 -!=WTVXD@2!+"$Kt:$<=5)"+A6>EK s3zc/ ::' 2 -08}!j&D ]~ J#*f5\ -4D/P:?mG "%,-F$?8b8-P 655: !/o|263CDG67. 1R L. 8q78 48b@KAW#/>"/7 -#E+ ?1K 6"qQ%tU:->aӚߢ&+ -%o)AA !1@M&@>9 %/O@#3.D(&#E3[:,77:G8{":=%G8 7 E?<64%# 8 !x%yRHJN 0 -HOcL!# -48= -!F)57va0DQ] ]a3Uq@hn "piÑ!)B~ioSAAGIASA)veQG#@EK^Q=a|>oCY8un+{mQP w!9?[7N}!oL?.OEW y_37lF_E#VDQ*e,0!2kSEWX -LwD9La>@S6l|kn"!   $om7#Q˔[Q -Mǐ([fZ-V\Ӌx(J7كzRt׃=PL\=&87 dӊW# .P ` ?K"> -<"E$YE6#7+P #5pF=*|(th> , AQ!a4 -P &%p/ - G HVw# FC *7>9 %""Bq9]"o7$Xv #_ 4q0 !lB|(x4"33ՄVB['Q!J+b(PfՄ4uM5~R4X6=P\W,Q\xYQJJ -a ^&)V;L3a($,A: @C # -6:צu\H-y*no&уٌ ӫٞ.|ǟ^C ͤ?@7'h(ˍtӂ -QA %t 4iLQa۪KP@mT*OA]'$ Jh \7/aˊhQ8>IE V$K@U: -Hav7M`aMH>r[ ;`6d&"< ?U%!95a!eA# -*I_:`gJ>qBϊQ ~D4TX˄t> -zVɤ^@BxDpm*Ǭ -J`͖%_.Xg/4S ǐ!Z&W T mY>x51Sr?d iD>@w3 !#*0";UN= / A Z* - - -l,9'@gݎ]JMQc {s:!c.37S8b r -nF*+t# 8-~ }תeO";s'`c\D՚&A&f??@(CT0'D(*fx%jx(@-M'ךj{N7 B7 _Q-/ : ~ #r53e% ^;{ 5s@S+/чaDx o=n4ը9h Y5۩ra`k# N -LlO$dq9]6o)@ -I== o q!!no98%Q+E9# C! %+#&R -<75D'$+@0 ?q"  (E7!0@%M'03# (J=9 e M -W#'K@3;A L0 g2?!5A+Q WT")8 "D4?! J/DT!(%` h( -R )9 ."=-# ,M C% *!< +"80%<L9&/$6< -L*5!8 )+ &:!@#!@% -"Q^4u<5sgm(R[ϘeEO`4e?# aC'\c~R>/&gAIb%[>:G4R65_>TI7Wl 08W#MXeD1Dvفo? nn? AGAA!AQNoVV=4U9azk8R' - -Y"*0@ AI:4" =07Sh/2>)+?&+b) (.: _a Z8) &UG)Z,:61e)f)b1K)D&F' `4l_Y͓s -NW Z+ ]5QQ '0DN -nY -%#*'0# . 9;??C:0+8$@Ib 1O:HJK'G?E I! \ɲ,E;#aX*#K -w9=óBW9I#BSm$"&;!\ !TF -T&:6 a#' E-  9(S )k"?1(C'"69"0 "=#@(oi d 1?7K K= I_%8Ox .a!m2NdLћk2,`NÒ ݥg{ReZONE>7g/6ݞ^ ba9  U/y{ 17:+ ߚ -=#~ۋW  e 9(c;M Z%ՒB "7ǒ16i# ;4M  u4v5E8 -~'H7 -!2L\Uۘ  r7088LӒSj#l j3(ncL!-83}4Ձ at4#]ղ{}5 >Mk4c@[7 -?ZZO? %4_IP;,8 S7#!i$[--*"$A67J]D7UJc$> 8m)908! ap $[l]AAe#Y9 6Ai[ q5D"#"q|o cwa,tD97n8CW6ۍS6WS9b S?mD/[L!`&1(2 !Q!IbZ8J9f10&y7G [ - g%A }(bc!;!"zgNa!   a7bee #"? -5gէJ JA]#t!w 9cӧ#{_moU -Mnl_S$;+x/_ 0uQ!/8O(?W$nW|-@ -6k9/ v[i?,n͈٢s ]fi 8/W 9q!!i Q#S -7P( B8i RSm 1a -8\  k5%/J cB :6n #Wm' ߒwa# q%!Qkf#YKɨig# .x-.$,e508 9o7V7j8 B-KLW U! -+{S;jU ]ק][6 -][m9l, m, oagmDDWjc -|OфMv2%_6=93tjcJWrA#-  8" wm^!'6 o"SF2"ky;!#K5#?mQ" 8 ;`5 ] -M[!%k7N/SۑcFK e{aA]7ŗU-dž1YT;!b7 Wf tc g| - &m_ l!dZ? э q_a"z@6F! h :] 3:_L$U i"mzUqFD - Qg#")Go##"( awYs><"6;EU8 ms@8_+\kYAOy8QyA7$}Aq  /< 'rM 1g$N$j0,"9  R45 C6MD" + :4l1nm7/nO(|=!. Wo.Qb%a; -0S( ((! 8O"p,(ERWT˗8#.s1%%S1&Z\x*W!Ba~SӜbш͐Md׭mtLDž9 --'3ϟ&̓squIm<[n [7uh>ɩ@/"iN?@ :7 -r ׍[6 $m !>8We9B>85>: C5S#q"s''@u/"p4!9_?"PYŇYj ,!_-58( Wly[7K˥kӕmP!eB˒^ h0e חf -8Y -Ln V = :C -Ni"}( 6PM7x Æ O!Y5M ! !7l C9 ! E7$F97N83N#lK7a ,` a  -9;9{Z#b8< -L5\ m!0 gS W _K "7?S0D/&6"K+%#n -$Q G -!;DEGg$#%+"j"  @ _Mz89eAG;`" -K7)xa>p"V ːZ,q"$ &z6A ˃a8jË́"1%{_C:=w_-(!$I73!ˁH`.ѩGa+ρӞ -a;9 J5943w3 -Rt2=%;p)# &? 9B[NRw7=5L; -h -V׍_M,r hO~".O"S Y>OGÎLRxM݌gvE"%c%68mC A\LM]7g xP 5a{&26 ^t6PŠ$#391:I MӀ!o6k o c HQ[0 -9{) kh -E9 _,!U -5Y9gmD(8+$*Ea" -zɓ!'cZ#7I:1#c"o -D!f-"J 9 @$"(P$ -8% :94 <@$99#/)#O' N< A%"(L"4?3 D+$6l -'C : )Jl 7F -P>* 6 -4?4)9r 8%#(8@ -O4>r"E. &!Rh"n J!P0XE9|1vn 7>L*/"] - 6qF +I"#\0]9dY z!Ӓg(|]&I3 3 &KY V92I+")dOc׋ -l"*]fm6'zuZE 7Ky%S&u%EGS ,Ky02D9cWh' 5A9% 335  *ۜm^1s&7EE 3| '. 3ݬU#!}"݅ 5!? efDF9-9~ 6Q !77<> #DLO ;6Q :) _;k "SA</}*I^\y3v ;N - !"R8,0 Ǖz-n@ -: }e io&8&{[-Lo -. !+=% -  {B!8*V&F@d6QyA8539%+A4??9[8)E,3 !i9b57S>-/OM18Q;%:8"9 -8*,A* -R $95 -0G<:4!:0 4("0 J"4#"51a!P,A 9B060!*+6<B OB!')t)T-`-97<$ -~ Yg$rZJ <2 -4Je4-@f,N;:`pzB~J\M\|E. _?%TØ=qIDA2L!6ABGA G H)C(oM!0Fe);8u+a -6*+8aUga0$"!]Dqr8Z96 FY5[.#?-O!%*%n -cP!C*!")Nk( - O+Fm6,WA#c!`$AK*%7;A+57skDQrw o!4M6  2P' -6IFy!%;2!"Q l 47Y). 3_A9("Y>qi #A,Xk 7%#O &J:!:#u79e.6" `~?5Q=#'d2+c#76p!A%A7W!+WU ^":U/0?;=; N+e 7VW8Ee!9PrUI#k8g -m/ Rl"Tb^v v%!)E"x3 тa") Ð#7P.y+l cAC2( "#2!ۛa P? 4 -$ # -3<3:8Uh V[L,6Rì iA+(q˅%#c7>5NUi}ў:? -UɞmE- ).8 -;(I8U6#NY 3890I 9(0T -Q1 - Ǧo3 4?%X#uf/"φ -$|`/#U%*C)+ ) ^!O?$ 7{8 ^K $y7 -.c7wK0 l' -X)!*{b9'Z!."C  F G7i  ; 3 }! 8x7A \ x8!z99s" E.7B[7|! E55!=8y#O!&7GM6V!P $b1X?.Q#&# 6ϭ"6]g"XS;P$? 07>(/9Z+!ɛ[& < aRK0c!g$_"<  bHxO -\" !6CZg )P! *J. (/Ji  !6$(%*K:$<%0 ő + *Hg#ŐK  {gN%T # -mU -*n E4%:e : $N,B'"9")B; !J7<{ k@FM#YK.C":,##57'%M34V;љI(#5N .'Y9V -N3N?M%B@u."`= E. -E 2pp՞ h><17QaP-? -[T}%8 )9:thkۃ=3" 7* *5OA%G# 9( ( 9 >#.7 8N '"9` -5 -1 6% M" / O$61"#&2 #!#(#("" &H 7$ #! 92 (#D,# #"- 0 "(4.99%0!_?K]1wɗYbJTn -hkr!X5gIt(!4*{e80T-0 a&3a-(VU 17*&/>"X,%!1Pb( 81,"0Q- 4 1+ C 0=626"#P_D/66 --~  b_1 W& E:(#J "'/&*) ( E3rא]zm!!c}<\ W 1K=1 ("1JM$%OB˯=hVsk#p/BՋX2K41CGFǐ;?A9]G%3":; : ( #T"N<"a) 8' 6 +'( "mL9 -!=WTVXD@2!+"$Kt:$<=5)"+A6>EK s3zc/ ::' 2 -08}!j&D ]~ J#*f5\ -4D/P:?mG "%,-F$?8b8-P 655: !/o|263CDG67. 1R L. 8q78 48b@KAW#/>"/7 -#E+ ?1K 6"qQ%tU:->aӚߢ&+ -%o)AA !1@M&@>9 %/O@#3.D(&#E3[:,77:G8{":=%G7 E?<64%# 8 !x%yRHJN 0 -HOcL!# -48= -!F)57va0DQ] ]a3Uq@hn "piÑ!)B~ioSAAGIASA)veQG#@EK^Q=a|>oCY8un+{mQP w!9?[7N}!oL?.OEW y_37lF_E#VDQ*e,0!2kSEWX -LwD9La>@S6l|kn"!   $om7#Q˔[Q -Mǐ([fZ-V\Ӌx(J7كzRt׃=PL\=&87 dӊW# .P ` ?K"> -<"E$YE6#7+P #5pF=*|(th> , AQ!a4 -P &%p/ - G HVw# FC *7>9 %""Bq9]"o7$Xv #_ 4q0 !lB|(x4"33ՄVB['Q!J+b(PfՄ4uM5~R4X6=P\W,Q\xYQJJ -a ^&)V;L3a($,A: @C # -6:צu\H-y*no&уٌ ӫٞ.|ǟ^C ͤ?@7'h(ˍtӂ -QA %t 4iLQa۪KP@mT*OA]'$ Jh \7/aˊhQ8>IE V$K@U: -Hav7M`aMH>r[ ;`6d&"< ?U%!95a!eA# -*I_:`gJ>qBϊQ ~D4TX˄t> -zVɤ^@BxDpm*Ǭ -J`͖%_.Xg/4S ǐ!Z&W T mY>x51Sr?d iD>@w3 !#*0";UN= / A Z* - - -l,9'@gݎ]JMQc {s:!c.37S8b r -nF*+t# 8-~ }תeO";s'`c\D՚&A&f??@(CT0'D(*fx%jx(@-M'ךj{N7 B7 _Q-/ : ~ #r53e% ^;{ 5s@S+/чaDx o=n4ը9h Y5۩ra`k# N -LlO$dq9]6o)@ -I== o q!!no98%Q+E9# C! %+#&R -<75D'$+@0 ?q"  (E7!0@%M'03# (J=9 e M -W#'K@3;A L0 g2?!5A+Q WT")8 "D4?! J/DT!(%` h( -R )9 ."=-# ,M C% *!< +"80%<L9&/$6< -L*5!8 )+ &:!@#!@% -"Q^4u<5sgm(R[ϘeEO`4e?# aC'\c~R>/&gAIb%[>:G4R65_>TI7Wl 08W#MXeD1Dvفo? nn? AGAA!AQNoVV=4U9azk8R' - -Y"*0@ AI:4" =07Sh/2>)+?&+b) (.: _a Z8) &UG)Z,:61e)f)b1K)D&F' `4l_Y͓s -NW Z+ ]5QQ '0DN -nY -%#*'0# . 9;??C:0+8$@Ib 1O:HJK'G?E I! \ɲ,E;#aX*#K -w9=óBW9I#BSm$"&;!\ !TF -T&:6 a#' E-  9(S )k"?1(C'"69"0 "=#@(oi d 1?7K K= I_%8Ox .a!m2NdLћk2,`NÒ ݥg{ReZONE>7g/6ݞ^ ba9  U/y{ 17:+ ߚ -=#~ۋW  e 9(c;M Z%ՒB "7ǒ16i# ;4M  u4v5E8 -~'H7 -!2L\Uۘ  r7088LӒSj#l j3(ncL!-83}4Ձ at4#]ղ{}5 >Mk4c@[7 -?ZZO? %4_IP;,8 S7#!i$[--*"$A67J]D7UJc$> 8m)908! ap $[l]AAe#Y9 6Ai[ q5D"#"q|o cwa,tD9CW6ۍS6WS9b S?mD/[L!`&1(2 !Q!IbZ8J9f10&y7G [ - g%A }(bc!;!"zgNa!   a7bee #"? -5gէJ JA]#t!w 9cӧ#{_moU -Mnl_S$;+x/_ 0uQ!/8O(?W$nW|-@ -6k9/ v[i?,n͈٢s ]fi 8/W 9q!!i Q#S -7P( B8i RSm 1a -8\  k5%/J cB :6n #Wm' ߒwa# q%!Qkf#YKɨig# .x-.$,e508 9o7V7j8 B-KLW U! -+{S;jU ]ק][6 -][m9l, m, oagmDDWjc -|OфMv2%_6=93tjcJWrA#-  8" wm^!'6 o"SF2"ky;!#K5#?mQ" 8 ;`5 ] -M[!%k7N/SۑcFK e{aA]7ŗU-YT;!b7 Wf tc g| - &m_ l!dZ? э q_a"z@6F! h :] 3:_L$U i"mzUqFD - Qg#")Go##"( awYs><"6;EU8 ms@8_+\kYAOy8QyA7$}Aq  /< 'rM 1g$N$j0,"9  R45 C6MD" + :4l1nm7/nO(|=!. Wo.Qb%a; -0S( ((! 8O"p,(ERWT˗1%%S1&Z\x*W!Ba~SӜbш͐Md׭mtLDž9 --'3ϟ&̓squIm<[n [7uh>ɩ@/"iN?@ :7 -r ׍[6 $m !>8We9B>85>: C5S#q"s''@u/"p4!9_?"PYŇYj ,!_-58( Wly[7K˥kӕmP!eB˒^ h0e חf -8Y -Ln V = :C -Ni"}( 6PM7x Æ O!Y5M ! !7l C9 ! E7$F97N83N#lK7a ,` a  -9;9{Z#b8< -L5\ m!0 gS W _K "7?S0D/&6"K+%#n -$Q G -!;DEGg$#%+"j"  @ _Mz89eAG;`" -K7)xa>p"V ːZ,q"$ &z6A ˃a8jË́"1%{_C:=w_-(!$I73!ˁH`.ѩGa+ρӞ -a;9 J5943w3 -Rt2=%;p)# &? 9B[NRw7=5L; -h -V׍_M,r hO~".O"S Y>OGÎLRxM݌gvE"%c%68mC A\LM]7g xP 5a{&26 ^t6PŠ$#391:I MӀ!o6k o c HQ[0 -9{) kh -E9 _,!U -5Y9gmD(8+$*Ea" -zɓ!'cZ#7I:1#c"o -D!f-"J 9 @$"(P$ -8% :94 <@$99#/)#O' N< A%"(L"4?3 D+$6l -'C : )Jl 7F -P>* 6 -4?4)9r 8%#(8@ -O4>r"E. &!Rh"n J!P0XE9|1vn 7>L*/"] - 6qF +I"#\0]9dY z!Ӓg(|]&I3 3 &KY V92I+")dOc׋ -l"*]fm6'zuZE 7Ky%S&u%EGS Ky02D9cWh' 5A9% 335  *ۜm^1s&7EE 3| '. 3ݬU#!}"݅ 5!? efDF9-9~ 6Q !77<> #DLO ;6Q :) _;k "SA</}*I^\y3v ;N - !"R8,0 Ǖz-n@ -: }e io&8&{[-Lo -. !+=% -  {B!8*V&F@xх~Bma?m"]Da%HK8P8@іq 6O'c8.OdFD8i p!@њ& "9 T%Rǜon -NQ#*[U)Fl= j!WpYסg4fI5_ W){ŅVqD$a $&۔F;DF,\g2Z{F*%(c A>&f??@(CT0'D(*fx%jx(@-PM'ך{NW7 B7 Q-/ m" : ~%yS!269 I8#r53e% ^;{ 5> sEc@S+/!чaDx oۡQ=n4ը9h Y5۩ra`k# N -LlO$dq9]6o)@ -I== o q!!no98%Q+E9# C! %+#&R -<75D'$+@0 ?q"  (E7!0@%"M'03# (J=9 e M -W#'K;A L0 g2?!5A+Q WT")8 "D4?!)C J/DT!(%` h( -R )9 ."=-# ,M C% *!< +"80%<L9&/$6< -L*5!8 )+ &:!@#!@% -"Q^4u6;g<5sgm(R[ϘeEO`4e?# aC'\c~R>/&gAIb%[>:G4Rń65_>TI7Wl ;T08W#MXeD1Dvفo? nn? AGAA!AQNoVV=4U9azk8R' - -Y"*0@ AI:4" =07Sh/2>)+?&+b) (.: _-a Z8) &UG)Z,:61e)f)b1K)D&F' `4l_Y͓s -NW Z+ ]5QQ '0DN -nY -%#*'0# . 9;??C:0+8$@Ib 1O:HJK'G?E I! \ɲ,E;#aX*#K -w9=óBW9I#BSm$"&;!\ !TF -T&:6 a#' WE-  9(B4S )k"?1(C+'"69"0 "=%L#@(oi d 1?7K K= I_%8Ox .a!m2NdLћk2,`NÒ ݥg{ReZONE>7g/6ݞ^ ba9  U/y{ 17:+ ߚ -=#~ۋW  e 9(c;M Z%ՒB "7ǒ16i# ;4M  u4v5E8 -~'H7 -!2L\Uۘ  088LӒSj#l j3(ncL!-83}084Ձ at4#]ղ{}5 >Mk4c@[7 -?ZZO? %4_IP;,8 S "pO7#!Ai$[q--*"7 -$A67J]D7UJc$> 8m)908! ap9kd $[l]AAe#Y9 a! -6Aim -e[ { ";q5D"#"q|o cwa,tD9oSCW6ۍS6WS9b S?mD/[L!`&1(2# !Q!IbZ8J9f10&y7G [ - g%A }(bc!;!"zgNa!   a7beeT #"? -5gէJ JA]#t!wӧ#{_moU -Mnl_S$;+x/_ 0uQ!/8O(?W$nW|-@ -6k9/ v[[i?,n͈٢s ]~fi 8/W 9q!!i Q#S -7יUP_( 0Ra B8i RSm 1a -8\  ߧk5%/J cB :6n #Wm' ߒwa# q%!Qkf#YKɨig# .x-.$,e5508 9o7V7j8 B-KLW U! -+{S;jU ]ק][6 -T8 _][m9l, m, oagmDDWjc -|OфMv2%_6=93tjcJWrA#-  8" wmYc^!'6 o"SF2"ky;!#K5#?mQ" 8 ;`5 ] -M[!%k7N/SۑcFK e{aA]7ŗU-YT;!b7 Wf tc g| - &m_ l!)dZ? э q_a"z@6F! h :] 3:_L$U i"mzUqFD - Qg#")Go##"( awYs><"6(_EU8 ms@8_+\kYAOy8QyA7$}A  /< 'rM 1gt$N$j0,"9  R45 C6MD" + c:4l1nm7/nO(|!. Wo.Qa; -0S( ((! 8O"p -\3,(ERWT˗8#.s1%%S1&ZU\x*W!82Ba~SӜbш͐MdmtLoDž9 --'3ϟ&ˏ̓WsqP urτIm<[n H[7uh>ɩ@/"iN?@ :7 -r ׍[6 $m !>8We9B>85>: C5S#q"s''@u/"p4!9_?"PYŇYj ",!_-58( Wly[7)zK]їe ˥kӕmP!eB˒^ h0e חf -8Y -VLn V = :C -||Ni"}["( 6PM7xeM !Æ O!Y5M ! !7l C9 ! ߋ#E7w7$F973N#lK7a ,` a v9 -9;9Z#b8< -L5\ m!5u:0 gS W _K "7?SєD/&6"K+%#n -/ C$Q G -!;F#@DEGg$j!#%+"j" _Z  @ _Mz89eA!G;`"7 -K7)xa>z"p"+#9V ː9Z,q"$ &zt6&A ˃a8jË́"1%{_C:=w_-(!$I73G!ˁH`.ѩGa+ρӞ -Q W%fۭ9Bݪnc{ 2Y*&YmGŨ ?rWMkU#oQl&Y׉UcJoAˤp'oi[&h+~kKٲyRcDI1lE#j-;:16uzc60#OŢE-D)C$ ϋ3`t5ݲfs5.i/wZ@/>a;9d--m% J5943w3 -R#"#t2=%;p)# &? 9BR=;V׍ hO -~".O"S Y>O]OmGÎLRxM݌gvE%C A Hg xP 5@ Ma{&26 ^t6PŠ$#39S (p Mo6k o c HQ[ -9{) kh -E9 _,!U -5Y9gmD(8+$*Ea" -zɓ!'cZ#7I:1#c"o -D!f-"J 9 @$"(P$ -8% :94 <@$99#/)#O' N< A%"(L"4?3 D+$6CG*7l -'C : )Jl 7F -P>* 6A1 -4?4! ?E78 )9r 8%#(8@ -O4>r"E. &!R)D"h"n J!P0XE9|1 7>L*"] - 6 +BɃ -9 IU"#\0&]9dY z?@!IjӒg(|]&I3 3 &KY V ; -692I+")dOc׋ -l"*]fm6 'zuZE ۳7Ky%S&u%EGS Vy02D9cWh' 5A9 % 335  *1s&7EE 3| '. 3ݬU#!}"݅ 5!? efDF9-9~ 6QA"" !77<> #DLO ;6Q :) _;k "SA</}*I^\y3v ;N - !"R8U,0 ǕZz-n@ -1y: }e io&8& {[-Lo -. !+=% -  {sh B!8*V&F@P[7 -M 95%]cD6Qyͬn15}A85_'Ej339%+Am4??9[E,38) !iS>-9b57WD3 -/~8Q;%OM1:8"r"7 09 -8*,A* -3 ;R $* #95 -0 PG<:4!K. Q"("0:0 4 B5 *&A J"4#"51Pa!0D ,A 9,': %84BD.B06 A/0!*[#+6< M".%D%B OB!')t)T-2+9`-_977(#<$ -~ y"Yg$rfJZ +q;<Q2c -J44pe-@f,NA[{\;z:`p(zLB~J\M|E. _?%TØ=jqI|A2Lc#J-!6Ae!NG BGA (oH)C0FeM!+a -6*);8uga0+8aU5[.$"!]DZ96 qr8FY)i #?&5; )]8-O!%*$G@""}%_K"P!C,@] -60a!$O g%n -c&"7 L# #2*!")Nk( - O 2P+Fm6,WA#c!` -BY %7;A$AK*+57srw kDQo!41@G -U%m7-:M6 %#O ' -6IFy!%; {] 8e>/ $M7AY7 -*@Y =)a -6*O&VW  -!?, #em2!"Q *Jl 47Yc@6). 3' {N _A9("Y>qi #A,Xk 7**U &J:!:e.6#u79" `?5Q -gU/OY)=]Uy=#'d2+c;?M6#76p!A%A7W!+WU :U/0?;"P"9>8V+e 7=; NsY* m8VWEe!כG rU I#k:8; -g/m "mlR|Tt^b vv%!)E - &DŽ\G^ a.K7P +8|y+C5lY%e=7O #2("#2'6b!4? ٕۛa >gUh < -3% -$ #3:8O n;=!  > V[L3,6Rì si0A+(q˅ &f]#%T # -mUm -\0&*n E4%: $Ne :1'9"ɀ )B; !J7<'7:{ @Z(:B 7'F#K.C"Y:,##5)9:!%3 *<xvHfN !?M%."9uB@ ͑= `E. 6 3G -E 2p!՞9Ap h? -U17QEa08P-z?F}%8& =thkۃ3" 7O* *50!$ >#.A%G# 9( ( 97 8#3#N ix'"9` C5" -5 -18 2#!#( 6% M"$6 / O1")88#&4' 2 );$ ##(""#;1 &H 7!; 3" " (#D! 92#"8 5 - 0 ,#$ " -6+ #"-"(4 -696 ' -:% :2 .99 7 1 M  5#" , 6%0!_&K1w]NoV7 -o -ab1 -Y8ǐ -4D/ o$A9;?]G% +( #: 3W!":;  !R'3"!7."aT"@ -N<4Q) 8' 6,f'( "mL9 -!=VXWT eD@2!+"$K<=5t+#:$::')"+A6>EK sz3c/ @08  2 -   J#}!j&DG) ]$pe7 M~5\*fP"%mG :?{ m$?8,-F8 > !/ob8655-P `:J|GDG6263CR7. 1T 8q7 L.h/*48x@Kb -b5D"qQAWC#/>" ?1/7) 6)@7? -#E+K 6e){ hk !n' -[!IX5D}ˀUI2 t%(G! \.Q 0T &;-0&3-(Va:=  46(390()a 0O/">) -!'b( 1P81,"0 \5x -7Q- 4 1+ V.!m 26C 0E0)$=6Y426"#P 2K, _\4~ D/66 -- \(3V8 3/9=`)L_1 b} W&,P.O'( E:(Q1 #J4\ "'"4G"(a/&*T1) ( - +V,QW3 E3L(r+%U ->aӚ+ߢ& -M&%o)AA !1@ %/@>9 -%l$n/O@#3.)r&#ED(E(/ I #9 }2 -\ x (",1,K*#Ztݒ1) 28 -7 -POK$%7#+x}*{":G8S)Ki 'nKR>k! _8>";c*B04 m1S&K2Y7)B@nwc1GCS>(ыvm,kC0-QAo73 U2>^3 ]h "niSGIO~ioSA|UAA ncA)vEKeQGkA-#@Y8^Q=a|xK>oC!9 .u"K/P Qab!e7[FW L1U y./o(i?k"[+!1gu+\c27_^M , _&0;*,8 QTK ">@SA EW2kSLwDX -!IA9La&gk!I(T$I75o a  :%E?G8 7 4%<6+"HJ# 8 D !x7q%yRN 0 -  xHOc -48L!#P%"= -!F)57' LH˯=hcVC/ s&k a׆ՋBYw<'AC4Xf'2KDR@FZ1$ 45_/CB%" 4XI1=oאzՎ_M P]p9LѯA !m!]c1%#.Q -Mǐ(f[ɅZ-V\xMӋIr(8)J7كe0)%ţF~zLR=t׃PLǂq\=&8 d78IW# .P ` &O&?K" -8!>`+P% -<"E A$YE-F 6#=7+P f 7 #5p F=(t*|h 75> , AQ!P &a4 -%p - /N Gw# HVFC *74)(& ?]">9 %""Bq9{"o7$Xv #0 _ 4q!l^ ?7"B|(x&%If4"33U %ՄTB[V'Q1j!J+b4ufSJ(PՄ5~MX6R4=PPW\,Q\Q>YQxJJ ^ -aQ>P $KV -H9(U:@v76`aMH"[>r ;۪&_?( -QA /95s4qQ"#. s%cA.*k-6;g 5+W9>i b [mR[eEO# aC%;4e Y.Qg",+9:%[!:'Vc.$>UA &g/AIY uBO39 V4#a -E1U54x c-PYj(Q@]5#x N@; o@&E?n 8*I_"< 7J];M?U%!%\ MW8 95a!eA#+["# -:6k.^aB?lJ2 ~ 84TQ˄'T `*.l)GK%b -ip* -J/V .Jm$ ^<@V%BB?DWQ2W +X/4 2^!Z&T mY^>x} q5z1SrD? id"j3 !D>@w%;U#*0"N= - -l / A Z* -@g?2?,9'ݎMQc J]7{2zZ' 1!'r e] / -F  #8"-~ }.5!ת O" -*KB !D]%/ 37S8b ,>2Sj/5 AIU -Xo -8E3 TDQL=$iZ 2g/$[P7C- "Mg:X -n3, O(E! ;)% -, FF"W!@+$RCa 'mx,0 68FBWP""I]""a,%+8HPs!c/48 ͊ -"g/3$ #)I7V6$*~ -'(8: 4|8 DA"IP K]"L1$d-.  k< -L$R2W 68M p !@"1+טslO4&bC>I -Յ"J@j9Lw% +I7o(!%-n -1[6S-;#1-Q/) .R#p4W1 -3T+2]N*:Q.PG/3KI>h Z -V $d&bIIlF]E%;T$8'yDT)HFL,3UJ. "y(GE?;e24jPIZFiF*i%:$+!~ A>="J&fg3??o+@(C;:6@-T0'D(E(*fx% 1m3/,Dn7H8jx(5C&wNM['e[?jd3{WWJP 7/f *_`!Q- ө m" : ~%yuS!a=269+w I8#@K!Y4l(o ]M0"+S}#6&ko&53@B -%@v8 - ^;{7#m قa!#. 5 %sa&!kCQ/=ը:9xh ۩YxPySw # @{ -La@ ^O${ o7v)d q;89q@ -I== VQ+E9# %+#&C! ?7 5D'$R -<7a+@0 K-'-&7A7 -0-6 5?q"  (E75#G!0@%"%/F"M'03# (J=9 !nr#o h+q! -=6@-8@M -W#,b'Kg@3;A *5L0 2?!5A&:+Q "DT" W)84?!)C $m J/ CD8 PA!9&/$6T!(%`  [( - S=e47@$+:(A)8Y -86R >D AD daF"M Ak f65_# kA)1J!2J -PW>DTI7l *![--8W#;L)A[559c' - -Y"*0@ AI:4"7 =0Sh/2>)+?&+b) (.: 3)_-a Z8) & AU (*G )?)Z,:36]XM7eD1Dفv no?n A?De9s՜GA8mA!A13) 3.M )!A@%( 34U]82 1K)D&/<F' X`4_l_Y͓s -NW Z+ ]5ӆZgQQ '0(vN -n5/ &Y -%#*'0#  n . 9;??C:0+8$@EI. Hb 1/'J(JKG!'?E G T,E;#X*ó#K -w9=B`9I# D 3WpBSH m$"&;!\ ! -TTF! '#' &:6 a"0 "=WE-B4  9(,%% S )k"?1(C'"69+#@%L(oi d 1?7 e 9(= K K8OI%w .!N KSEdL k,3N2ReO{gNE7gY7>/6 ݞs7^ 420 9 aM"gU'y Y - +y /56&"17{ :ߚ -+ ~=#ۋ W M c;Z% Ւ7B "+"16ǒ;i# 4M7m  l u4v5E85L -!~'<"H7> -%{2L!\U>Aۘ ~# 08r7Ӓ, 8LS"|j#83j3(ncL!-}408Ձ a#85t4{4c}5 lk>M' '@[7 -?AhM;"IP?O %,,_8 ShK 8 "pO7#!AU$[Ydiq--*"7 -h! ap$A67J]D7UW#> 8Jc$m)98e#9k& $[l]AAJCUY9 a! -6Aim -e[ {[*m ";q5/#"qD"o c[=. ,5$c3S9 7i8oSSW( g"9 9eea! ݅ 9_ a_7_ #"? - j!O5gWJ A]#!O( , c;#I1_U -M$n 1];#S j+u2e"!(8Ov_ !uQ?W$DfWKU59/ @ -6k&@ ]?v͈,n)Ok ٢]sx fi -/' <9q!!i Q#S7PIU_0` ߍ (Ra 8i<PSm 1a -8\  SF/;5%BJ 3cN 6in'F#WGI7wa# ߒ q276MK#Y(%!E kߍ -g # -.x-{I$e5MgnW _7Ckeףω"_W0]7I9o8 2]7a"pQ8 -KL -W ѰU!+XSU ] <Bm8[6 -8 _, m o 4LeTDWGc -R[7 -9OMV GYy -$!G2. -3 _6dJW:-EA  8" wmYc^!$I o"S2 "k*{BO:;!K?m)D4Q" -M=S"E9k 8 ;'`5 ]g?!%k'b -1i V.K!}z7NS/A$a  "]7-iU1UWk 7Yn8 - b7W;!g - Zc  l!I -&m_Q57 o d qGZ7 @6oa"zF!  3:_h :] ]"mL U -9_ U#""G  Q#"o#<" apY(H(6;(_EU8 @2_6_3"*mh+ QAO+\kA yA7$E#<   /r'M 1gt$N$j0,"9  R45 C6" + MD:p4ln1/nem7O(|!V<.@ t K.v`S+=.sl%BC J~*l5SI6o͐M:L:GӤldm?L'o> 4%H~9 -)D'p3gϟT]&HDKdWJsq DuRσrsτIm<=n H[7u7zh>jy@c9Ϫ/*@8"i@ N?:7 -r ׍[6 $m !>8We>89B C55>:q"S#''@s9_"u%"4!8 Aj Y(Y",![."&(5W)z27KkR ]c ' U!QǀKP!IB$e^ ' &#e Z -'Y1[ -VL5MeM N7 !Æ ] O!Y !7l !77Z7e! C9 !ߋ#Y]:$y)V = :C - ||Ni"}["( M76PE79$w7F` 7v997N8#l3Nn K7O!a ` ,a xv99 -;9{Z#b8< -L5m!\ u:5 "g0 S J7W 9 _KV7"?S&K /&65I@ "K+єn/ g n -%#!K+$Q - / C$ -f!;G -F#@aD$!g$G7N j!%" ׈"" ;_K5J a; @ + 7 _Mc z8eA9!!G;`"7)xK7$ -\8a>Տ86)zz"26Pp"+#94V ː9Z,$ q"&zg8w7^]9d -tjY IӒgz?@!Ij(|]& Ilv3\JBe& 3& KY +- a81E$4+ _%:!1Q  -`Ej/&WC3$7Q-8!<@)(5D"HQ.GF] u *N^!) -a-&NC/CO]#V -i!) h|N%>5 d"f4#U4}` F9k -i6&Y < 6 CW%Ff9ۭ-Bݪnc{3V-'h ۢJ*Yb ]&Y &*F=A>o#M$W6&Y.4#GUgDQJ6cP"4'E31Wg@uD _S+=4K3k3)OuS>R7^H&Dk3gK+S1I#GE1z-; u0mcc0u#O ])$C ϋ3`t5ݲ=%i/5.sHw٠>Z@/a;9D-m%d-( J59u/43w#"#'G23 -R2tl99_9/<21 7p);# c3 &? Mi$ 6),29O= _1 9B[NRw+7=5F. -?]2V -.P" O+$ ->#^0"? (Oo6 )3.-4  -@IF?G&C#%J77*gH(@P &>JN""27% L9 -ML])S #  $g5 9: =&:8B &, F$kP$+ (* &WfHQ[ c 0S1C) k -9{h -EU -5Y9 _,!9gmD(8+$*Ea" -zɓ!'cZ#7I1#MdQ o -c"z8Q 5dD!A)D"-"J 9 @$$ -8%"(P :94 <@$99#/ D+)#O' N< A%"(L"4?3l -$6CG*7'C : )Jl 7F -P>* 6\A1 -4?4! ?E78 (? r )9#&!R8%#(8@  -O4>rL6q$Fr"E. h"nY : J!P -0#) SGG#/69+lvn 7>L*"] -/nh -F+!W D-VI+"d 6BɃ -9 I ; -692U"#bG)d <> #DLO ;6:) _ R;k A5A; DBWA3F *A D8!I!89*:3GJO# PS3 ,P -r=:/$" & 6'Re#k D e r&zx 8Sٜ-A ߊ vf&Ô=) <r&!p - #] 7N6 - a O&!*L4ϙ 8A 2 -/<&W [ 0 uZ.C7=12 -+'t _#y311.: [I-*!F( -ɑD"6*@8@(-g3,6/#.M,u"S=N)zJ*"c%&0 +'ϢQ**MZ.<A  tY/1f 'J  -, 9)/ -4Օ66] [0s'm -= -bE @vB6/ߒ:#^7 ePz;6?s!vz 8 n8!@(] #'E$# D*&&!$$"5I0Xe(F#3 ;>.6 709K;h!3 -L " -A2=%+W 6'H%30& 45$%#3[:Z@~/))P&-;! R&= 1D 79=)0 &3( >'1 !# *,J$!'%0 &(& > !( +B!8 -< -4 t {h ?*V@&Fղe5 %~ \ No newline at end of file diff --git a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.nrm b/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.nrm deleted file mode 100644 index dc21226..0000000 --- a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.nrm +++ /dev/null @@ -1 +0,0 @@ -NRM|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||vvwv|vwvwvvw||v|wvwv|y||||wvvvwvwy||v|wwvww|vww|v|w|||wvwvyw|vw|vv|v|y|y|||vvvvvvwvvw||w||v|vvv|vwv||wwwvvwvvv|v|wwwvy|w||vwwvvvvv|wv||vwvyvvv|w|wvwwwvvwvvvvvw||||||vw||w|w|vy|vw|vwvwvvv|||v||wvw|v|vwvvvvvw||vv|w|v|vww||||wvvyww|||||vwww|y||w|wxwv||v|wvw|v|w||ww|w|ww|||vxvw||v|vvv|y|vvwyvvv|wvv|y|vvyv|wvwwwvv|wwv|vw||vvw|||vv|wvv|vywvw|v|v|ww|wvvwv||vvwvvvvy||wwwwwwv|w|w|v|wvwyvvw|||wvw|vvvwvv|wvwv|vwv||vv||yvw||wvvwwv|vvw|wv||ww|vvww|wvv|y|v|v|ww|vv|vwwwvwv||w|wwww|wwyvvwww|w|vvwwvwv|v|vvw|||w|v|wv||vvvv|v|v|wv|vv|ww|w||v||w|w|vv|wwvvwvwwvvvwwvv|vv|vv||w|w||v||wvwvwwvwv|wwv||w||wvvwwvwwwwv|w||vv|v||wwv|ww|||wvvww||w||wvwwvvvvvvv|||wyww|vvywvwvwvw||||vwvwvw||w||ww|wwwvww|vvv|wvvvww||wvvwv|v|w|w||w|vv|||v|vvw|v|v|vw|vvv|vwvwvv||w||vvv|vvy|v||||ww|vvwv|vv|vwvw|w||vvwwvv||wvv|v||v|yvvvv|wvwvwwwvv|vvvvvwwvv|wvwvvw||vwv|ww||w||yvyv||vwvvwwwyw|v|wvv|vvwv|v|vwv|wwvyvv|vv|wwvwvw||vvwv|wvvv|vv|w|vywyv|vywvw|wv||wv|wwvvwwy|vwvv|v||||v||w||vvw|v|v|w|wvyw|vwvv|wvwvwvvwvvv|vw|||w|vvv|||v|wvwwwvw|vvvv|v|vvvvywwvww|||vw|vyvw|vv|v|||vv|w|vvwvyvv|vvwww|vv|vvv|vww|vvwvvwvvwywvv|vwwwv|vv|wv|v||vwv|vw|wvvv||wwwvwv|||vww|vvww|vw|vwvwwww|wvyv|v|wv|||v|wwywwv|||wvwvv||||wvvwwvv|vwvwvwv||vvwwvwwwvyv||||vw|ww|wyvwvvwvvvvvvv|wwvwvwvwwvww|v|wv||v|v|vvvvwvwv|||wwyvvvwvvvvwv|w|wvyv|wvw|||w|w|w|vvwv|vwwwvwwvwvw|vww|vwvvw|vvv|vvvvwwv|ww|w|vww|||wvvv|vvw|v|v||vvwvwvvvvv|vwvvvvvwvyw|wwvy||wv|w|w|v|vwvwvvvwvwvv|wwwy|y|vw|vv|w||wwv|v|vv|vwyw|wvy|wv|||wwvvyvw|y|wv|w|w|wvvvywvw||vvvv|vwv|vw|wv|ww|||v|wvwvwwvw|vwwww|w|w|vwwvw|w|vw|vww||vwv|||vwwwvv|wvvvvv||v|vwvywv|v|vvvwvvwvv||v|vvw|ywv|www|vvyw|vv|v|vww||w|wvwv||wvvv|w|wwv|vwww|wwvvvvwv|v|v|ywvvw|vv|vv|vw|vwwvwv|vwww|v|yv|v|y|vvv|vvwvv|vw|vwwvwv||wvwwyw|vvvy|vv||ww|w|wvwww||ywvyy||wwyvvww||vv|vww||vvvwvvvwwww|ywwvvwwwwvvwvv||||vvvwvwv|yvv|v|v|vww|w||vvvv|vvwvvvvw|wvvv||ww|w|w|wv|vvvvywwvv|vv||vv||vwvvvwv|v|wv|vwv||vvwv|vvyv|vw||wvw|wvw||||||wwwvvvvvvwvv|vv||wvwvwwy||wywww|vvw|vvvvvvww|vwvvvwv|ww|vwwvv|ywwvv|w|www||ww|vwwwv|wvvvvv||vywv|v|wvvvwvvv|vwvwv|ww|w|wvwvwvvwvwwvw|v||w|v|v|vwv|wvvwwwvv|||vwvvvwwwvy|v||w|w|vv|wyww|vwvvv||||vv|vw|vw|w|vw|v|vvw|ww|vw|vvv|vw||w||w|wv|wv|vvvvvwvw|ww||vwvvw||vvy|vvwwyvv|vvvwwv|vwwvwvwv|vvv|vvv||vvvw|vww|vv||vvwvvvwvv||vvwvw|wwv|vw|ww|wv|wwvvvwv|||wvvw|v|yv|vvyvw|wv|wwwwyyv||vwvyvyvy||vvvvvwvv|vwv|vw|wvww|vv|wvv||wvv|wvvww|v|wwvv|wvvww||v|||||w||w|wwv|wvww|wvv|vv|w|vvwwvv|vv|vwwww|vvvw|y|||y|vw|w|vw|vv|v||vw|y|wvw|v|||vwvyvwww|vvv|wvw||v|wwv|vv|||vvv|vwvv||v|v|v|v|vwvw|vwwvvwv||vw|||vv|vwwvvvwyv|vvvwyvvwv|v||vwvv|wwvv|wwwwvwv||wvvvv|||vwwvw|||wvvv||w|vwv|vvv|v|vwvwvwwywvw|wvwv|||wvw|vvwwww|vvvw|v|wwwvw|v|vv|wvvwvvwvvvvvyvw|wvxv|w||w|vvwvvww|vv|vwvww|v|y|y|||ww|||vwwywwv|||yvww|vvv|w||vv||v|vwwwv|w|vvv|||w||w|w||vwvvwyw||vv|v||w||||ww|||||v|vwwwvww|v|v||vww||v|vvvvw|w|vvv|wv|vww|||w|wvv|vww|wv||vvvv|wvvw|||||v||vwww||vw|v||xv|ywv||vwww|ww|w|wvv||wvvvvvwvw|wwv|wwwvw|w||vwvwvv|wv|v|wwv||w|||wwwvwvwvyww||vwv|||yw|vv|vwvvyvv|v||vwwvv|vwwv|vyvvvw||yvw|wvwvy|vvvvww|wywwvwvvv|vwvvwvwvw|wvwv|wwwvwwvv|||vwwvw|w|w|||vvv|wvwv|vwvvyvv|ww|vwwvywwvwv|w|vvwvww|wv|v|wvvvvv|w|vvvvwvw|w|vyw|||v|wvwywvv|wvvvvwvw|w|vvwwvyw|w|wv||w|vvwww||||vww|vvvww|w|vwvvwvv|vvwvwvvwwv||wvvxw|wvvw|vwvwv|vww|y|v||vv|wvwv|vw|wvw|wvw|vwvy|vwwv|w|w|w|vv|vvvvwvv|wwv||v|w||ww|wvw|v|wv|vv|v|v|||wv|vv|vv|vw|vw|||w|ww|w|v|vvwwvww|||vv|v||vvw||wwww|v|v|wvwvwv|||w|v|v|ww|w|wvv|wvvvvvwvw|vwvww|||w|vww||wwwvwv|vwvwv||w||vw|vvwv||vw|v|v|vwvyv|w|wv|vwwv|v||wv|vyv||v|||wv|vwvw|vvv|vw|w|||w|yww||||wv||y||v|vvwv|wv|vv||||wv|vv|wwwww|||vvwvw|wvv|vwvwwwy||wwwvwvv|w||||vv|||wwwyww|vw|w|ww|vvvv|w|vw|wvwvwvw||v||vwvvww|wv|||vvwv|vv||vvvvxvww||wvvv|vwvw|wvvv||||v|ywvvwww|www|w|v||wv||wv||w|vvvvvwvvvwvv|wvvvvv|w|wvvvwwwvv|wv|wvv|v|v|vwwv|||wv|y|ywvw|v||vvv|w|vw|wv|wv|wwvvwvvw|wvw||v|||vw||wwvwv|y|w|vwv|w|v|vvwvvvww|ywvv|vw||vww|vvwv|wvvwvw|vvwv||vwwv|v|vvww|ww||||vyvvwvvvy|v|vw|v|v||||wwvvwwwv|wwwwvvv|wvywvwwwwvv|v|www|v||v|vv||||vv|wvy|wv|vw|||wwwwwv|v|yvw|ww|wvwvwvw|vvvvvvwwwwwvv|wwwvwwvwvvwvv|vwvvwyv|wwyvvwv|||w|wv|w|ww||vvyw|w|w||w|wvvw|wwwwwv||wyw|y|vvww|wyy|||vwwwvyw||ywww|wvvvwvw||wwwyw|vwwww||vwwvvvwww|wwww|wwwv|v|wwyv|vwvv|vwvyv||wvy||vvwv|wwwv||wvvvwv|v|wvw|w|ww|vvv|wvww||wwvy|v|vw|vv|wvv|vvv||wwwwvvv|w|wwwww||w|vvv|wvvw|vv||w|y|wv|||wvv|vw|vvvvv||yw|w|vvwyvyw|vvyv|wv|||||wv|w|vvwvv|w|v|||vvv|w||vv|vwyw|v|wvvwwvww|vvyvv|w|vvwwwwwwwwww|vv|vwv|vwvwv|ww|||vw|wwvvvw|yw|wv|wvvvwvwwvvww|v||wvvywvwvvvww|w||vv|vv|vwvwvvwwv|v|||wwvvvvw||vyvww|v||v|vw|wv|vvvvwv||yvwv|yvwvwv|||v|ww|vvw|w|vvwvwwv|vw|wv|||vwv|vvwvvvwv|vvvvwvvw|vvv|wvvyvv|wvvv|||wwwwvwwwv|wvv|wwvwwvvvyvvww|ww|v||vv|vwwv||vvwvvv|wvv||w|||wwvvv|w|vvv|vv|wvv||||wvwyv|v|vwwwyvy|wv|vy|v|vvwvvvw|wvvvwvw|yww|ww|vvw|wv|v|wwwwvwwv||wvwvwwww|vwwv|||yvv|vyv||vvvw|v|ywvvwv|v|v|v||||v|w|vww|wwwvyw|www||vvvvvwvwvwvvwvvvwvvwvvww|www|vv|vvv||||vww|v|wvvv|wv|vwv|vv||vv|wwvv|vww|vwwv|vvv||wv|v|vvwvwvww|v|wvwvv|vvwv|yvw||wwwv|w|w||vv||y||w|vw|||vwwwwvv|v||vy|vwwy|wv||vw|wwvyv|||vywy|vvvvvww|wvw|v|v||||vvvwwv|||wvw|||yvv|vyw|wwy||wwv||v|wwv|w|vv|ywwvwwy||yvwvwvwvvvvvwvvvvywv|vw|vvw|vwv||vwv|w||v|vv|vvvwywvvwwwv|wwww|vv||vvwvv|wvw||v|w|v||v|||||vwvvwvywvvvwv||vvw|vwvvwww|wwvwvwvvv|vvvww||w|wvww|vvv|wvwwvv|wywvv|ww|vv|vvv||yww|yvv||v||v|vvvv|vw|||w|vv|wwwv|vvwvw|wwwwwvvwyvwww|||vvv|vywww|vvwwvwwvvvvw|||vwyv|vv|vywv|w|vvww||wwvwwv|||vwwyw|v|v|v|wwv|v|wv|ww|vyw|w|w|wyv|vwv||wv|wy|vw||vvv|wvvw||vw|vvvwvywvvvwvvywvvvv|vvvvwww|yv|v|www|vw||v|||v|vywvvwwwwvwywvv|vwy|vwyw||vvw|wwwwv|w|wv|w|v|vv|wv|vv|www|vwvw|||vyv|ww|wvw||wvw|wvvy|vww|v||vv||||wwv|vwwy|yvvwww|wwvw|vwwvvvvvwyvvvwvwvy|wwvww|v|ww|www|v|w|v|vwvvv|vwv||v||wv||w|wyvvvvw||wvvwwww|yv|||wwvv|||y|wwvv|vvwvw|v|vvwv||vwvvvvvvv||vvvvvw|yywvvwv|yv|w|ww|vvv|vww|vvvv|wwv|y|wwvwv|wwwwyww||vwww|wwwww|vvw|vvvvwxwwww|w|vvy|v||v|||wvy|vvw|wwvwwv|vvwwvwwww||vvvw|w|w|vvwwwyvv||vwvw|ww|vwywv|wwvvv|wv|ww|ww|wvy|w|vyvwwvvvwvv|vv||v|vvwv|w|v||vvw||vvvv|vvv|vvwvvww|wyv||||wyvvww|vv|||ww|wvww||v|vvvvv|vwwvvvywvv|vvvv|wwv|vv|wvyw|wv|w|v||vwvvvwvw|vww|www|v|ywv|w|vw||wwwvvvvvvw||ww|vvwvv|vvvywvwvv|vwwwvyvwvvvv|wwvvvv|wwvwwwwwwwv|w||v|wvvvvw||||||wv|w|wvwwvvwwvv||w|vwwvv||v||vvv|vvvvwvwvwww|vvw|wv|w|vw||vwv|v||||w||wv|vvvvw|w|v|y|vvwww||wyww|wvvwvwwyvv||w|v||wvvv|v|w|vw|vvwwvv|w|v|v|vv||vwwwww||wwvvww|vvv|w|vwvvwvvv|v||vwvvwwvwvvww|wwv|vvvvwwvw|ww|wwwvvvvvvv|v||v|vv|v|vwvvvvywyv|vwwvwvv|vw|vww|vv|vvv|||ww|www|vwv|y|v|vwwvvvvwvww||vvvwvv|wvv|wvv|vy|vvw|wvw|v|wvwvwwywvvvwv|wwwvw|wvw|wv|v|vyvww||vv|vw||w|yv||vv|wvyyvv|wwv|vy|vw|vwvvvvwvvwwvvvwvww|vww||wwv|vwvvwwvv|wwy||vwwww|yvvvyvwwvww|||vv||vwvwwy|vvvv||vv|vvwvv||vvvvy|vv||vwvw|wwwvw|w|v|v|wwwvvv|wvwv|w|vv|vw|||vvwwvvwvv|wvwvvww|vw||wvvwvvyyvvvv|yv||v|vvwv|wv|vwwvvwwwvv|wwvvv|vv|v|vyvvvwywwvvvvvwwvvv|w|||vvv|vww|vvvyvw|w|vvvvvwvvw|wvwwwwvvwvvwvw|vvvw||yv|vwv||wvwwwwv|vwwvw|vywwwvv|wwv|vv||vwv|v|w|wwwyvw|wv|w|vvwvvw|vv|wwwvvw|vwwvv||v|v|vvwvwvvvvv|wvv|ywv||v|vwwwwyvv|vv||wv||||w||v|||vvv|w||yvv|||w|v|vv|y||vvvy|v|||vyw|v||yvvw|v|||www|wvvwwvvv|vwvw|w||w|v|w|v|w|vvwv|v|vvvwv|vwvvw|wv|wv|w|v||vw||w|v|wv|vw|||wvy|vww|v|vvww|w||||vvwv|wwvvwv|wyv|yv|y|wywvyvvwwyvwww||w|w|v|wwvy||ww|w|vvvvw|w|||vwwvvvvvwvv|www|||vww|||v|wvwwwwwv|ww||wvvwwv|wwvvwv|v|vv|vv|w|||vv||v||w|wwv|vvw|vv|v|vv|vwvv|wyww|v|vw|vvvvwvw||vw|vv|vv|vywvvv|ww|vw|wvywvwvwww|wwvwvvwv|vwvwvwwv|vvvw|vvwv|v||wyw|ww|yw||wvvwwv||v|v|||vv|vv|ywv|vvvvwvvww|wvv||v|v|v|wvwvvwvw|vwwwv||v|vvvv|vvw|||v|wvvvw|wvww|v|w|ww|vxvwv|wyvwwvvvw|wwyvv||wvvvvwwvw|wvw|v|v||vv||wvvvvvwv|wvvv|vww|||vv|vvw|vvvww|vvwvv|||yv|wywvwvwvwvwwvwwv||vwwwvw|||v|ww|yv|vwwwwvvw|vvy|wwwvvw||w|vy|ww||ww|vw|wwwyvv|vvwwv||vww|vvwyvwwvvw|wvwwwvwvw|wwwyv|vvvw|wwvwvw|vvvww|w|||v|||vwvwy||w||vwyww|vv|w|v|vwwyvw|vvvvwwyv||w|vvv|w|wvvwwvv|v|v|vvvvwwv|v||vvvvy|wv|||ww||wwvvwvw|yvvvvyw|ww|v|||wvwvvv||wvwvwvw||v|yvwwvwvy|wwvw|v|wvwwvww|v|yw|wv|vv|||w||wv|ww||vvvvvvwvw|w||v||v|w|wvvwv|vvv|||v|wwvvvw|www|v||vvvwwwvvw|vv|yvvwvw|wwwvwwvwwwvvv||vv|vw|||vwvwwvvwwvwvwy||vw|wvyv|wvy|v|wwwvvvvwyvww|||vw|wvv|v||w|vvwwvv|wv||v||vwv|w|w||vvwvw|wvvvv|vwwvwv|vv||wvvvwvwvwvvw||wvwvwyvww|||wv|wwvwwvw|v|vwvwv|wv|wv|w||v|wv||v|v|vv|vv|ywvv|vvvww|v|wvvvvvvvw|v|||vv|ww||vww|vw|vvwvwvvvvww|w|wvvvvvw|wwwv|yw|vw|||v|wwv|vvww||vwvwwvw||vvvv||||||vww|wvvvw|y|vwvvvvv|vvw||vwwvv||wvw|wwv|w|wywvw|v|||vvvwvvwvww|vwvwww|wwvwvv|wvwvw|v||wvwwwvvvvvvvvyv|wvywvwvvwvvvvv|v|w|wwww|wwwvvwwwvv|w|||wvvw|vvv|v|vv|yvvvwyvvvwvvwwv|wvv|vvvvywvv|||vyvwvv|vvw|vv|w||vvvw||v|vvy|ww|v||vww|vv|||ywvvv|w|vv|v|wvvvv||wvvvvwvw|wwvvwv||wvwvwwyv|vvw|w||wvvy|vyvvvvww|||wvvv|vvvw|vv|wvww||yvvvvw|wvvw|wyvv|w|wwwwvwvwvwwv|vv|vwvvwvvwwvy||vvwvw|vvw|vwyvwvvv|w|y|vw|vy|wwvyvywwv|vww|v|w|wv|wv|w|vv|wyvvv|vwwv|v|yvvvv|vwvw|v|vv|||w|vv|wvwvv|wwvv||||vvwy|v|vwvv|w|vvvwvw||vvw||w|wvvww||wv|vw|wwwwvvxwwvwv|y|vw|vvvwwv|y|wwvyvw|vwvwwvw|y||wy|ww|wvwvv||v|vv|wwvvwyvwvv||vvvwv|vvvvvw||ww|wvvy||||v|||vv|vv|wvvvvvw|wvwvwvww|w|vw|vvvv|v|vvw|v||||||v|vv|w|vv|ywvw||vvyvwv|vywyw|wvvw||wwww|wvw|wvvwv|ww|vv|vv||vw|ww|vw|vw|vvw|vvvv|w|wvwy|vwvvvvwvwvwwvvwv||v|vvvv|vvwwvwww|wv||wvv||vwvvvwvvwwvvwvv||v|vvvwvyvw|wvvvyvvvv|vwv|wv|vvwvv|wwv|v|yvwwvvwvvwv|||w|y||||w|ww|vv|vvvwvvvwv|wv|vv|v|v||wv|w|vvwvv|wvvw|||ww|vvwww|vvv|vwv|wywv|w|wwy|vvw|vvww|wvwvvvw|w|wwywvvvvvvwvw|v|vwvvwyw|wv|v|w|wvw|v|vwvvvvwyvw||wwv|||w|wwvwv|vywvvvv|v|vvww|ww|w|v|vww|wv|wvwvv|wv|vv|||vw|v|ww|v||w|vwv|vv|w||vvywwvv|wv|yv|y||vvv||v|wyv|vyvywwyv|v|wvvywv||vwv|||v|vvvvv||vww|vvvvvv|wv||w|v||||www|vv|v|wwwvwwywv|wwwww|||wwvvw|wwvvyww||wwvwww|vv||wv|||vvv|wv|||w|vwv|yw|v||wv|wwvvvwvyvvvvywvvvwvv|v|yv|v|vyvwv|w|v|v||vvwv|w|wwvvwwwvv|y|wv|vwwvww|v|vv|vv|www||vwvv|v||v|vvw|||v|||||wv|wvv|v||w||vvw|wvw|vvvywvvwy|wvwwvv|vwv|y|vv|vwvvwvyywvv|v||vy|v|wwvvvy||vvvwvwvwv|v|vvwvv|vvv|vwvvvvvvvwwwwwvw|vvvvvww|||||vv|vvwwwvwvvv|wv|v|vwv|vv|v||wv|vvww|||vww|vvwv|v|wvvvw|vwvv|w|yv||vwvvw|vvvvvww|w|v|wwvvwv|vv|vw|wv|yv||wvw|vvvv|v|wv|wyywvwwvvwvvwy||v|||wwwwwwvv|wvww|||wv||v|v|v||w||v|w|v|wvww|w|vvwwvvvvwwvw|vwv||wwwww|v|||wvwvvv|||vvw|v|vv|wvvvwwvvvvvv|vwvyvw|wvvy|w||wwwv|yv|v|vvyvvwvv|vwvwy|wv|y||w|w|v|||x|wwvw|wvvvwvvyvvvwwv|wwvwwvv|w|wvwvvwwwwvvv|wv|vww|vwv|wwvw||w||vv|wvv|w|vvwwvwwvvw|wwwv|v||vvw|wwwvvv|vv|vwv|vwwwv|ww|wvvwvw|v|ww|||y||v|wywvw|vv|www|vwwwvvvvv|vwv|w||vvwvwwwvww|vv||vv|vwyww||vvw||vvwvwvww||wvvvv||wvw||wvw|vvwvvvvwv|||v|ww|wvw|vvy||www|w||vw|w||wvw|www|wwvwww||vvw|wwww|wwwvwv|v|vv|vywvvwy|vvvwvwvv||wvw|v|w|vv||wwwv|vw|vvyw|vv||v|vwvvvv|||wwvwv||wvwv|w|vwvw|||vv|v|vv||vwv|w|v|w|w|v||v|vw|wvwwv||ww|wvvvv|vv|v|vw|v|v||||yvvw||w||vwvvwv||w|wwvvvwwv|vwy||w|v|vwwwvvv|wv|vvww|vyvwy|vv||w|v||||w|ww|vv|v|wwvvv|wvwvv|wvvwwvywwvvvv|wwvw|v||vvyv|||vw|ww|wwwwv||vvwwvv|||wwvw|v|v||w||vv|w|vvyv|||yvvvw||v|w|wvvv||wxwvwwv||vww|vww|v|vwvv||v||wvw|w||vvwwvvvwvvvvvv|vv|w|wv|w||wvwyv|vvwwv|vv|v||wvvwwvvvww|vv|vv|||wv||v|wvv|w|vw|wwvwwvwwwvwv||wvvwvv|vw|vwvv|ww|v||vvx||v|wvv||wwywvwww|w|vw|v|vw||w|v|wv||ww|vvwvv|vww||w|vvww||vvvvv|vww||vvvvvvvw|wy|wv|wwvww||||v||w||v|vwwvyw|v||||vwvw|w|vwv||y|vwvvvv||v|wwvv|v|yvv|w|wyw|vv|vv|||v|||vwv|vv|wvvvww|vw|wwvwvwv|||wvwv|vvvwvw|vwwwwwvv|vvv|ww|v|vwy|vvwvv|||v|yvww||vvx||v|ww||vvwv||wv||vw|w|wv|vww|ww|vvv|v|w|vvvvvvwvyvvvy|ww||v|wvv|v|vwvw|vv||vvwvv||wv||vwvy|v|vwwv|w|||wvwwwwwvw|wv|v|vvwwvv||vw||wv|wvvyvvwvwv||yvv|w|vv||vwvvwv||wvvv|v||vv|v|||ywyw||vv|w|||w||v|v|vvvy|wvvv||w|www|vv||www|w|w|ww|vvww||vwvv|vv||wwvvwwwvv|wwv||||vwv||w|wwwvvw||v|v|w|wv|vw||vy||vvwyvw|yvvvv|vvvvvw|vvvy|vvwvv|vvw||w|wv|www|ywvvwvvw||ww|vvv|wvvv||vvvvvy|wv|ww|vv|wv|wyv|vwwv|wvwvvwvyww|w|wvv||www|w|w||v|www|||vv|vwv|yw||ww||wwvv|vv||wwwvvwvvwvvv|ww||vw||vvwwwvwwvw|vvww|v|vv|vyvw|wvyv|w|vv|v|v|vv|w|y|v|vw|vvwvvw|vvvvyvvvwvvw|w|vwywwy|vw|vw|vvvwww|wwww|v|ww|ww|vvvw||wyvwvwvvvwv|wv||yw||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| \ No newline at end of file diff --git a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.prx b/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.prx deleted file mode 100644 index d258335..0000000 Binary files a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.prx and /dev/null differ diff --git a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.tii b/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.tii deleted file mode 100644 index ddc96f2..0000000 Binary files a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.tii and /dev/null differ diff --git a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.tis b/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.tis deleted file mode 100644 index dbedb62..0000000 Binary files a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/_8.tis and /dev/null differ diff --git a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/segments.gen b/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/segments.gen deleted file mode 100644 index 774fd07..0000000 Binary files a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/segments.gen and /dev/null differ diff --git a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/segments_9 b/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/segments_9 deleted file mode 100644 index b348853..0000000 Binary files a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/segments_9 and /dev/null differ diff --git a/Config.xml b/Config.xml deleted file mode 100644 index 005f025..0000000 --- a/Config.xml +++ /dev/null @@ -1,6 +0,0 @@ - - -192.168.30.128 -5555 -F://monitor - \ No newline at end of file diff --git a/Server.bat b/Server.bat deleted file mode 100644 index 7b9c53f..0000000 --- a/Server.bat +++ /dev/null @@ -1 +0,0 @@ -java -jar Server.jar \ No newline at end of file diff --git a/Server.jar b/Server.jar deleted file mode 100644 index 340b2b1..0000000 Binary files a/Server.jar and /dev/null differ diff --git a/judt/bin/.gitignore b/judt/bin/.gitignore deleted file mode 100644 index 536b9ab..0000000 --- a/judt/bin/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/Test/ -/judp/ -/net/ -/udt/ diff --git a/judt/bin/Config.xml b/judt/bin/Config.xml deleted file mode 100644 index 005f025..0000000 --- a/judt/bin/Config.xml +++ /dev/null @@ -1,6 +0,0 @@ - - -192.168.30.128 -5555 -F://monitor - \ No newline at end of file diff --git a/judt/bin/Test/TestClient.class b/judt/bin/Test/TestClient.class index f0d2045..a7528d0 100644 Binary files a/judt/bin/Test/TestClient.class and b/judt/bin/Test/TestClient.class differ diff --git a/judt/bin/Test/TestServer.class b/judt/bin/Test/TestServer.class index ee2d609..c616c31 100644 Binary files a/judt/bin/Test/TestServer.class and b/judt/bin/Test/TestServer.class differ diff --git a/judt/bin/judp/ApplicationCode.class b/judt/bin/judp/ApplicationCode.class index 15005b0..03724c3 100644 Binary files a/judt/bin/judp/ApplicationCode.class and b/judt/bin/judp/ApplicationCode.class differ diff --git a/judt/bin/judp/judpClient.class b/judt/bin/judp/judpClient.class index 935a5ef..80e3954 100644 Binary files a/judt/bin/judp/judpClient.class and b/judt/bin/judp/judpClient.class differ diff --git a/judt/bin/judp/judpServer$1.class b/judt/bin/judp/judpServer$1.class index 20bff81..0a87d43 100644 Binary files a/judt/bin/judp/judpServer$1.class and b/judt/bin/judp/judpServer$1.class differ diff --git a/judt/bin/judp/judpServer.class b/judt/bin/judp/judpServer.class index f5bd88a..6dfbda0 100644 Binary files a/judt/bin/judp/judpServer.class and b/judt/bin/judp/judpServer.class differ diff --git a/judt/bin/judp/judpSocket.class b/judt/bin/judp/judpSocket.class index 131f95e..e5e85b3 100644 Binary files a/judt/bin/judp/judpSocket.class and b/judt/bin/judp/judpSocket.class differ diff --git a/judt/bin/udt/ClientSession.class b/judt/bin/udt/ClientSession.class index 70dacc9..5b06959 100644 Binary files a/judt/bin/udt/ClientSession.class and b/judt/bin/udt/ClientSession.class differ diff --git a/judt/bin/udt/ServerSession.class b/judt/bin/udt/ServerSession.class index 9913a94..e15a32b 100644 Binary files a/judt/bin/udt/ServerSession.class and b/judt/bin/udt/ServerSession.class differ diff --git a/judt/bin/udt/UDPEndPoint.class b/judt/bin/udt/UDPEndPoint.class index af79103..dabc110 100644 Binary files a/judt/bin/udt/UDPEndPoint.class and b/judt/bin/udt/UDPEndPoint.class differ diff --git a/judt/bin/udt/UDTClient.class b/judt/bin/udt/UDTClient.class index e434ffc..432638a 100644 Binary files a/judt/bin/udt/UDTClient.class and b/judt/bin/udt/UDTClient.class differ diff --git a/judt/bin/udt/UDTInputStream$AppData.class b/judt/bin/udt/UDTInputStream$AppData.class index a4f4527..c5423c4 100644 Binary files a/judt/bin/udt/UDTInputStream$AppData.class and b/judt/bin/udt/UDTInputStream$AppData.class differ diff --git a/judt/bin/udt/UDTInputStream.class b/judt/bin/udt/UDTInputStream.class index fc7e6b7..a01d41c 100644 Binary files a/judt/bin/udt/UDTInputStream.class and b/judt/bin/udt/UDTInputStream.class differ diff --git a/judt/bin/udt/UDTReceiver$1.class b/judt/bin/udt/UDTReceiver$1.class index 7162bfc..2e59f3b 100644 Binary files a/judt/bin/udt/UDTReceiver$1.class and b/judt/bin/udt/UDTReceiver$1.class differ diff --git a/judt/bin/udt/UDTReceiver.class b/judt/bin/udt/UDTReceiver.class index 2d231b3..8671879 100644 Binary files a/judt/bin/udt/UDTReceiver.class and b/judt/bin/udt/UDTReceiver.class differ diff --git a/judt/bin/udt/UDTSender$1.class b/judt/bin/udt/UDTSender$1.class index 828af66..a778b1a 100644 Binary files a/judt/bin/udt/UDTSender$1.class and b/judt/bin/udt/UDTSender$1.class differ diff --git a/judt/bin/udt/UDTSender.class b/judt/bin/udt/UDTSender.class index a61009a..7586732 100644 Binary files a/judt/bin/udt/UDTSender.class and b/judt/bin/udt/UDTSender.class differ diff --git a/judt/bin/udt/UDTSocket.class b/judt/bin/udt/UDTSocket.class index 51f2cc5..e1e191d 100644 Binary files a/judt/bin/udt/UDTSocket.class and b/judt/bin/udt/UDTSocket.class differ diff --git a/judt/bin/udt/packets/Acknowledgment2.class b/judt/bin/udt/packets/Acknowledgment2.class index b79ebbb..ed0e891 100644 Binary files a/judt/bin/udt/packets/Acknowledgment2.class and b/judt/bin/udt/packets/Acknowledgment2.class differ diff --git a/judt/bin/udt/util/ReceiveBuffer.class b/judt/bin/udt/util/ReceiveBuffer.class index 3f140eb..1ad68c7 100644 Binary files a/judt/bin/udt/util/ReceiveBuffer.class and b/judt/bin/udt/util/ReceiveBuffer.class differ diff --git a/judt/src/Test/TestClient.java b/judt/src/Test/TestClient.java index c7d65bf..7265de1 100644 --- a/judt/src/Test/TestClient.java +++ b/judt/src/Test/TestClient.java @@ -7,21 +7,19 @@ public class TestClient { public static void main(String[] args) { - long num=0; while(true) { judpClient client=new judpClient(); - client.connect("192.168.30.128", 5555); - byte[]data=("hello word "+num).getBytes(); + client.connect("192.168.64.128", 5555); + byte[]data="hello word".getBytes(); client.sendData(data); client.close(); try { System.out.println("ȴ"); - TimeUnit.SECONDS.sleep(5); + TimeUnit.SECONDS.sleep(40); } catch (InterruptedException e) { e.printStackTrace(); } - num++; } } diff --git a/judt/src/Test/TestServer.java b/judt/src/Test/TestServer.java index 0b7050c..3a1202e 100644 --- a/judt/src/Test/TestServer.java +++ b/judt/src/Test/TestServer.java @@ -14,9 +14,9 @@ */ public class TestServer { public static void main(String[] args) { - //192.168.30.128 - judpServer server=new judpServer("192.168.30.128",5555); - server.start(); + + judpServer server=new judpServer("192.168.10.86",5555); + server.Start(); while(true) { judpSocket socket=server.accept(); @@ -61,7 +61,7 @@ public void run() { }} ); rec.setDaemon(true); - rec.setName(String.valueOf(socket.getID())); + rec.setName(String.valueOf(socket.socketID)); rec.start(); } diff --git a/judt/src/judp/ApplicationCode.java b/judt/src/judp/ApplicationCode.java index 1ac79c2..102e11c 100644 --- a/judt/src/judp/ApplicationCode.java +++ b/judt/src/judp/ApplicationCode.java @@ -79,7 +79,7 @@ static void CopySocketFile(File file, judpSocket target,int packagetLen) waitTime=(long)(speed*1000); } - System.out.println("sendFile_"+file.getName()+",socketID:"+target.getID()); + System.out.println("sendFile_"+file.getName()+",socketID:"+target.socketID); while(true){ try { c=fis.read(buf); diff --git a/judt/src/judp/DataStruct.java b/judt/src/judp/DataStruct.java deleted file mode 100644 index 9753922..0000000 --- a/judt/src/judp/DataStruct.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * - */ -package judp; - -import java.nio.ByteBuffer; - -/** - * @author jinyu - * - */ -public class DataStruct { -public int dataLen=0; -public byte[][] buffer=null; -public long id; -private volatile int sumNum=0; -private volatile int sumLen=0; -private byte[] result=null; -public DataStruct(int num) -{ - buffer=new byte[num][]; -} - -/** - * - * @return - */ -private boolean check() -{ - if(sumNum>=buffer.length) - { - //ɹ - if(sumLen==dataLen) - { - //ʼ - result=new byte[dataLen]; - ByteBuffer cur=ByteBuffer.wrap(result); - for(int i=0;i hash=new ConcurrentHashMap(); - private ConcurrentLinkedQueue queue=new ConcurrentLinkedQueue(); - - /** - * - * @param data - * @return - */ -public boolean addData(byte[] data) -{ - ByteBuffer buf=ByteBuffer.wrap(data); - long id=buf.getLong(); - int num=buf.getInt(); - DataStruct struct=hash.get(id); - if(struct==null) - { - struct=new DataStruct(num); - hash.put(id, struct); - } - boolean r= struct.addData(data); - if(r) - { - byte[]result =struct.getData(); - byte[] tmp=new byte[result.length]; - System.arraycopy(result, 0, tmp, 0, tmp.length); - queue.offer(tmp); - struct.clear(); - hash.remove(id); - } - return r; - -} - -/** - * ȡ - * @return - */ -public byte[] getData() -{ - return queue.poll(); -} -} diff --git a/judt/src/judp/PackagetSub.java b/judt/src/judp/PackagetSub.java deleted file mode 100644 index 6489a06..0000000 --- a/judt/src/judp/PackagetSub.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * - */ -package judp; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicLong; -/** - * @author jinyu - * - */ -public class PackagetSub { - private static AtomicLong sessionid=new AtomicLong(0); - public static int dataSzie=1472; - private static int bufsize=0; - private static int headLen=20; - - /** - * ָ - * @param data - * @return - */ - public static byte[][] splitData(byte[]data) - { - if(bufsize==0) - { - bufsize=dataSzie-headLen; - } - long session=sessionid.incrementAndGet(); - int dataLen=data.length; - int num=data.length/bufsize+data.length%bufsize>0?1:0; - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(dataSzie); - for(int i=0;i0?1:0); - byte[][]sendData=new byte[num][]; - int index=0; - ByteBuffer buf=ByteBuffer.allocate(len); - for(int i=0;i hash=new ConcurrentHashMap(); -//private static final Logger logger=Logger.getLogger(SocketManager.class.getName()); - private ArrayBlockingQueue hasSocket=new ArrayBlockingQueue(1000); - private SocketControls (){ - startThread(); - - } - - /** - * ̼߳Դ - */ - private void startThread() { - Thread processSocket=new Thread(new Runnable() { - - @Override - public void run() { - ArrayList list=new ArrayList(); - while(true) - { - for(Entry entry:hash.entrySet()) - { - UDTSocket socket= entry.getValue().getSocket(); - if(socket!=null) - { - try { - hasSocket.put(socket); - list.add(entry.getKey()); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - // - if(!list.isEmpty()) - { - //ƳѾɹsocket - for(int i=0;i - * - */ -public class SocketReference extends WeakReference { - private long socketid=-1; - public SocketReference(T referent) { - super(referent); - - } - public SocketReference(T referent,long id) { - super(referent); - this.socketid=id; - } - @SuppressWarnings({ "rawtypes", "unchecked" }) - public SocketReference(T referent, long id, ReferenceQueue q) { - super(referent,q); - this.socketid=id; - } - public long getid() - { - return socketid; - } -} diff --git a/judt/src/judp/judpClient.java b/judt/src/judp/judpClient.java index aef95e3..30413c4 100644 --- a/judt/src/judp/judpClient.java +++ b/judt/src/judp/judpClient.java @@ -7,7 +7,6 @@ import java.net.InetAddress; import java.net.SocketException; import java.net.UnknownHostException; -import java.util.concurrent.TimeUnit; import udt.UDTClient; @@ -17,10 +16,8 @@ */ public class judpClient { private UDTClient client=null; - private final int bufSize=65535; + private final int bufSize=1500; private long sumLen=0; - private PackagetCombin pack=new PackagetCombin(); - public int dataLen=0; public judpClient(String lcoalIP,int port) { InetAddress addr = null; @@ -39,7 +36,7 @@ public judpClient(String lcoalIP,int port) e.printStackTrace(); } - + SocketManager.getInstance().addGC(this,client); } public judpClient() { @@ -50,7 +47,7 @@ public judpClient() } catch (UnknownHostException e) { e.printStackTrace(); } - + SocketManager.getInstance().addGC(this,client); } public judpClient(int port) { @@ -61,7 +58,7 @@ public judpClient(int port) } catch (UnknownHostException e) { e.printStackTrace(); } - + SocketManager.getInstance().addGC(this,client); } public boolean connect(String ip,int port) { @@ -93,11 +90,9 @@ public int sendData(byte[] data) if(client!=null) { try { - client.sendBlocking(data); r=data.length; sumLen+=r; - } catch (IOException e) { e.printStackTrace(); @@ -107,30 +102,6 @@ public int sendData(byte[] data) } return r; } - public int sendSplitData(byte[] data) - { - if(data==null) - { - return 0; - } - int r=0; - byte[][]sendData=null; - if(dataLen==0) - { - sendData=PackagetSub.splitData(data); - } - else - { - PackagetSub sub=new PackagetSub(); - sendData=sub.split(data, dataLen); - } - for(int i=0;i list=new ArrayList(); -private static final Logger logger=Logger.getLogger(judpGroupSocket.class.getName()); -public judpGroupSocket() -{ - -} - -/** - * socket - * @param socket - */ -public void addSocket(UDTSocket socket) -{ - list.add(socket); -} - -/** - * ȡsocket - * Ƴsocket - * @return - */ -public UDTSocket getSocket() -{ - - int index=-1; - for( int i = 0 ; i < list.size() ; i++) { - try { - if(index==-1) - { - if(list.get(i).getInputStream().isHasData()) - { - //ѾҵƳ - index=i; - i=-1;//± - } - } - else - { - // - if(i==index) - { - continue; - } - else - { - list.get(i).close(); - long id=list.get(i).getSession().getSocketID(); - list.get(i).getEndpoint().removeSession(id); - list.get(i).getReceiver().stop(); - list.get(i).getSender().stop(); - list.get(i).getSender().pause(); - logger.info("Ƴsocket:"+id); - } - - } - } catch (IOException e) { - e.printStackTrace(); - } - } - if(index!=-1) - { - return list.get(index); - } - return null; - -} -/** - * socket - */ -public void clear() -{ - list.clear(); -} -} diff --git a/judt/src/judp/judpServer.java b/judt/src/judp/judpServer.java index f316d7a..7ab2aa8 100644 --- a/judt/src/judp/judpServer.java +++ b/judt/src/judp/judpServer.java @@ -3,10 +3,10 @@ */ package judp; -import java.io.IOException; import java.net.InetAddress; import java.net.SocketException; import java.net.UnknownHostException; +import java.util.concurrent.SynchronousQueue; import java.util.logging.Level; import java.util.logging.Logger; @@ -20,11 +20,9 @@ */ public class judpServer { private UDTServerSocket server=null; -//private final SynchronousQueue sessionHandoff=new SynchronousQueue(); +private final SynchronousQueue sessionHandoff=new SynchronousQueue(); private boolean isStart=true; private boolean isSucess=true; -private boolean isRWMaster=true;//Ĭֵһ -private boolean islagerRead=false; private static final Logger logger=Logger.getLogger(judpServer.class.getName()); /** @@ -35,11 +33,6 @@ public void close() isStart=false; server.getEndpoint().stop(); } - -/** - * - * @param port ˿ - */ public judpServer(int port) { @@ -53,12 +46,6 @@ public judpServer(int port) e.printStackTrace(); } } - -/** - * - * @param localIP IP - * @param port ˿ - */ public judpServer(String localIP,int port) { try { @@ -77,7 +64,7 @@ public judpServer(String localIP,int port) /** * */ -public boolean start() +public boolean Start() { if(!isStart||!isSucess) { @@ -92,14 +79,9 @@ public void run() { { try { UDTSocket csocket= server.accept(); - try { - csocket.getInputStream().setLargeRead(islagerRead); - csocket.getInputStream().resetBufMaster(isRWMaster); - } catch (IOException e) { - e.printStackTrace(); - } - - SocketControls.getInstance().addSocket(csocket); + judpSocket jsocket=new judpSocket(csocket); + sessionHandoff.put(jsocket); + SocketManager.getInstance().addGC(jsocket,csocket); } catch (InterruptedException e) { e.printStackTrace(); } @@ -112,41 +94,19 @@ public void run() { serverThread.start(); return true; } -/** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * ôݶȡ - * @param isRead - */ -public void setBufferRW(boolean isRead) -{ - this.isRWMaster=isRead; - -} -/** - * ôݶȡ - * Ĭ false - * @param islarge - */ -public void setLargeRead(boolean islarge) -{ - this.islagerRead=islarge; -} /** * ӵsocket */ public judpSocket accept() { - UDTSocket socket=SocketControls.getInstance().getSocket(); - if(socket==null) - { - socket=SocketControls.getInstance().getSocket(); - } - judpSocket jsocket=new judpSocket(socket); - judpSocketManager.getInstance(socket.getEndpoint()).addSocket(jsocket); - return jsocket; - +try { + judpSocket jsocket= sessionHandoff.take(); + return jsocket; +} catch (InterruptedException e) { + logger.info("judpSocketжϣ"+e.getMessage()); + e.printStackTrace(); +} +return null; } } diff --git a/judt/src/judp/judpSocket.java b/judt/src/judp/judpSocket.java index ebf6d0e..25e55fe 100644 --- a/judt/src/judp/judpSocket.java +++ b/judt/src/judp/judpSocket.java @@ -7,6 +7,7 @@ import java.net.InetAddress; import java.net.UnknownHostException; import java.util.concurrent.TimeUnit; +import java.util.logging.Logger; import udt.UDTSession; import udt.UDTSocket; import udt.packets.Destination; @@ -15,27 +16,21 @@ * @author jinyu * *˷صӿڶ - *socketݵĶ */ public class judpSocket { -private int bufSize=65535; +private final int bufSize=1500; private UDTSocket socket=null; +private long start=System.currentTimeMillis(); private boolean isClose=false; +private long flushTime=0; +private final long waitDataLen=30*1000;//30 +private long readLen=0;//ȡ private long sendLen=0;// -private long socketID=0;//ID -private Thread closeThread; -private final int waitClose=10*1000; -private PackagetCombin pack=new PackagetCombin(); -//private int readLen=0; -public int dataLen=0; -public void setRecBufferSize(int size) -{ - bufSize=size; -} +public long socketID=0;//ID +private static final Logger logger=Logger.getLogger(judpSocket.class.getName()); public boolean getCloseState() { - //ײѾر - return isClose|socket.isClose(); + return isClose; } public judpSocket(UDTSocket usocket) { @@ -43,18 +38,8 @@ public judpSocket(UDTSocket usocket) socketID=socket.getSession().getSocketID(); } -/** - * ȡID - * @return - */ -public long getSocketID() -{ - return socketID; -} - /** * ر - * ȴɹر */ public void close() { @@ -62,84 +47,29 @@ public void close() //ʵر if(sendLen==0) { - stop(); + //ûзֱӹرգҪȴݷ + try { + socket.close(); + UDTSession serversession=socket.getEndpoint().removeSession(socketID); + if(serversession!=null) + { + serversession.getSocket().close(); + socket.getReceiver().stop(); + socket.getSender().stop(); + System.out.println("رsocket:"+serversession.getSocketID()); + } + + serversession=null; + } catch (IOException e) { + e.printStackTrace(); + } System.out.println("رsocket"); } else { //й򻺳 - //SocketManager.getInstance().add(socket); - - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(socket.getSender().isSenderEmpty()) - { - stop(); - break; - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - stop(); - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } -} - -/** - * ر - */ -public void stop() -{ - //ûзֱӹرգҪȴݷ - try { - socket.close(); - UDTSession serversession=socket.getEndpoint().removeSession(socketID); - if(serversession!=null) - { - serversession.getSocket().close(); - socket.getReceiver().stop(); - socket.getSender().stop(); - System.out.println("رsocket:"+serversession.getSocketID()); - } - - serversession=null; - } catch (IOException e) { - e.printStackTrace(); + SocketManager.getInstance().add(socket); } - System.out.println("رsocket"); } /** @@ -148,13 +78,20 @@ public void stop() */ public int readData(byte[]data) { - if(getCloseState()) + if(isClose) { return -1; } try { int r=socket.getInputStream().read(data); - //readLen+=r; + readLen+=r; + flushTime=System.currentTimeMillis(); + if(flushTime-start>waitDataLen&&readLen==0) + { + //ȴʱ䳤ȣûз͹չݣ˳ + logger.info("ʱ䵽˳ȡ:"+socketID); + return -1; + } return r; } catch (IOException e) { e.printStackTrace(); @@ -165,57 +102,84 @@ public int readData(byte[]data) /** * ȡȫ */ -public byte[] readALL() +public byte[] readData() { byte[] result=null; if(socket!=null) { byte[] readBytes=new byte[bufSize];// + byte[] buf=new byte[bufSize];// + int index=0; int r=0; - while(true) - { - if(getCloseState()) - { - return null; - } - r=readData(readBytes); - if(r==-1) - { - result=pack.getData(); - break; - } - else - { - // readLen+=r; - if(r==0) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - - continue; - } catch (InterruptedException e) { - e.printStackTrace(); + try { + while(true) + { + if(isClose) + { + return null; } - } - // - byte[] buf=new byte[r]; - System.arraycopy(readBytes, 0, buf, 0, r); - if(pack.addData(buf)) - { - result=pack.getData(); - break; - } - - - } - } + r=socket.getInputStream().read(readBytes); + if(r==-1) + { + break; + } + else + { + readLen+=r; + if(r==0) + { + try { + TimeUnit.MILLISECONDS.sleep(100); + flushTime=System.currentTimeMillis(); + if(flushTime-start>waitDataLen&&readLen==0) + { + //ûʹù + break; + } + continue; + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + if(r<=bufSize) + { + //result=new byte[r]; + //System.arraycopy(readBytes, 0, result, 0, r); + if(index+r hashMap=new WeakHashMap (); - private final HashMap,Long> map=new HashMap,Long> (); - private UDPEndPoint endPoint=null; - private static judpSocketManager instance=null; - private judpSocketManager (UDPEndPoint point){ - - startGC(); - this.endPoint=point; - - } - - /** - * ûʹõjudpSocket - */ - private void startGC() { - Thread clearSession=new Thread(new Runnable() { - - @SuppressWarnings("unchecked") - @Override - public void run() { - while(true) - { - - SocketReference k; - try { - while((k = (SocketReference) q.remove()) != null) { - try - { - map.remove(k); - long id=k.getid(); - UDTSession serversession=endPoint.removeSession(id); - if(serversession!=null) - { - serversession.getSocket().close(); - serversession.getSocket().getReceiver().stop(); - serversession.getSocket().getSender().stop(); - logger.info("socket"+id); - } - } - catch(Exception ex) - { - logger.warning("session"+ex.getMessage()); - } - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - - } - - }); - clearSession.setDaemon(true); - clearSession.setName("clearSession"); - clearSession.start(); - - } - - /** - * - * @param point - * @return - */ - public static synchronized judpSocketManager getInstance(UDPEndPoint point) { - - if (instance == null) { - - instance = new judpSocketManager(point); - - } - return instance; - } - - /** - * judpSocket - * @param socket - */ - public void addSocket(judpSocket socket) - { - SocketReference tmp=new SocketReference(socket,socket.getSocketID(),q); - hashMap.put(socket, socket.getSocketID()); - map.put(tmp, socket.getSocketID()); - if(num%10==0) - { - System.gc(); - } - num++; - } -} diff --git a/judt/src/net/File/FileMonitor.java b/judt/src/net/File/FileMonitor.java deleted file mode 100644 index c577d9f..0000000 --- a/judt/src/net/File/FileMonitor.java +++ /dev/null @@ -1,16 +0,0 @@ -/** - * - */ -package net.File; - - -import java.nio.file.WatchEvent.Kind; - -/** - * @author jinyu - * - */ -public class FileMonitor { -public String file; -public Kind kind; -} diff --git a/judt/src/net/File/FilesWatch.java b/judt/src/net/File/FilesWatch.java deleted file mode 100644 index d8a7e98..0000000 --- a/judt/src/net/File/FilesWatch.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.IOException; - -import java.nio.file.FileSystems; -import java.nio.file.Paths; -import java.nio.file.StandardWatchEventKinds; -import java.nio.file.WatchEvent; -import java.nio.file.WatchKey; -import java.nio.file.WatchService; -import java.util.concurrent.LinkedBlockingQueue; - -/** - * @author jinyu - * - */ -public class FilesWatch { - -private WatchService watcher = null; - private String dir; - private Thread checkThread=null; - private LinkedBlockingQueue queue=new LinkedBlockingQueue(); - private boolean isStop=false; - public FilesWatch() - { - try { - watcher = FileSystems.getDefault().newWatchService(); - } catch (IOException e) { - - e.printStackTrace(); - } - } - public void setWatch(String dir) - { - this.dir=dir; - } - public void stop() - { - isStop=true; - } - public FileMonitor take() - { - try { - return queue.take(); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - return null; - } - public void start() - { - checkThread =new Thread(new Runnable() { - - @Override - public void run() { - try - { - Paths.get(dir).register(watcher, - StandardWatchEventKinds.ENTRY_CREATE, - StandardWatchEventKinds.ENTRY_DELETE, - StandardWatchEventKinds.ENTRY_MODIFY); - } - catch(Exception ex) - { - - } - while (!isStop) { - WatchKey key; - try { - key = watcher.take(); - for (WatchEvent event: key.pollEvents()) { - FileMonitor e=new FileMonitor(); - e.file=event.context().toString(); - e.kind=event.kind(); - queue.put(e); - } - - boolean valid = key.reset(); - if (!valid) { - break; - } - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - - - }); - checkThread.setDaemon(true); - checkThread.setName("monitor"); - checkThread.start(); -} -} diff --git a/judt/src/net/File/PackagetCharSet.java b/judt/src/net/File/PackagetCharSet.java deleted file mode 100644 index 094419b..0000000 --- a/judt/src/net/File/PackagetCharSet.java +++ /dev/null @@ -1,12 +0,0 @@ -/** - * - */ -package net.File; - -/** - * @author jinyu - * - */ -public class PackagetCharSet { -public static String CharSet="UTF-8"; -} diff --git a/judt/src/net/File/ReadXml.java b/judt/src/net/File/ReadXml.java deleted file mode 100644 index 1ea849c..0000000 --- a/judt/src/net/File/ReadXml.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.StringReader; -import java.net.URL; -import java.net.URLDecoder; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; -import org.w3c.dom.NodeList; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - -/** - * @author jinyu - * - */ -public class ReadXml { - public static String getPath() { - URL url = ReadXml.class.getProtectionDomain().getCodeSource().getLocation(); - String filePath = null; - try { - filePath = URLDecoder.decode(url.getPath(), "utf-8");// תΪutf-8 - } catch (Exception e) { - e.printStackTrace(); - } - if (filePath.endsWith(".jar")) {// ִjarеĽ".jar" - // ȡ·еjar - filePath = filePath.substring(0, filePath.lastIndexOf("/") + 1); - } - - File file = new File(filePath); - - // /If this abstract pathname is already absolute, then the pathname - // string is simply returned as if by the getPath method. If this - // abstract pathname is the empty abstract pathname then the pathname - // string of the current user directory, which is named by the system - // property user.dir, is returned. - filePath = file.getAbsolutePath();//õwindowsµȷ· - return filePath; - } -public String readXml(String file) -{ - File f=new File(file); - if(!f.exists()) - { - return ""; - } - // - String xmlStr= readFile(file).trim(); - StringReader sr = new StringReader(xmlStr); - InputSource is = new InputSource(sr); - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - DocumentBuilder builder = null; - try { - builder = factory.newDocumentBuilder(); - } catch (ParserConfigurationException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - Document doc = null; - try { - doc = (Document) builder.parse(is); - } catch (SAXException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - NodeList list=doc.getElementsByTagName("IP"); - String ip= list.item(0).getTextContent(); - list=doc.getElementsByTagName("Port"); - String port=list.item(0).getTextContent(); - list=doc.getElementsByTagName("Dir"); - String dir=list.item(0).getTextContent(); - String strxml=ip+","+port+","+dir; - return strxml; - } -private String readFile(String file) -{ - StringBuilder result = new StringBuilder(); - try{ - BufferedReader br = new BufferedReader(new FileReader(file));//һBufferedReaderȡļ - String s = null; - while((s = br.readLine())!=null){//ʹreadLineһζһ - result.append(System.lineSeparator()+s); - } - br.close(); - }catch(Exception e){ - e.printStackTrace(); - } - return result.toString(); -} -} diff --git a/judt/src/net/File/RecviceFiles.java b/judt/src/net/File/RecviceFiles.java deleted file mode 100644 index f13f92e..0000000 --- a/judt/src/net/File/RecviceFiles.java +++ /dev/null @@ -1,251 +0,0 @@ -/** - * - */ -package net.File; - - -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpServer; -import judp.judpSocket; - - - -/** - * ļ - * @author jinyu - * - */ -public class RecviceFiles { -private judpServer server=null; -private Thread recThread=null; -private static Logger log=Logger.getLogger(RecviceFiles.class.getName()); -private String dir=""; -private ExecutorService pools = Executors.newCachedThreadPool(); -public void setDir(String dir) -{ - this.dir=dir; -} -public boolean start(String host,int port) -{ - File cur=new File(dir); - if(!cur.exists()) - { - cur.mkdir(); - } - server=new judpServer(host, port); - boolean r= server.start(); - recThread=new Thread(new Runnable() { - - private ConcurrentHashMap fileInfo=new ConcurrentHashMap(); - private ConcurrentHashMap hashFile=new ConcurrentHashMap(); - - @Override - public void run() { - - while(true) - { - - judpSocket ss= server.accept(); - pools.execute(new Runnable() { - String fileName=""; - private long sumBytes=0; - private ConcurrentLinkedQueue recQueue=new ConcurrentLinkedQueue(); - private boolean isStop=false; - /** - * дļ - * @param data - * @return - */ - private boolean writeFile(byte[] data) - { - try - { - String filePath=dir+"/"+fileName; - FileOutputStream fs=new FileOutputStream(filePath+".tmp",true); - DataOutputStream out=new DataOutputStream(fs); - out.write(data); - out.close(); - File f=new File(filePath+".tmp"); - long flen=fileInfo.get(fileName); - if(flen==f.length()) - { - // - log.info(fileName+""); - fileInfo.remove(fileName); - hashFile.remove(fileName); - // - f.renameTo(new File(filePath)); // - return true; - } - log.info(fileName+":"+f.length()); - } - catch (Exception e) - { - e.printStackTrace(); - } - return false; - } - - /** - * дļ - */ - private void recData() - { - Thread fileW=new Thread(new Runnable() { - - @Override - public void run() { - while(!isStop) - { - byte[]tmp=recQueue.poll(); - if(tmp==null) - { - try { - TimeUnit.MILLISECONDS.sleep(100); - } catch (InterruptedException e) { - - e.printStackTrace(); - } - continue; - } - if(writeFile(tmp)) - { - isStop=true; - break; - } - } - // - recQueue.clear(); - System.gc(); - } - - }); - fileW.setDaemon(true); - fileW.setName(fileName+"_Thread"); - fileW.start(); - } - @Override - public void run() { - byte[] recData=new byte[65535]; - long lastTime=System.currentTimeMillis(); - long speed=0; - while(!isStop) - { - int r= ss.readData(recData); - if(r==0) - { - continue; - } - else if(r==-1) - { - break; - } - //Ip - String key=ss.getRemoteHost()+ss.getRemoteHost(); - if (hashFile.containsKey(key)) { - //˵ǽ - byte[] tmp=new byte[r]; - System.arraycopy(recData, 0, tmp, 0, r); - sumBytes+=r; - recQueue.offer(tmp); - // - try - { - // - long timespan=System.currentTimeMillis()-lastTime; - if(timespan>1000) - { - speed=sumBytes/(timespan/1000); - sumBytes=0;//Ѿ - lastTime=System.currentTimeMillis(); - } - else - { - //1s - } - - } - catch(Exception ex) - { - - } - log.info("ļٶ(M/S)"+speed/1024/1024); - } - else - { - //Ϣ - String info = null; - try { - info = new String(recData,0,r,PackagetCharSet.CharSet); - } catch (UnsupportedEncodingException e) { - - e.printStackTrace(); - } - String[] finfo=info.split(","); - if(finfo!=null&&finfo.length==2) - { - String name=""; - long len=0; - if(finfo[0].startsWith("File:")) - { - name=finfo[0].substring(5); - } - if(finfo[1].startsWith("Length:")) - { - String flen=finfo[1].substring(7); - len=Long.valueOf(flen); - } - hashFile.put(key, 1L); - fileInfo.put(name, len); - fileName=name; - if(len==0) - { - //ļ - byte[]tmp=name.getBytes(); - ByteBuffer buf=ByteBuffer.allocate(tmp.length+4); - buf.putInt(tmp.length); - buf.put(tmp); - writeFile(buf.array()); - break; - } - else - { - recData(); - } - try { - ss.sendData(("initServer:"+name).getBytes(PackagetCharSet.CharSet)); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - ss.setLargeRead(true); - log.info("Ϣ"); - - } - } - } - // - ss.close(); - - } - }); - - } - } - }); - recThread.setDaemon(true); - recThread.setName("recfiles"); - recThread.start(); -return r; -} -} diff --git a/judt/src/net/File/SendFiles.java b/judt/src/net/File/SendFiles.java deleted file mode 100644 index 4c9d7a8..0000000 --- a/judt/src/net/File/SendFiles.java +++ /dev/null @@ -1,150 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; - -import judp.judpClient; - - - - -/** - * ļ - * @author jinyu - * - */ -public class SendFiles { -private judpClient client=null; -private final int bufSize=10*1024*1024; -private String remoteHost=""; -private int remotePort=0; -private static Logger log=Logger.getLogger(SendFiles.class.getName()); - public SendFiles(String host,int port) - { - this.remoteHost=host; - this.remotePort=port; - } -public void sendFile(String path) -{ - File dir=new File(path); - if(!dir.exists()) - { - return; - } - // - File[] f=null; - if(dir.isDirectory()) - { - f=dir.listFiles(); - } - else - { - f=new File[] {dir}; - } - readSend(f); -} -private void readSend(File[]files) -{ - if(files==null||files.length==0) - { - return; - } - // - for(int i=0;i1000) - { - //10ʱ - client.close(); - log.warning("ʱļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - if(r==0&&client.isClose()) - { - //ʱ - client.close(); - log.warning("նûлִļʧܣ"+f.getName()); - buf=null; - System.gc(); - return; - } - else if(r>0) - { - break; - } - } - String serverinfp=new String(infobytes,0,r,PackagetCharSet.CharSet); - String rsp="initServer:"+f.getName(); - if(!serverinfp.equals(rsp)) - { - client.close(); - return; - } - log.info("ȡļ"); - dis = new DataInputStream(new FileInputStream(f)); - int count=0; - long startTime=System.currentTimeMillis(); - while((count=dis.read(buf,0, bufSize))!=-1) - { - - if(count==bufSize) - { - client.sendData(buf); - log.info("ͣ"+f.getName()+","+bufSize); - } - else - { - byte[] tmp=new byte[count]; - System.arraycopy(buf, 0, tmp, 0, tmp.length); - client.sendData(tmp); - log.info("ͣ"+f.getName()+","+count); - } - - } - long endTime=System.currentTimeMillis(); - client.close(); - dis.close(); - long speed=fLen/((endTime-startTime)/1000); - log.info("ɣ"+f.getName()+",ƽٶ(M/S)"+speed/1024/1024); - - } - catch(Exception ex) - { - - } - -} -} diff --git a/judt/src/net/File/TestRecFiles.java b/judt/src/net/File/TestRecFiles.java deleted file mode 100644 index 7652fae..0000000 --- a/judt/src/net/File/TestRecFiles.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - */ -package net.File; - -import java.io.IOException; -import java.util.logging.Logger; - - - - -/** - * @author jinyu - * - */ -public class TestRecFiles { - private static Logger log=Logger.getLogger(TestRecFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //192.168.30.128 - ReadXml rd=new ReadXml(); - String xml= rd.readXml(ReadXml.getPath()+"/config.xml"); - String[] config=null; - if(xml!=null) - { - config=xml.split(","); - } - RecviceFiles rec=new RecviceFiles(); - String dir=config[2]; - rec.setDir(dir); - rec.start(config[0], Integer.valueOf(config[1])); - log.info("ļ"); - try { - System.in.read(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - -} diff --git a/judt/src/net/File/TestSendFiles.java b/judt/src/net/File/TestSendFiles.java deleted file mode 100644 index d904b6a..0000000 --- a/judt/src/net/File/TestSendFiles.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * - */ -package net.File; - - -import java.util.logging.Logger; - -import net.File.FileMonitor; -import net.File.FilesWatch; - - - - -/** - * @author jinyu - * - */ -public class TestSendFiles { - private static Logger log=Logger.getLogger(TestSendFiles.class.getName()); - /** - * @param args - */ - public static void main(String[] args) { - //SendFiles send=new SendFiles("192.168.9.152", 5555); - //192.168.30.128 - - ReadXml rd=new ReadXml(); - String xml= rd.readXml(ReadXml.getPath()+"/Config.xml"); - String[] config=null; - if(xml!=null) - { - config=xml.split(","); - } - SendFiles send=new SendFiles(config[0], Integer.valueOf(config[1])); - FilesWatch watch=new FilesWatch(); - String dir=config[2]; - watch.setWatch(dir); - watch.start(); - while(true) - { - FileMonitor ff= watch.take(); - log.info(ff.file); - if(ff.file.endsWith(".tmp")) - { - continue; - } - send.sendFile(dir+"/"+ff.file); - } - } - -} diff --git a/judt/src/udt/ClientSession.java b/judt/src/udt/ClientSession.java index 959b0de..e62b557 100644 --- a/judt/src/udt/ClientSession.java +++ b/judt/src/udt/ClientSession.java @@ -51,7 +51,7 @@ public class ClientSession extends UDTSession { private static final Logger logger=Logger.getLogger(ClientSession.class.getName()); private UDPEndPoint endPoint; - public volatile int connectNum=0;//cd + public ClientSession(UDPEndPoint endPoint, Destination dest)throws SocketException{ super("ClientSession localPort="+endPoint.getLocalPort(),dest); this.endPoint=endPoint; @@ -109,11 +109,10 @@ public void received(UDTPacket packet, Destination peer) { long peerSocketID=hs.getSocketID(); destination.setSocketID(peerSocketID); setState(ready); - Thread.sleep(50); this.setInitialSequenceNumber(hs.getInitialSeqNo());//cd - System.out.println("ʼû2:"+this.getInitialSequenceNumber()); socket=new UDTSocket(endPoint,this); + }catch(Exception ex){ logger.log(Level.WARNING,"Error creating socket",ex); setState(invalid); @@ -162,7 +161,6 @@ protected void sendHandShake()throws IOException{ handshake.setSession(this); logger.info("Sending "+handshake); endPoint.doSend(handshake); - connectNum++; } //2nd handshake for connect diff --git a/judt/src/udt/ServerSession.java b/judt/src/udt/ServerSession.java index 253810a..1c2c9b9 100644 --- a/judt/src/udt/ServerSession.java +++ b/judt/src/udt/ServerSession.java @@ -75,6 +75,7 @@ public void received(UDTPacket packet, Destination peer){ if (getState()<=ready){ destination.setSocketID(connectionHandshake.getSocketID()); + if(getState()<=handshaking){ setState(handshaking); } @@ -125,7 +126,6 @@ public void received(UDTPacket packet, Destination peer){ else{ try{ - if(packet.forSender()){ socket.getSender().receive(packet); }else{ diff --git a/judt/src/udt/UDPEndPoint.java b/judt/src/udt/UDPEndPoint.java index 293f808..2db8a93 100644 --- a/judt/src/udt/UDPEndPoint.java +++ b/judt/src/udt/UDPEndPoint.java @@ -210,13 +210,6 @@ public void addSession(Long destinationID,UDTSession session){ public UDTSession getSession(Long destinationID){ return sessions.get(destinationID); } - - /** - * Ƴsession - * cd - * @param socketid - * @return - */ public UDTSession removeSession(long socketid) { //cd @@ -292,7 +285,7 @@ protected void doReceive()throws IOException{ } } peer.setSocketID(((ConnectionHandshake)packet).getSocketID()); - session.received(packet,peer); + session.received(packet,peer); } } else{ @@ -303,7 +296,7 @@ protected void doReceive()throws IOException{ session=lastSession; } else{ - session=sessions.get(dest);//cd + session=sessions.get(dest); lastSession=session; lastDestID=dest; } @@ -315,19 +308,10 @@ protected void doReceive()throws IOException{ } else{ session.received(packet,peer); - } } }catch(SocketException ex){ - if(ex.getMessage().equals("socket closed")&&stopped) - { - //cd - //Ѿر - } - else - { - logger.log(Level.INFO, "SocketException: "+ex.getMessage()); - } + logger.log(Level.INFO, "SocketException: "+ex.getMessage()); }catch(SocketTimeoutException ste){ //can safely ignore... we will retry until the endpoint is stopped } diff --git a/judt/src/udt/UDTClient.java b/judt/src/udt/UDTClient.java index 80ba986..f298118 100644 --- a/judt/src/udt/UDTClient.java +++ b/judt/src/udt/UDTClient.java @@ -50,8 +50,7 @@ public class UDTClient { private final UDPEndPoint clientEndpoint; private ClientSession clientSession; private boolean close=false; - private Thread closeThread=null;//cd - private final int waitClose=10*1000; + public UDTClient(InetAddress address, int localport)throws SocketException, UnknownHostException{ //create endpoint clientEndpoint=new UDPEndPoint(address,localport); @@ -100,18 +99,10 @@ public void connect(String host, int port)throws InterruptedException, UnknownHo * @throws InterruptedException */ public void send(byte[]data)throws IOException, InterruptedException{ - if(close) - { - return;//cd - } clientSession.getSocket().doWrite(data); } public void sendBlocking(byte[]data)throws IOException, InterruptedException{ - if(close) - { - return;//cd - } clientSession.getSocket().doWriteBlocking(data); } @@ -175,70 +166,6 @@ public long getSocketID() return clientSession.getSocketID(); } - /** - * ͬر - * ȴݷɺٹر - * ֻȴ10ss - */ - public synchronized void close() - { - close=true; - if(closeThread==null) - { - closeThread=new Thread(new Runnable() { - - @Override - public void run() { - int num=0; - while(true) - { - if(clientSession.getSocket().getSender().isSenderEmpty()) - { - try { - shutdown(); - break; - } catch (IOException e) { - - e.printStackTrace(); - } - } - else - { - try { - TimeUnit.MILLISECONDS.sleep(100); - num++; - if(waitClose<=num*100) - { - try { - shutdown(); - } catch (IOException e) { - - e.printStackTrace(); - } - break; - } - } catch (InterruptedException e) { - - e.printStackTrace(); - } - } - } - - } - - }); - closeThread.setDaemon(true); - closeThread.setName("closeThread"); - } - if(closeThread.isAlive()) - { - return; - } - else - { - closeThread.start(); - } - } public boolean isClose() { diff --git a/judt/src/udt/UDTCongestionControl.java b/judt/src/udt/UDTCongestionControl.java index ecf5836..fea7c51 100644 --- a/judt/src/udt/UDTCongestionControl.java +++ b/judt/src/udt/UDTCongestionControl.java @@ -151,7 +151,7 @@ public void onACK(long ackSeqno){ packetSendingPeriod=1000000.0/packetArrivalRate; } else{ - packetSendingPeriod=(double)congestionWindowSize/(roundTripTime+Util.getSYNTimeD()); + packetSendingPeriod=congestionWindowSize/(roundTripTime+Util.getSYNTimeD()); } } diff --git a/judt/src/udt/UDTInputStream.java b/judt/src/udt/UDTInputStream.java index 5ba7fa4..c1c6e72 100644 --- a/judt/src/udt/UDTInputStream.java +++ b/judt/src/udt/UDTInputStream.java @@ -59,10 +59,6 @@ public class UDTInputStream extends InputStream { private volatile boolean closed=false; private volatile boolean blocking=true; - - private volatile boolean hasData=false;//cd - - /** * create a new {@link UDTInputStream} connected to the given socket @@ -170,7 +166,6 @@ private void updateCurrentChunk(boolean block)throws IOException{ * */ protected boolean haveNewData(long sequenceNumber,byte[]data)throws IOException{ - hasData=true;//cd return receiveBuffer.offer(new AppData(sequenceNumber,data)); } @@ -204,38 +199,7 @@ public int getReceiveBufferSize(){ protected void noMoreData()throws IOException{ expectMoreData.set(false); } - - /** - * жûݽ - * cd - * @return - */ - public boolean isHasData() - { - return hasData; - } - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * islagerRead=true - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - receiveBuffer.resetBufMaster(isRead); - - } - - /** - * ôݶȡ - * Ĭ false - * @param islarge - */ - public void setLargeRead(boolean islarge) - { - receiveBuffer.setLargeRead(islarge); - } + /** * used for storing application data and the associated * sequence number in the queue in ascending order @@ -284,8 +248,8 @@ public boolean equals(Object obj) { return false; return true; } - - + + } } diff --git a/judt/src/udt/UDTReceiver.java b/judt/src/udt/UDTReceiver.java index 9100a21..3051801 100644 --- a/judt/src/udt/UDTReceiver.java +++ b/judt/src/udt/UDTReceiver.java @@ -155,8 +155,6 @@ public class UDTReceiver { private final boolean storeStatistics; - - /** * create a receiver with a valid {@link UDTSession} * @param session @@ -244,7 +242,6 @@ public void receiverAlgorithm()throws InterruptedException,IOException{ if(nextNAK0){ sendNAK(currentSequenceNumber); - } else if(SequenceNumber.compare(currentSequenceNumber,largestReceivedSeqNumber)<0){ /*(6.b).if the sequence number is less than LRSN,remove it from * the receiver's loss list */ receiverLossList.remove(currentSequenceNumber); - } - + statistics.incNumberOfReceivedDataPackets(); //(7).Update the LRSN @@ -483,7 +476,6 @@ protected void sendNAK(ListsequenceNumbers)throws IOException{ nAckPacket.setDestinationID(session.getDestination().getSocketID()); endpoint.doSend(nAckPacket); statistics.incNumberOfNAKSent(); - } protected long sendLightAcknowledgment(long ackNumber)throws IOException{ @@ -543,6 +535,7 @@ protected void onAck2PacketReceived(Acknowledgment2 ack2){ if(entry!=null){ long ackNumber=entry.getAckNumber(); largestAcknowledgedAckNumber=Math.max(ackNumber, largestAcknowledgedAckNumber); + long rtt=entry.getAge(); if(roundTripTime>0)roundTripTime = (roundTripTime*7 + rtt)/8; else roundTripTime = rtt; diff --git a/judt/src/udt/UDTSender.java b/judt/src/udt/UDTSender.java index f5f44d0..599e7be 100644 --- a/judt/src/udt/UDTSender.java +++ b/judt/src/udt/UDTSender.java @@ -117,10 +117,6 @@ public class UDTSender { private final AtomicReference waitForSeqAckLatch=new AtomicReference(); private final boolean storeStatistics; - - // cd - private volatile int bufferNum=0; - private volatile boolean isModify=true; public UDTSender(UDTSession session,UDPEndPoint endpoint){ if(!session.isReady())throw new IllegalStateException("UDTSession is not ready."); @@ -250,31 +246,7 @@ else if (p instanceof KeepAlive) { protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ waitForAckLatch.get().countDown(); waitForSeqAckLatch.get().countDown(); - //cd - long ackNumber=acknowledgement.getAckNumber(); - // cd - if(this.session instanceof ClientSession) - { - //cd - if(this.isModify) - { - //Ѿ͹10000ΪշѾر - if(bufferNum<10000) - { - if(ackNumber/100000!=this.session.getInitialSequenceNumber()/100000) - { - //ΪͬεseqNo,ͨŵĽշsession - statistics.incNumberOfACKReceived(); - if(storeStatistics)statistics.storeParameters(); - return; - } - } - else - { - this.isModify=false;// - } - } - } + CongestionControl cc=session.getCongestionControl(); long rtt=acknowledgement.getRoundTripTime(); if(rtt>0){ @@ -289,9 +261,8 @@ protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ statistics.setPacketArrivalRate(cc.getPacketArrivalRate(), cc.getEstimatedLinkCapacity()); } - + long ackNumber=acknowledgement.getAckNumber(); cc.onACK(ackNumber); - statistics.setCongestionWindowSize((long)cc.getCongestionWindowSize()); //need to remove all sequence numbers up the ack number from the sendBuffer boolean removed=false; @@ -301,15 +272,11 @@ protected void onAcknowledge(Acknowledgement acknowledgement)throws IOException{ } if(removed){ unacknowledged.decrementAndGet(); - bufferNum++;//cd } } - - lastAckSequenceNumber=Math.max(lastAckSequenceNumber, ackNumber); - + lastAckSequenceNumber=Math.max(lastAckSequenceNumber, ackNumber); //send ACK2 packet to the receiver sendAck2(ackNumber); - // statistics.incNumberOfACKReceived(); if(storeStatistics)statistics.storeParameters(); } @@ -361,7 +328,6 @@ public void senderAlgorithm()throws InterruptedException, IOException{ if (!senderLossList.isEmpty()) { Long entry=senderLossList.getFirstEntry(); handleResubmit(entry); - logger.info("senderLossList:"+entry); } else @@ -504,21 +470,4 @@ public void pause(){ startLatch=new CountDownLatch(1); paused=true; } - - /** - * ͵ - * cd - * @return - */ - public boolean isSenderEmpty() - { - if(senderLossList.isEmpty()&&sendBuffer.isEmpty()&&sendQueue.isEmpty()) - { - return true; - } - else - { - return false; - } - } } diff --git a/judt/src/udt/UDTSession.java b/judt/src/udt/UDTSession.java index 0ff9dfe..d7a45f2 100644 --- a/judt/src/udt/UDTSession.java +++ b/judt/src/udt/UDTSession.java @@ -210,7 +210,7 @@ public long getSocketID(){ public synchronized long getInitialSequenceNumber(){ if(initialSequenceNumber==null){ - initialSequenceNumber=1l; + initialSequenceNumber=1l; //TODO must be random? } return initialSequenceNumber; } diff --git a/judt/src/udt/UDTSocket.java b/judt/src/udt/UDTSocket.java index c070e4a..d47ea35 100644 --- a/judt/src/udt/UDTSocket.java +++ b/judt/src/udt/UDTSocket.java @@ -186,15 +186,12 @@ protected void doWrite(byte[]data, int offset, int length, int timeout, TimeUnit packet.setSession(session); packet.setDestinationID(session.getDestination().getSocketID()); packet.setData(chunk); - //put the packet into the send queue if(!sender.sendUdtPacket(packet, timeout, units)){ throw new IOException("Queue full"); } - } if(length>0)active=true; - } /** * will block until the outstanding packets have really been sent out diff --git a/judt/src/udt/packets/Acknowledgment2.java b/judt/src/udt/packets/Acknowledgment2.java index e16a34c..1e881bc 100644 --- a/judt/src/udt/packets/Acknowledgment2.java +++ b/judt/src/udt/packets/Acknowledgment2.java @@ -62,7 +62,7 @@ public void setAckSequenceNumber(long ackSequenceNumber) { void decode(byte[]data){ } - + @Override public boolean forSender(){ return false; @@ -73,11 +73,6 @@ public boolean forSender(){ public byte[] encodeControlInformation(){ return empty; } - @Override - protected long getAdditionalInfo(){ - return ackSequenceNumber; - } - } diff --git a/judt/src/udt/util/ReceiveBuffer.java b/judt/src/udt/util/ReceiveBuffer.java index 51ba476..5e5061b 100644 --- a/judt/src/udt/util/ReceiveBuffer.java +++ b/judt/src/udt/util/ReceiveBuffer.java @@ -1,7 +1,5 @@ package udt.util; -import java.util.HashMap; -import java.util.HashSet; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.Condition; @@ -38,13 +36,7 @@ public class ReceiveBuffer { //the size of the buffer private final int size; - - //cd - private final HashSet hashSeqNo; - private final HashMap hashOffset; - private final int leftNum=5; - private boolean isRWMaster=true; - private boolean islagerRead=false;//ݶȡҲҪⲿٶȡ + public ReceiveBuffer(int size, long initialSequenceNumber){ this.size=size; this.buffer=new AppData[size]; @@ -52,8 +44,7 @@ public ReceiveBuffer(int size, long initialSequenceNumber){ lock=new ReentrantLock(false); notEmpty=lock.newCondition(); highestReadSequenceNumber=SequenceNumber.decrement(initialSequenceNumber); - this.hashSeqNo=new HashSet(size); - this.hashOffset=new HashMap(size); + System.out.println("SIZE: "+size); } public boolean offer(AppData data){ @@ -68,47 +59,8 @@ public boolean offer(AppData data){ //else compute insert position int offset=(int)SequenceNumber.seqOffset(initialSequenceNumber, seq); int insert=offset% size; - if(islagerRead) - { - // cd Ϊݶȡ׼ - if(isRWMaster&&buffer[insert]==null) - { - //ǶȡΪܸǣ cd - buffer[insert]=data; - } - else if(!isRWMaster) - { - //ԸǣдΪֱӴ洢 cd - buffer[insert]=data; - } - else - { - //ܸǣûжȡ򷵻ضʧ cd - //һظǰݣhashSeqNoɾ - // Ƚ뵱ǰ - long id= buffer[insert].getSequenceNumber(); - if(id>seq) - { - //Ѿ洢µݣ˵ǰǾݣֱӶʧ - //Ҫ - return true; - } - return false; - } - - if(hashSeqNo.add(seq)) - { - //ûнܹ cd - numValidChunks.incrementAndGet();//ûнظܵ - hashOffset.put(insert, seq); - } - } - else - { - //ԭ룬Сݽȫ - buffer[insert]=data; - numValidChunks.incrementAndGet(); - } + buffer[insert]=data; + numValidChunks.incrementAndGet(); notEmpty.signal(); return true; }finally{ @@ -167,36 +119,7 @@ public AppData poll(){ increment(); highestReadSequenceNumber=thisSeq; } - else - { - - if(this.islagerRead) - { - //cd - //ΪգжǷǸ cd - // ǵֵ - if(highestReadSequenceNumber+1thisSeq+1) - { - //˵طռλãµֵûнȥ - //˵Ѿȡ - if(this.isRWMaster) - { - //дΪʱݾֱӸˣҪؿ - buffer[readPosition]=null;// - } - - } - } - return null; - } + else return null; } // else{ // System.out.println("empty HEAD at pos="+readPosition); @@ -205,17 +128,10 @@ else if(highestReadSequenceNumber>thisSeq+1) // Thread.yield(); // }catch(InterruptedException e){}; // } - if(this.islagerRead) - { - // cd - if(readPosition>this.size-leftNum) - { - clearHash(readPosition); - } - } + return r; } - + public int getSize(){ return size; } @@ -223,15 +139,7 @@ public int getSize(){ void increment(){ buffer[readPosition]=null; readPosition++; - - if(readPosition==size) - {readPosition=0; - if(this.islagerRead) - { - //cd - clearDeHash(this.size-leftNum); - } - } + if(readPosition==size)readPosition=0; numValidChunks.decrementAndGet(); } @@ -239,52 +147,4 @@ public boolean isEmpty(){ return numValidChunks.get()==0; } - /** - * ظ - * cd - * @param position - */ - private void clearHash(int position) - { - for(int i=0;iposition-1;i--) - { - Long seqNo=hashOffset.remove(i); - hashSeqNo.remove(seqNo); - } - } - - /** - * ǶȡΪдΪ - * дΪȡٶʱݸǶʧ - * Ĭ϶ȡΪûжȡǣݣȴظ - * islagerRead=true - * @param isRead - */ - public void resetBufMaster(boolean isRead) - { - this.isRWMaster=isRead; - } - - /** - * ôݶȡ - * Ĭ false - * @param islarge - */ - public void setLargeRead(boolean islarge) - { - this.islagerRead=islarge; - } } diff --git a/recFile.bat b/recFile.bat deleted file mode 100644 index 2a30312..0000000 --- a/recFile.bat +++ /dev/null @@ -1 +0,0 @@ -java -jar recFile.jar \ No newline at end of file diff --git a/recFile.jar b/recFile.jar deleted file mode 100644 index 53693f7..0000000 Binary files a/recFile.jar and /dev/null differ diff --git a/sendFile.bat b/sendFile.bat deleted file mode 100644 index 88633ba..0000000 --- a/sendFile.bat +++ /dev/null @@ -1 +0,0 @@ -java -jar sendFile.jar \ No newline at end of file diff --git a/sendFile.jar b/sendFile.jar deleted file mode 100644 index 72829a3..0000000 Binary files a/sendFile.jar and /dev/null differ diff --git a/sendFiles.jar b/sendFiles.jar deleted file mode 100644 index 5cfcee2..0000000 Binary files a/sendFiles.jar and /dev/null differ diff --git "a/\346\233\264\346\226\260\350\257\264\346\230\216.txt" "b/\346\233\264\346\226\260\350\257\264\346\230\216.txt" index 11dfe7c..6788c52 100644 --- "a/\346\233\264\346\226\260\350\257\264\346\230\216.txt" +++ "b/\346\233\264\346\226\260\350\257\264\346\230\216.txt" @@ -1,24 +1 @@ -һ.Դ޸ -2017.10.11 -1.޸ijʼseqNo -2.޸Acknowledgment2ʵgetAdditionalInfo -3.޸UDTSenderack,ֵܲȷ -4.޸ĽUDTInputStreamhasDataжݽ -5.UDTInputStreamӴݽշӿresetBufMastersetLargeReadΪݻḲǣٶȡʱ -6.޸UDTSenderжϣȫ򷵻true,ffalse -7.UDTClient޸ģcloseֶμֶ߳Σcloseȴ10sݷͣԭshutdownֱر -2.װ - -1.SocketManagerʹãⲿʹòڹҪԼʹɺر - -2.judpClientװUDTClientݷͶ - -3.judpServerװUDTServerSocketݽն - -4.judpSocketװUDTServerSocketصudtsocket - -5.RecviceFilesװļգշװ±д(Դļûж - -6.SendFilesװļͣշװ±д(Դļûж - - +1.ݿ \ No newline at end of file