Search in sources :

Example 1 with Void

use of java.lang.Void in project hadoop by apache.

the class TestFetcher method testInterruptInMemory.

@Test(timeout = 10000)
public void testInterruptInMemory() throws Exception {
    final int FETCHER = 2;
    IFileWrappedMapOutput<Text, Text> immo = spy(new InMemoryMapOutput<Text, Text>(job, id, mm, 100, null, true));
    when(mm.reserve(any(TaskAttemptID.class), anyLong(), anyInt())).thenReturn(immo);
    doNothing().when(mm).waitForResource();
    when(ss.getHost()).thenReturn(host);
    String replyHash = SecureShuffleUtils.generateHash(encHash.getBytes(), key);
    when(connection.getResponseCode()).thenReturn(200);
    when(connection.getHeaderField(ShuffleHeader.HTTP_HEADER_NAME)).thenReturn(ShuffleHeader.DEFAULT_HTTP_HEADER_NAME);
    when(connection.getHeaderField(ShuffleHeader.HTTP_HEADER_VERSION)).thenReturn(ShuffleHeader.DEFAULT_HTTP_HEADER_VERSION);
    when(connection.getHeaderField(SecureShuffleUtils.HTTP_HEADER_REPLY_URL_HASH)).thenReturn(replyHash);
    ShuffleHeader header = new ShuffleHeader(map1ID.toString(), 10, 10, 1);
    ByteArrayOutputStream bout = new ByteArrayOutputStream();
    header.write(new DataOutputStream(bout));
    final StuckInputStream in = new StuckInputStream(new ByteArrayInputStream(bout.toByteArray()));
    when(connection.getInputStream()).thenReturn(in);
    doAnswer(new Answer<Void>() {

        public Void answer(InvocationOnMock ignore) throws IOException {
            in.close();
            return null;
        }
    }).when(connection).disconnect();
    Fetcher<Text, Text> underTest = new FakeFetcher<Text, Text>(job, id, ss, mm, r, metrics, except, key, connection, FETCHER);
    underTest.start();
    // wait for read in inputstream
    in.waitForFetcher();
    underTest.shutDown();
    // rely on test timeout to kill if stuck
    underTest.join();
    assertTrue(in.wasClosedProperly());
    verify(immo).abort();
}
Also used : TaskAttemptID(org.apache.hadoop.mapreduce.TaskAttemptID) DataOutputStream(java.io.DataOutputStream) Text(org.apache.hadoop.io.Text) ByteArrayOutputStream(java.io.ByteArrayOutputStream) IOException(java.io.IOException) ByteArrayInputStream(java.io.ByteArrayInputStream) InvocationOnMock(org.mockito.invocation.InvocationOnMock) Void(java.lang.Void) Test(org.junit.Test)

Example 2 with Void

use of java.lang.Void in project hadoop by apache.

the class TestFetcher method testCopyFromHostWithRetry.

@SuppressWarnings("unchecked")
@Test(timeout = 10000)
public void testCopyFromHostWithRetry() throws Exception {
    InMemoryMapOutput<Text, Text> immo = mock(InMemoryMapOutput.class);
    ss = mock(ShuffleSchedulerImpl.class);
    Fetcher<Text, Text> underTest = new FakeFetcher<Text, Text>(jobWithRetry, id, ss, mm, r, metrics, except, key, connection, true);
    String replyHash = SecureShuffleUtils.generateHash(encHash.getBytes(), key);
    when(connection.getResponseCode()).thenReturn(200);
    when(connection.getHeaderField(SecureShuffleUtils.HTTP_HEADER_REPLY_URL_HASH)).thenReturn(replyHash);
    ShuffleHeader header = new ShuffleHeader(map1ID.toString(), 10, 10, 1);
    ByteArrayOutputStream bout = new ByteArrayOutputStream();
    header.write(new DataOutputStream(bout));
    ByteArrayInputStream in = new ByteArrayInputStream(bout.toByteArray());
    when(connection.getInputStream()).thenReturn(in);
    when(connection.getHeaderField(ShuffleHeader.HTTP_HEADER_NAME)).thenReturn(ShuffleHeader.DEFAULT_HTTP_HEADER_NAME);
    when(connection.getHeaderField(ShuffleHeader.HTTP_HEADER_VERSION)).thenReturn(ShuffleHeader.DEFAULT_HTTP_HEADER_VERSION);
    when(mm.reserve(any(TaskAttemptID.class), anyLong(), anyInt())).thenReturn(immo);
    final long retryTime = Time.monotonicNow();
    doAnswer(new Answer<Void>() {

        public Void answer(InvocationOnMock ignore) throws IOException {
            // Emulate host down for 3 seconds.
            if ((Time.monotonicNow() - retryTime) <= 3000) {
                throw new java.lang.InternalError();
            }
            return null;
        }
    }).when(immo).shuffle(any(MapHost.class), any(InputStream.class), anyLong(), anyLong(), any(ShuffleClientMetrics.class), any(Reporter.class));
    underTest.copyFromHost(host);
    verify(ss, never()).copyFailed(any(TaskAttemptID.class), any(MapHost.class), anyBoolean(), anyBoolean());
}
Also used : DataOutputStream(java.io.DataOutputStream) TaskAttemptID(org.apache.hadoop.mapreduce.TaskAttemptID) IFileInputStream(org.apache.hadoop.mapred.IFileInputStream) FilterInputStream(java.io.FilterInputStream) ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) Reporter(org.apache.hadoop.mapred.Reporter) Text(org.apache.hadoop.io.Text) ByteArrayOutputStream(java.io.ByteArrayOutputStream) IOException(java.io.IOException) ByteArrayInputStream(java.io.ByteArrayInputStream) InvocationOnMock(org.mockito.invocation.InvocationOnMock) Void(java.lang.Void) Test(org.junit.Test)

Example 3 with Void

use of java.lang.Void in project hadoop by apache.

the class TestFetcher method testInterruptOnDisk.

@Test(timeout = 10000)
public void testInterruptOnDisk() throws Exception {
    final int FETCHER = 7;
    Path p = new Path("file:///tmp/foo");
    Path pTmp = OnDiskMapOutput.getTempPath(p, FETCHER);
    FileSystem mFs = mock(FileSystem.class, RETURNS_DEEP_STUBS);
    IFileWrappedMapOutput<Text, Text> odmo = spy(new OnDiskMapOutput<Text, Text>(map1ID, mm, 100L, job, FETCHER, true, mFs, p));
    when(mm.reserve(any(TaskAttemptID.class), anyLong(), anyInt())).thenReturn(odmo);
    doNothing().when(mm).waitForResource();
    when(ss.getHost()).thenReturn(host);
    String replyHash = SecureShuffleUtils.generateHash(encHash.getBytes(), key);
    when(connection.getResponseCode()).thenReturn(200);
    when(connection.getHeaderField(SecureShuffleUtils.HTTP_HEADER_REPLY_URL_HASH)).thenReturn(replyHash);
    ShuffleHeader header = new ShuffleHeader(map1ID.toString(), 10, 10, 1);
    ByteArrayOutputStream bout = new ByteArrayOutputStream();
    header.write(new DataOutputStream(bout));
    final StuckInputStream in = new StuckInputStream(new ByteArrayInputStream(bout.toByteArray()));
    when(connection.getInputStream()).thenReturn(in);
    when(connection.getHeaderField(ShuffleHeader.HTTP_HEADER_NAME)).thenReturn(ShuffleHeader.DEFAULT_HTTP_HEADER_NAME);
    when(connection.getHeaderField(ShuffleHeader.HTTP_HEADER_VERSION)).thenReturn(ShuffleHeader.DEFAULT_HTTP_HEADER_VERSION);
    doAnswer(new Answer<Void>() {

        public Void answer(InvocationOnMock ignore) throws IOException {
            in.close();
            return null;
        }
    }).when(connection).disconnect();
    Fetcher<Text, Text> underTest = new FakeFetcher<Text, Text>(job, id, ss, mm, r, metrics, except, key, connection, FETCHER);
    underTest.start();
    // wait for read in inputstream
    in.waitForFetcher();
    underTest.shutDown();
    // rely on test timeout to kill if stuck
    underTest.join();
    assertTrue(in.wasClosedProperly());
    verify(mFs).create(eq(pTmp));
    verify(mFs).delete(eq(pTmp), eq(false));
    verify(odmo).abort();
}
Also used : Path(org.apache.hadoop.fs.Path) TaskAttemptID(org.apache.hadoop.mapreduce.TaskAttemptID) DataOutputStream(java.io.DataOutputStream) Text(org.apache.hadoop.io.Text) ByteArrayOutputStream(java.io.ByteArrayOutputStream) IOException(java.io.IOException) ByteArrayInputStream(java.io.ByteArrayInputStream) InvocationOnMock(org.mockito.invocation.InvocationOnMock) FileSystem(org.apache.hadoop.fs.FileSystem) Void(java.lang.Void) Test(org.junit.Test)

Example 4 with Void

use of java.lang.Void in project WorldPainter by Captain-Chaos.

the class App method open.

public void open(final File file) {
    logger.info("Loading world " + file.getAbsolutePath());
    // Free up memory of the world and the undo buffer
    setWorld(null);
    final World2 newWorld = ProgressDialog.executeTask(this, new ProgressTask<World2>() {

        @Override
        public String getName() {
            return strings.getString("loading.world");
        }

        @Override
        public World2 execute(ProgressReceiver progressReceiver) throws OperationCancelled {
            try {
                WorldIO worldIO = new WorldIO();
                worldIO.load(new FileInputStream(file));
                World2 world = worldIO.getWorld();
                world.addHistoryEntry(HistoryEntry.WORLD_LOADED, file);
                if (logger.isDebugEnabled() && (world.getMetadata() != null)) {
                    logMetadataAsDebug(world.getMetadata());
                }
                return world;
            } catch (UnloadableWorldException e) {
                logger.error("Could not load world from file " + file, e);
                if (e.getMetadata() != null) {
                    logMetadataAsError(e.getMetadata());
                }
                reportUnloadableWorldException(e);
                return null;
            } catch (IOException e) {
                throw new RuntimeException("I/O error while loading world", e);
            }
        }

        private void appendMetadata(StringBuilder sb, Map<String, Object> metadata) {
            for (Map.Entry<String, Object> entry : metadata.entrySet()) {
                switch(entry.getKey()) {
                    case World2.METADATA_KEY_WP_VERSION:
                        sb.append("Saved with WorldPainter ").append(entry.getValue());
                        String build = (String) metadata.get(World2.METADATA_KEY_WP_BUILD);
                        if (build != null) {
                            sb.append(" (").append(build).append(')');
                        }
                        sb.append('\n');
                        break;
                    case World2.METADATA_KEY_TIMESTAMP:
                        sb.append("Saved on ").append(SimpleDateFormat.getDateTimeInstance().format((Date) entry.getValue())).append('\n');
                        break;
                    case World2.METADATA_KEY_PLUGINS:
                        String[][] plugins = (String[][]) entry.getValue();
                        for (String[] plugin : plugins) {
                            sb.append("Plugin: ").append(plugin[0]).append(" (").append(plugin[1]).append(")\n");
                        }
                        break;
                }
            }
        }

        private void logMetadataAsDebug(Map<String, Object> metadata) {
            StringBuilder sb = new StringBuilder("Metadata from world file:\n");
            appendMetadata(sb, metadata);
            logger.debug(sb.toString());
        }

        private void logMetadataAsError(Map<String, Object> metadata) {
            StringBuilder sb = new StringBuilder("Metadata from world file:\n");
            appendMetadata(sb, metadata);
            logger.error(sb.toString());
        }

        private void reportUnloadableWorldException(UnloadableWorldException e) {
            try {
                String text;
                if (e.getMetadata() != null) {
                    StringBuilder sb = new StringBuilder("WorldPainter could not load the file. The cause may be one of:\n" + "\n" + "* The file is damaged or corrupted\n" + "* The file was created with a newer version of WorldPainter\n" + "* The file was created using WorldPainter plugins which you do not have\n" + "\n");
                    appendMetadata(sb, e.getMetadata());
                    text = sb.toString();
                } else {
                    text = "WorldPainter could not load the file. The cause may be one of:\n" + "\n" + "* The file is not a WorldPainter world\n" + "* The file is damaged or corrupted\n" + "* The file was created with a newer version of WorldPainter\n" + "* The file was created using WorldPainter plugins which you do not have";
                }
                SwingUtilities.invokeAndWait(() -> showMessageDialog(App.this, text, strings.getString("file.damaged"), ERROR_MESSAGE));
            } catch (InterruptedException e2) {
                throw new RuntimeException("Thread interrupted while reporting unloadable file " + file, e2);
            } catch (InvocationTargetException e2) {
                throw new RuntimeException("Invocation target exception while reporting unloadable file " + file, e2);
            }
        }
    }, false);
    if (newWorld == null) {
        // The file was damaged
        return;
    }
    if (!isBackupFile(file)) {
        lastSelectedFile = file;
    } else {
        lastSelectedFile = null;
    }
    // Log an event
    Configuration config = Configuration.getInstance();
    EventVO event = new EventVO(EVENT_KEY_ACTION_OPEN_WORLD).addTimestamp();
    event.setAttribute(ATTRIBUTE_KEY_MAX_HEIGHT, newWorld.getMaxHeight());
    Dimension loadedDimension = newWorld.getDimension(0);
    event.setAttribute(ATTRIBUTE_KEY_TILES, loadedDimension.getTiles().size());
    logLayers(loadedDimension, event, "");
    loadedDimension = newWorld.getDimension(1);
    if (loadedDimension != null) {
        event.setAttribute(ATTRIBUTE_KEY_NETHER_TILES, loadedDimension.getTiles().size());
        logLayers(loadedDimension, event, "nether.");
    }
    loadedDimension = newWorld.getDimension(2);
    if (loadedDimension != null) {
        event.setAttribute(ATTRIBUTE_KEY_END_TILES, loadedDimension.getTiles().size());
        logLayers(loadedDimension, event, "end.");
    }
    if (newWorld.getImportedFrom() != null) {
        event.setAttribute(ATTRIBUTE_KEY_IMPORTED_WORLD, true);
    }
    config.logEvent(event);
    Set<World2.Warning> warnings = newWorld.getWarnings();
    if ((warnings != null) && (!warnings.isEmpty())) {
        for (World2.Warning warning : warnings) {
            switch(warning) {
                case AUTO_BIOMES_DISABLED:
                    if (showOptionDialog(this, "Automatic Biomes were previously enabled for this world but have been disabled.\nPress More Info for more information, including how to reenable it.", "Automatic Biomes Disabled", DEFAULT_OPTION, WARNING_MESSAGE, null, new Object[] { "More Info", "OK" }, "OK") == 0) {
                        try {
                            DesktopUtils.open(new URL("https://www.worldpainter.net/doc/legacy/newautomaticbiomes"));
                        } catch (MalformedURLException e) {
                            throw new RuntimeException(e);
                        }
                    }
                    break;
                case AUTO_BIOMES_ENABLED:
                    if (showOptionDialog(this, "Automatic Biomes were previously disabled for this world but have been enabled.\nPress More Info for more information, including how to disable it.", "Automatic Biomes Enabled", DEFAULT_OPTION, WARNING_MESSAGE, null, new Object[] { "More Info", "OK" }, "OK") == 0) {
                        try {
                            DesktopUtils.open(new URL("https://www.worldpainter.net/doc/legacy/newautomaticbiomes"));
                        } catch (MalformedURLException e) {
                            throw new RuntimeException(e);
                        }
                    }
                    break;
            }
        }
    }
    if (newWorld.isAskToConvertToAnvil() && (newWorld.getMaxHeight() == DEFAULT_MAX_HEIGHT_1) && (newWorld.getImportedFrom() == null)) {
        if (showConfirmDialog(this, strings.getString("this.world.is.128.blocks.high"), strings.getString("convert.world.height"), YES_NO_OPTION) == YES_OPTION) {
            ChangeHeightDialog.resizeWorld(newWorld, HeightTransform.IDENTITY, DEFAULT_MAX_HEIGHT_2, this);
            newWorld.addHistoryEntry(HistoryEntry.WORLD_MAX_HEIGHT_CHANGED, DEFAULT_MAX_HEIGHT_2);
            // with the old format
            if (newWorld.getPlatform() != null) {
                newWorld.setPlatform(DefaultPlugin.JAVA_ANVIL);
            }
            // Log event
            config.logEvent(new EventVO(EVENT_KEY_ACTION_MIGRATE_HEIGHT).addTimestamp());
        }
        // Don't ask again, no matter what the user answered
        newWorld.setAskToConvertToAnvil(false);
    }
    if (newWorld.isAskToRotate() && (newWorld.getUpIs() == Direction.WEST) && (newWorld.getImportedFrom() == null)) {
        if (showConfirmDialog(this, strings.getString("this.world.was.created.when.north.was.to.the.right"), strings.getString("rotate.world"), YES_NO_OPTION) == YES_OPTION) {
            ProgressDialog.executeTask(this, new ProgressTask<java.lang.Void>() {

                @Override
                public String getName() {
                    return strings.getString("rotating.world");
                }

                @Override
                public java.lang.Void execute(ProgressReceiver progressReceiver) throws OperationCancelled {
                    newWorld.transform(CoordinateTransform.ROTATE_CLOCKWISE_270_DEGREES, progressReceiver);
                    for (Dimension dimension : newWorld.getDimensions()) {
                        newWorld.addHistoryEntry(HistoryEntry.WORLD_DIMENSION_ROTATED, dimension.getName(), 270);
                    }
                    return null;
                }
            }, false);
            // Log event
            config.logEvent(new EventVO(EVENT_KEY_ACTION_MIGRATE_ROTATION).addTimestamp());
        }
        // Don't ask again, no matter what the user answered
        newWorld.setAskToRotate(false);
    }
    // Make sure the world name is always the same as the file name, to
    // avoid confusion, unless the only difference is illegal filename
    // characters changed into underscores. Do this here as well as when
    // saving, because the file might have been renamed
    String name = isBackupFile(file) ? getOriginalFile(file).getName() : file.getName();
    int p = name.lastIndexOf('.');
    if (p != -1) {
        name = name.substring(0, p);
    }
    String worldName = newWorld.getName();
    if (worldName.length() != name.length()) {
        newWorld.setName(name);
    } else {
        for (int i = 0; i < name.length(); i++) {
            if ((name.charAt(i) != '_') && (name.charAt(i) != worldName.charAt(i))) {
                newWorld.setName(name);
                break;
            }
        }
    }
    newWorld.setDirty(false);
    setWorld(newWorld);
    addRecentlyUsedWorld(file);
    if (newWorld.getImportedFrom() != null) {
        enableImportedWorldOperation();
    } else {
        disableImportedWorldOperation();
    }
}
Also used : MalformedURLException(java.net.MalformedURLException) URL(java.net.URL) HistoryEntry(org.pepsoft.worldpainter.history.HistoryEntry) Void(java.lang.Void) EventVO(org.pepsoft.worldpainter.vo.EventVO) OperationCancelled(org.pepsoft.util.ProgressReceiver.OperationCancelled) InvocationTargetException(java.lang.reflect.InvocationTargetException) Paint(org.pepsoft.worldpainter.painting.Paint)

Example 5 with Void

use of java.lang.Void in project WorldPainter by Captain-Chaos.

the class App method createCustomLayerButton.

// PaletteManager.ButtonProvider
@Override
public List<Component> createCustomLayerButton(final CustomLayer layer) {
    final List<Component> buttonComponents = createLayerButton(layer, '\0');
    final JToggleButton button = (JToggleButton) buttonComponents.get(2);
    button.setToolTipText(button.getToolTipText() + "; right-click for options");
    button.addMouseListener(new java.awt.event.MouseAdapter() {

        @Override
        public void mousePressed(MouseEvent e) {
            if (e.isPopupTrigger()) {
                showPopup(e);
            }
        }

        @Override
        public void mouseClicked(MouseEvent e) {
            if (e.isPopupTrigger()) {
                showPopup(e);
            }
        }

        @Override
        public void mouseReleased(MouseEvent e) {
            if (e.isPopupTrigger()) {
                showPopup(e);
            }
        }

        private void showPopup(MouseEvent e) {
            JPopupMenu popup = new JPopupMenu();
            JMenuItem menuItem = new JMenuItem(strings.getString("edit") + "...");
            menuItem.addActionListener(e1 -> edit());
            popup.add(menuItem);
            menuItem = new JMenuItem(strings.getString("remove") + "...");
            menuItem.addActionListener(e1 -> remove());
            popup.add(menuItem);
            menuItem = new JMenuItem("Export to file...");
            menuItem.addActionListener(e1 -> exportLayer(layer));
            popup.add(menuItem);
            JMenu paletteMenu = new JMenu("Move to palette");
            for (final Palette palette : paletteManager.getPalettes()) {
                menuItem = new JMenuItem(palette.getName());
                menuItem.addActionListener(e1 -> moveLayerToPalette(layer, palette));
                if (palette.contains(layer)) {
                    menuItem.setEnabled(false);
                }
                paletteMenu.add(menuItem);
            }
            menuItem = new JMenuItem("New palette...");
            menuItem.addActionListener(e1 -> createNewLayerPalette(layer));
            paletteMenu.add(menuItem);
            popup.add(paletteMenu);
            List<Action> actions = layer.getActions();
            if (actions != null) {
                for (Action action : actions) {
                    action.putValue(CustomLayer.KEY_DIMENSION, dimension);
                    popup.add(new JMenuItem(action));
                }
            }
            popup.show(button, e.getX(), e.getY());
        }

        private void edit() {
            int previousColour = layer.getColour();
            WorldPainterDialog dialog;
            if ((layer instanceof Bo2Layer) || (layer instanceof GroundCoverLayer) || (layer instanceof CombinedLayer) || (layer instanceof PlantLayer)) {
                dialog = new EditLayerDialog<Layer>(App.this, layer);
            } else if (layer instanceof UndergroundPocketsLayer) {
                dialog = new UndergroundPocketsDialog(App.this, (UndergroundPocketsLayer) layer, selectedColourScheme, dimension.getMaxHeight(), world.isExtendedBlockIds());
            } else if (layer instanceof TunnelLayer) {
                final int baseHeight, waterLevel;
                final TileFactory tileFactory = dimension.getTileFactory();
                if (tileFactory instanceof HeightMapTileFactory) {
                    baseHeight = (int) ((HeightMapTileFactory) tileFactory).getBaseHeight();
                    waterLevel = ((HeightMapTileFactory) tileFactory).getWaterHeight();
                } else {
                    baseHeight = 58;
                    waterLevel = 62;
                }
                dialog = new TunnelLayerDialog(App.this, (TunnelLayer) layer, world.isExtendedBlockIds(), selectedColourScheme, dimension.getMaxHeight(), baseHeight, waterLevel);
            } else {
                throw new RuntimeException("Don't know how to edit " + layer.getName());
            }
            dialog.setVisible(true);
            if (!dialog.isCancelled()) {
                button.setText(layer.getName());
                button.setToolTipText(layer.getName() + ": " + layer.getDescription() + "; right-click for options");
                int newColour = layer.getColour();
                boolean viewRefreshed = false;
                if (newColour != previousColour) {
                    button.setIcon(new ImageIcon(layer.getIcon()));
                    view.refreshTilesForLayer(layer, false);
                    viewRefreshed = true;
                }
                dimension.setDirty(true);
                if (layer instanceof CombinedLayer) {
                    updateHiddenLayers();
                }
                if ((layer instanceof TunnelLayer) && (!viewRefreshed)) {
                    view.refreshTilesForLayer(layer, false);
                }
            }
        }

        private void remove() {
            if (showConfirmDialog(App.this, MessageFormat.format(strings.getString("are.you.sure.you.want.to.remove.the.0.layer"), layer.getName()), MessageFormat.format(strings.getString("confirm.0.removal"), layer.getName()), YES_NO_OPTION) == YES_OPTION) {
                deleteCustomLayer(layer);
                // Doesn't happen automatically for some reason; Swing bug?
                App.this.validate();
            }
        }
    });
    return buttonComponents;
}
Also used : GZIPInputStream(java.util.zip.GZIPInputStream) CustomBiome(org.pepsoft.worldpainter.biomeschemes.CustomBiome) UI_SCALE(org.pepsoft.util.GUIUtils.UI_SCALE) AutoBiomeScheme(org.pepsoft.worldpainter.biomeschemes.AutoBiomeScheme) TunnelLayerDialog(org.pepsoft.worldpainter.layers.tunnel.TunnelLayerDialog) TunnelLayer(org.pepsoft.worldpainter.layers.tunnel.TunnelLayer) Paint(org.pepsoft.worldpainter.painting.Paint) DockableFrame(com.jidesoft.docking.DockableFrame) org.pepsoft.worldpainter.painting(org.pepsoft.worldpainter.painting) SET_SPAWN_POINT(org.pepsoft.worldpainter.Platform.Capability.SET_SPAWN_POINT) BiomeSchemeManager(org.pepsoft.worldpainter.biomeschemes.BiomeSchemeManager) Timer(javax.swing.Timer) Void(java.lang.Void) DefaultFilter(org.pepsoft.worldpainter.panels.DefaultFilter) InfoPanel(org.pepsoft.worldpainter.panels.InfoPanel) KeyEvent(java.awt.event.KeyEvent) AffineTransform(java.awt.geom.AffineTransform) Box(javax.swing.Box) InvocationTargetException(java.lang.reflect.InvocationTargetException) Direction(org.pepsoft.minecraft.Direction) org.pepsoft.worldpainter.operations(org.pepsoft.worldpainter.operations) Brush(org.pepsoft.worldpainter.brushes.Brush) PropertyChangeListener(java.beans.PropertyChangeListener) SymmetricBrush(org.pepsoft.worldpainter.brushes.SymmetricBrush) EmptyBorder(javax.swing.border.EmptyBorder) GZIPOutputStream(java.util.zip.GZIPOutputStream) CustomItemsTreeModel(org.pepsoft.worldpainter.importing.CustomItemsTreeModel) GardenOfEdenOperation(org.pepsoft.worldpainter.gardenofeden.GardenOfEdenOperation) java.util(java.util) SimpleDateFormat(java.text.SimpleDateFormat) DOCK_SIDE_WEST(com.jidesoft.docking.DockContext.DOCK_SIDE_WEST) BrushOptions(org.pepsoft.worldpainter.panels.BrushOptions) AffineTransformOp(java.awt.image.AffineTransformOp) MapImportDialog(org.pepsoft.worldpainter.importing.MapImportDialog) com.jidesoft.docking(com.jidesoft.docking) RotatedBrush(org.pepsoft.worldpainter.brushes.RotatedBrush) BetterAction(org.pepsoft.worldpainter.util.BetterAction) ScriptRunner(org.pepsoft.worldpainter.tools.scripts.ScriptRunner) BevelBorder(javax.swing.border.BevelBorder) FileFilter(javax.swing.filechooser.FileFilter) CustomLayerProvider(org.pepsoft.worldpainter.plugins.CustomLayerProvider) java.awt(java.awt) RemoteJCheckBox(org.pepsoft.util.swing.RemoteJCheckBox) LayoutUtils(org.pepsoft.worldpainter.util.LayoutUtils) WPPluginManager(org.pepsoft.worldpainter.plugins.WPPluginManager) RespawnPlayerDialog(org.pepsoft.worldpainter.tools.RespawnPlayerDialog) URL(java.net.URL) EventVO(org.pepsoft.worldpainter.vo.EventVO) PropertyVetoException(java.beans.PropertyVetoException) TiledImageViewerContainer(org.pepsoft.util.swing.TiledImageViewerContainer) FLUIDS_AS_LAYER(org.pepsoft.worldpainter.TileRenderer.FLUIDS_AS_LAYER) CustomBiomeListener(org.pepsoft.worldpainter.biomeschemes.CustomBiomeManager.CustomBiomeListener) PlatformManager(org.pepsoft.worldpainter.plugins.PlatformManager) Material(org.pepsoft.minecraft.Material) BackupUtil(org.pepsoft.worldpainter.util.BackupUtil) BitmapBrush(org.pepsoft.worldpainter.brushes.BitmapBrush) UndergroundPocketsDialog(org.pepsoft.worldpainter.layers.pockets.UndergroundPocketsDialog) ImageIO(javax.imageio.ImageIO) WorldHistoryDialog(org.pepsoft.worldpainter.history.WorldHistoryDialog) BufferedImage(java.awt.image.BufferedImage) DynMapColourScheme(org.pepsoft.worldpainter.colourschemes.DynMapColourScheme) Collectors(java.util.stream.Collectors) JideLabel(com.jidesoft.swing.JideLabel) ProgressTask(org.pepsoft.util.swing.ProgressTask) List(java.util.List) Constants(org.pepsoft.minecraft.Constants) UndergroundPocketsLayer(org.pepsoft.worldpainter.layers.pockets.UndergroundPocketsLayer) org.pepsoft.worldpainter.selection(org.pepsoft.worldpainter.selection) java.awt.event(java.awt.event) BIOMES(org.pepsoft.worldpainter.Platform.Capability.BIOMES) GroundCoverLayer(org.pepsoft.worldpainter.layers.groundcover.GroundCoverLayer) CustomBiomeManager(org.pepsoft.worldpainter.biomeschemes.CustomBiomeManager) org.pepsoft.util(org.pepsoft.util) NonNls(org.jetbrains.annotations.NonNls) org.pepsoft.worldpainter.layers(org.pepsoft.worldpainter.layers) Listener(org.pepsoft.worldpainter.panels.BrushOptions.Listener) BufferedImageOp(java.awt.image.BufferedImageOp) ThreeDeeFrame(org.pepsoft.worldpainter.threedeeview.ThreeDeeFrame) MessageFormat(java.text.MessageFormat) VoidRenderer(org.pepsoft.worldpainter.layers.renderers.VoidRenderer) UndoManager(org.pepsoft.util.undo.UndoManager) UsageVO(org.pepsoft.worldpainter.vo.UsageVO) PropertyChangeEvent(java.beans.PropertyChangeEvent) Constants(org.pepsoft.worldpainter.Constants) TERRAIN_AS_LAYER(org.pepsoft.worldpainter.TileRenderer.TERRAIN_AS_LAYER) PlantLayer(org.pepsoft.worldpainter.layers.plants.PlantLayer) AttributeKeyVO(org.pepsoft.worldpainter.vo.AttributeKeyVO) MalformedURLException(java.net.MalformedURLException) BiomesViewerFrame(org.pepsoft.worldpainter.tools.BiomesViewerFrame) ProgressDialog(org.pepsoft.util.swing.ProgressDialog) HistoryEntry(org.pepsoft.worldpainter.history.HistoryEntry) JOptionPane(javax.swing.JOptionPane) Terrain(org.pepsoft.worldpainter.Terrain) DOCK_SIDE_EAST(com.jidesoft.docking.DockContext.DOCK_SIDE_EAST) URLEncoder(java.net.URLEncoder) java.io(java.io) OperationCancelled(org.pepsoft.util.ProgressReceiver.OperationCancelled) WritableRaster(java.awt.image.WritableRaster) ImportMaskDialog(org.pepsoft.worldpainter.importing.ImportMaskDialog) ImportCustomItemsDialog(org.pepsoft.worldpainter.importing.ImportCustomItemsDialog) javax.swing(javax.swing) BetterAction(org.pepsoft.worldpainter.util.BetterAction) UndergroundPocketsDialog(org.pepsoft.worldpainter.layers.pockets.UndergroundPocketsDialog) List(java.util.List) java.awt.event(java.awt.event) TunnelLayerDialog(org.pepsoft.worldpainter.layers.tunnel.TunnelLayerDialog) UndergroundPocketsLayer(org.pepsoft.worldpainter.layers.pockets.UndergroundPocketsLayer) PlantLayer(org.pepsoft.worldpainter.layers.plants.PlantLayer) TunnelLayer(org.pepsoft.worldpainter.layers.tunnel.TunnelLayer) GroundCoverLayer(org.pepsoft.worldpainter.layers.groundcover.GroundCoverLayer)

Aggregations

Void (java.lang.Void)5 ByteArrayInputStream (java.io.ByteArrayInputStream)3 ByteArrayOutputStream (java.io.ByteArrayOutputStream)3 DataOutputStream (java.io.DataOutputStream)3 IOException (java.io.IOException)3 Text (org.apache.hadoop.io.Text)3 TaskAttemptID (org.apache.hadoop.mapreduce.TaskAttemptID)3 Test (org.junit.Test)3 InvocationOnMock (org.mockito.invocation.InvocationOnMock)3 InvocationTargetException (java.lang.reflect.InvocationTargetException)2 MalformedURLException (java.net.MalformedURLException)2 URL (java.net.URL)2 OperationCancelled (org.pepsoft.util.ProgressReceiver.OperationCancelled)2 HistoryEntry (org.pepsoft.worldpainter.history.HistoryEntry)2 Paint (org.pepsoft.worldpainter.painting.Paint)2 EventVO (org.pepsoft.worldpainter.vo.EventVO)2 com.jidesoft.docking (com.jidesoft.docking)1 DOCK_SIDE_EAST (com.jidesoft.docking.DockContext.DOCK_SIDE_EAST)1 DOCK_SIDE_WEST (com.jidesoft.docking.DockContext.DOCK_SIDE_WEST)1 DockableFrame (com.jidesoft.docking.DockableFrame)1